about summary refs log tree commit diff stats
path: root/internal/nix/option.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/nix/option.go')
-rw-r--r--internal/nix/option.go37
1 files changed, 37 insertions, 0 deletions
diff --git a/internal/nix/option.go b/internal/nix/option.go
new file mode 100644
index 0000000..c1cc4c3
--- /dev/null
+++ b/internal/nix/option.go
@@ -0,0 +1,37 @@
+package nix
+
+type Markdown string
+
+type Value struct {
+	Text     string   `json:",omitempty"`
+	Markdown Markdown `json:",omitempty"`
+}
+
+type Link struct {
+	Name string
+	URL  string
+}
+
+type Option struct {
+	Name            string
+	Source          string
+	Declarations    []Link
+	Default         *Value `json:",omitempty"`
+	Description     Markdown
+	Example         *Value `json:",omitempty"`
+	Loc             []string
+	RelatedPackages Markdown `json:",omitempty"`
+	Type            string
+}
+
+func (Option) BleveType() string {
+	return "option"
+}
+
+func (p Option) GetName() string {
+	return p.Name
+}
+
+func (p Option) GetSource() string {
+	return p.Source
+}