Documentation ¶
Overview ¶
Package types implements the types and validation of types necessary for the application to function.
Index ¶
- func GetFields(reference interface{}) ([]string, error)
- func GetFieldsOrdered(reference interface{}) ([]string, error)
- func ValidateFields(document bson.D, reference interface{}) (bson.D, error)
- type Assemblies
- type AssembliesWithID
- type Assembly
- type AssemblyWithID
- type Component
- type ComponentWithID
- type Components
- type ComponentsWithID
- type InsertResult
- type Kit
- type KitWithID
- type Kits
- type KitsWithID
- type TabbyPrinter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetFields ¶ added in v0.18.1
GetFields returns an unordered list of fields in a reference interface{}
func GetFieldsOrdered ¶ added in v0.18.1
func ValidateFields ¶ added in v0.9.1
Taking a bson.D and a reference interface{}, returns a bson.D that only contains fields whose keys are also valid keys in the reference interface{}.
If an error is encountered, it is returned, and the returned bson.D will be nil.
If no error is encountered, the validated bson.D is returned, and the error will be nil.
Types ¶
type Assemblies ¶ added in v0.18.1
type Assemblies struct {
Assemblies []Assembly `json:"assemblies"`
}
func (*Assemblies) TabbyPrint ¶ added in v0.18.1
func (a *Assemblies) TabbyPrint() error
type AssembliesWithID ¶ added in v0.18.1
type AssembliesWithID struct {
AssembliesWithID []AssemblyWithID `json:"assemblies"`
}
func (*AssembliesWithID) TabbyPrint ¶ added in v0.18.1
func (a *AssembliesWithID) TabbyPrint() error
type Assembly ¶ added in v0.10.1
type Assembly struct { Name string `json:"name"` Tags []string `json:"tags"` Status string `json:"status"` // An assembly's Target should point to a kit's ObjectID Target primitive.ObjectID `json:"target"` }
func (*Assembly) TabbyPrint ¶ added in v0.18.1
type AssemblyWithID ¶ added in v0.18.1
func (*AssemblyWithID) TabbyPrint ¶ added in v0.18.1
func (a *AssemblyWithID) TabbyPrint() error
type Component ¶
type Component struct { Name string `json:"name"` Tags []string `json:"tags"` Status string `json:"status"` // A component's Target should point to a kit's or assembly's ObjectID Target primitive.ObjectID `json:"target"` }
func (*Component) TabbyPrint ¶ added in v0.18.1
type ComponentWithID ¶ added in v0.18.1
func (*ComponentWithID) TabbyPrint ¶ added in v0.18.1
func (c *ComponentWithID) TabbyPrint() error
type Components ¶ added in v0.18.1
type Components struct {
Components []Component `json:"components"`
}
func (*Components) TabbyPrint ¶ added in v0.18.1
func (c *Components) TabbyPrint() error
type ComponentsWithID ¶ added in v0.18.1
type ComponentsWithID struct {
ComponentsWithID []ComponentWithID `json:"components"`
}
func (*ComponentsWithID) TabbyPrint ¶ added in v0.18.1
func (c *ComponentsWithID) TabbyPrint() error
type InsertResult ¶ added in v0.25.1
type InsertResult struct { Message string `json:"message"` InsertedIDs []interface{} `json:"inserted_ids,omitempty"` }
func (InsertResult) TabbyPrint ¶ added in v0.25.1
func (r InsertResult) TabbyPrint() error
type Kit ¶ added in v0.10.1
type Kit struct { Name string `json:"name"` Tags []string `json:"tags"` Status string `json:"status"` }
func (*Kit) TabbyPrint ¶ added in v0.18.1
type KitWithID ¶ added in v0.18.1
func (*KitWithID) TabbyPrint ¶ added in v0.18.1
type Kits ¶ added in v0.18.1
type Kits struct {
Kits []Kit `json:"kits"`
}
func (*Kits) TabbyPrint ¶ added in v0.18.1
type KitsWithID ¶ added in v0.18.1
type KitsWithID struct {
KitsWithID []KitWithID `json:"kits"`
}
func (*KitsWithID) TabbyPrint ¶ added in v0.18.1
func (k *KitsWithID) TabbyPrint() error
type TabbyPrinter ¶ added in v0.18.1
type TabbyPrinter interface {
TabbyPrint() error
}
Click to show internal directories.
Click to hide internal directories.