Documentation ¶
Index ¶
- Variables
- func ValidateOperation(result *Operation) (err error)
- func ValidateOperationView(result *OperationView) (err error)
- func ValidateToolCollection(result ToolCollection) (err error)
- func ValidateToolCollectionView(result ToolCollectionView) (err error)
- func ValidateToolView(result *ToolView) (err error)
- type Operation
- type OperationView
- type ToolCollection
- type ToolCollectionView
- type ToolView
Constants ¶
This section is empty.
Variables ¶
var ( // ToolCollectionMap is a map indexing the attribute names of ToolCollection by // view name. ToolCollectionMap = map[string][]string{ "default": { "name", "version", "packager", }, } // OperationMap is a map indexing the attribute names of Operation by view name. OperationMap = map[string][]string{ "default": { "status", }, } // ToolMap is a map indexing the attribute names of Tool by view name. ToolMap = map[string][]string{ "default": { "name", "version", "packager", }, } )
Functions ¶
func ValidateOperation ¶
ValidateOperation runs the validations defined on the viewed result type Operation.
func ValidateOperationView ¶
func ValidateOperationView(result *OperationView) (err error)
ValidateOperationView runs the validations defined on OperationView using the "default" view.
func ValidateToolCollection ¶
func ValidateToolCollection(result ToolCollection) (err error)
ValidateToolCollection runs the validations defined on the viewed result type ToolCollection.
func ValidateToolCollectionView ¶
func ValidateToolCollectionView(result ToolCollectionView) (err error)
ValidateToolCollectionView runs the validations defined on ToolCollectionView using the "default" view.
func ValidateToolView ¶
ValidateToolView runs the validations defined on ToolView using the "default" view.
Types ¶
type Operation ¶
type Operation struct { // Type to project Projected *OperationView // View to render View string }
Operation is the viewed result type that is projected based on a view.
type OperationView ¶
type OperationView struct { // The status of the operation Status *string }
OperationView is a type that runs validations on a projected type.
type ToolCollection ¶
type ToolCollection struct { // Type to project Projected ToolCollectionView // View to render View string }
ToolCollection is the viewed result type that is projected based on a view.
type ToolCollectionView ¶
type ToolCollectionView []*ToolView
ToolCollectionView is a type that runs validations on a projected type.