diff --git a/.gitignore b/.gitignore index f34f266..08806b1 100644 --- a/.gitignore +++ b/.gitignore @@ -9,4 +9,6 @@ jira jira.exe schemas/*.json t/issue.props -t/.jira.d/templates \ No newline at end of file +t/.jira.d/templates +dist/ +src/ \ No newline at end of file diff --git a/data/FieldMeta.go b/data/FieldMeta.go new file mode 100644 index 0000000..cbe321f --- /dev/null +++ b/data/FieldMeta.go @@ -0,0 +1,21 @@ +package jiradata + +///////////////////////////////////////////////////////////////////////// +// This Code is Generated by SlipScheme Project: +// https://github.com/coryb/slipscheme +// +// Generated with command: slipscheme -pkg jiradata -overwrite ../schemas/TransitionsMeta.json +///////////////////////////////////////////////////////////////////////// +// DO NOT EDIT // +///////////////////////////////////////////////////////////////////////// + +type FieldMeta struct { + AllowedValues []interface{} `json:"allowedValues,omitempty" yaml:"allowedValues,omitempty"` + AutoCompleteURL string `json:"autoCompleteUrl,omitempty" yaml:"autoCompleteUrl,omitempty"` + HasDefaultValue bool `json:"hasDefaultValue,omitempty" yaml:"hasDefaultValue,omitempty"` + Key string `json:"key,omitempty" yaml:"key,omitempty"` + Name string `json:"name,omitempty" yaml:"name,omitempty"` + Operations []string `json:"operations,omitempty" yaml:"operations,omitempty"` + Required bool `json:"required,omitempty" yaml:"required,omitempty"` + Schema *JsonType `json:"schema,omitempty" yaml:"schema,omitempty"` +} diff --git a/data/FieldMetaMap.go b/data/FieldMetaMap.go new file mode 100644 index 0000000..9a88f6a --- /dev/null +++ b/data/FieldMetaMap.go @@ -0,0 +1,12 @@ +package jiradata + +///////////////////////////////////////////////////////////////////////// +// This Code is Generated by SlipScheme Project: +// https://github.com/coryb/slipscheme +// +// Generated with command: slipscheme -pkg jiradata -overwrite ../schemas/TransitionsMeta.json +///////////////////////////////////////////////////////////////////////// +// DO NOT EDIT // +///////////////////////////////////////////////////////////////////////// + +type FieldMetaMap map[string]*FieldMeta diff --git a/data/JsonType.go b/data/JsonType.go new file mode 100644 index 0000000..3738f01 --- /dev/null +++ b/data/JsonType.go @@ -0,0 +1,18 @@ +package jiradata + +///////////////////////////////////////////////////////////////////////// +// This Code is Generated by SlipScheme Project: +// https://github.com/coryb/slipscheme +// +// Generated with command: slipscheme -pkg jiradata -overwrite ../schemas/TransitionsMeta.json +///////////////////////////////////////////////////////////////////////// +// DO NOT EDIT // +///////////////////////////////////////////////////////////////////////// + +type JsonType struct { + Custom string `json:"custom,omitempty" yaml:"custom,omitempty"` + CustomID int `json:"customId,omitempty" yaml:"customId,omitempty"` + Items string `json:"items,omitempty" yaml:"items,omitempty"` + System string `json:"system,omitempty" yaml:"system,omitempty"` + Type string `json:"type,omitempty" yaml:"type,omitempty"` +} diff --git a/data/Status.go b/data/Status.go new file mode 100644 index 0000000..a916318 --- /dev/null +++ b/data/Status.go @@ -0,0 +1,20 @@ +package jiradata + +///////////////////////////////////////////////////////////////////////// +// This Code is Generated by SlipScheme Project: +// https://github.com/coryb/slipscheme +// +// Generated with command: slipscheme -pkg jiradata -overwrite ../schemas/TransitionsMeta.json +///////////////////////////////////////////////////////////////////////// +// DO NOT EDIT // +///////////////////////////////////////////////////////////////////////// + +type Status struct { + Description string `json:"description,omitempty" yaml:"description,omitempty"` + IconURL string `json:"iconUrl,omitempty" yaml:"iconUrl,omitempty"` + ID string `json:"id,omitempty" yaml:"id,omitempty"` + Name string `json:"name,omitempty" yaml:"name,omitempty"` + Self string `json:"self,omitempty" yaml:"self,omitempty"` + StatusCategory *StatusCategory `json:"statusCategory,omitempty" yaml:"statusCategory,omitempty"` + StatusColor string `json:"statusColor,omitempty" yaml:"statusColor,omitempty"` +} diff --git a/data/StatusCategory.go b/data/StatusCategory.go new file mode 100644 index 0000000..889b3c1 --- /dev/null +++ b/data/StatusCategory.go @@ -0,0 +1,18 @@ +package jiradata + +///////////////////////////////////////////////////////////////////////// +// This Code is Generated by SlipScheme Project: +// https://github.com/coryb/slipscheme +// +// Generated with command: slipscheme -pkg jiradata -overwrite ../schemas/TransitionsMeta.json +///////////////////////////////////////////////////////////////////////// +// DO NOT EDIT // +///////////////////////////////////////////////////////////////////////// + +type StatusCategory struct { + ColorName string `json:"colorName,omitempty" yaml:"colorName,omitempty"` + ID int `json:"id,omitempty" yaml:"id,omitempty"` + Key string `json:"key,omitempty" yaml:"key,omitempty"` + Name string `json:"name,omitempty" yaml:"name,omitempty"` + Self string `json:"self,omitempty" yaml:"self,omitempty"` +} diff --git a/data/Transition.go b/data/Transition.go new file mode 100644 index 0000000..34c0459 --- /dev/null +++ b/data/Transition.go @@ -0,0 +1,19 @@ +package jiradata + +///////////////////////////////////////////////////////////////////////// +// This Code is Generated by SlipScheme Project: +// https://github.com/coryb/slipscheme +// +// Generated with command: slipscheme -pkg jiradata -overwrite ../schemas/TransitionsMeta.json +///////////////////////////////////////////////////////////////////////// +// DO NOT EDIT // +///////////////////////////////////////////////////////////////////////// + +type Transition struct { + Expand string `json:"expand,omitempty" yaml:"expand,omitempty"` + Fields FieldMetaMap `json:"fields,omitempty" yaml:"fields,omitempty"` + HasScreen bool `json:"hasScreen,omitempty" yaml:"hasScreen,omitempty"` + ID string `json:"id,omitempty" yaml:"id,omitempty"` + Name string `json:"name,omitempty" yaml:"name,omitempty"` + To *Status `json:"to,omitempty" yaml:"to,omitempty"` +} diff --git a/data/Transitions.go b/data/Transitions.go new file mode 100644 index 0000000..ecf1569 --- /dev/null +++ b/data/Transitions.go @@ -0,0 +1,12 @@ +package jiradata + +///////////////////////////////////////////////////////////////////////// +// This Code is Generated by SlipScheme Project: +// https://github.com/coryb/slipscheme +// +// Generated with command: slipscheme -pkg jiradata -overwrite ../schemas/TransitionsMeta.json +///////////////////////////////////////////////////////////////////////// +// DO NOT EDIT // +///////////////////////////////////////////////////////////////////////// + +type Transitions []*Transition diff --git a/data/TransitionsFuncs.go b/data/TransitionsFuncs.go new file mode 100644 index 0000000..1735f53 --- /dev/null +++ b/data/TransitionsFuncs.go @@ -0,0 +1,15 @@ +package jiradata + +import ( + "strings" +) + +func (t Transitions) Find(name string) *Transition { + name = strings.ToLower(name) + for _, trans := range t { + if strings.Contains(strings.ToLower(trans.Name), name) { + return trans + } + } + return nil +} diff --git a/data/TransitionsMeta.go b/data/TransitionsMeta.go new file mode 100644 index 0000000..2946ccb --- /dev/null +++ b/data/TransitionsMeta.go @@ -0,0 +1,15 @@ +package jiradata + +///////////////////////////////////////////////////////////////////////// +// This Code is Generated by SlipScheme Project: +// https://github.com/coryb/slipscheme +// +// Generated with command: slipscheme -pkg jiradata -overwrite ../schemas/TransitionsMeta.json +///////////////////////////////////////////////////////////////////////// +// DO NOT EDIT // +///////////////////////////////////////////////////////////////////////// + +type TransitionsMeta struct { + Expand string `json:"expand,omitempty" yaml:"expand,omitempty"` + Transitions Transitions `json:"transitions,omitempty" yaml:"transitions,omitempty"` +}