Jelajahi Sumber

Added initial data signature for bugs

arianagiroux 3 minggu lalu
induk
melakukan
de197b91bb
1 mengubah file dengan 28 tambahan dan 0 penghapusan
  1. 28 0
      bug.go

+ 28 - 0
bug.go

@@ -0,0 +1,28 @@
+package buggo
+
+type Bug struct {
+	Title        string    // The title of the bug in human readable format
+	Description  string    // The description of the bug
+	Status       string    // The status of the bug
+	Tags         []Tag     // A slice of [buggo.Tag] structs
+	Blockedby    []Blocker // A slice of [buggo.Blocker] structs
+	path         string    // The path to the bug
+	machineTitle string    // The machine parseable bug title
+}
+
+type (
+	Tag     string // A string representing a single tag
+	Blocker string // A string representing a single blocker
+)
+
+// Reads a bug from disk
+func (b Bug) Read(path string) (bug Bug, err error) { return Bug{}, nil }
+
+// Writes a bug to disk
+func (b Bug) Write() (success bool, err error) { return false, nil }
+
+// Removes a bug from disk
+func (b Bug) Delete() (success bool, err error) { return false, nil }
+
+// Renders a bug as text
+func (b Bug) View() string { return "" }