Documentation
¶
Index ¶
- Variables
- func ValidateNeatThing(result *NeatThing) (err error)
- func ValidateNeatThingView(result *NeatThingView) (err error)
- func ValidateNeatThingViewFull(result *NeatThingView) (err error)
- func ValidateNeatThingViewName(result *NeatThingView) (err error)
- func ValidateNeatThingViewNameDefinition(result *NeatThingView) (err error)
- func ValidateNeatThingViewNameLink(result *NeatThingView) (err error)
- type NeatThing
- type NeatThingView
Constants ¶
This section is empty.
Variables ¶
var ( // NeatThingMap is a map of attribute names in result type NeatThing indexed by // view name. NeatThingMap = map[string][]string{ "default": []string{ "name", "definition", "link", }, "full": []string{ "name", "definition", "link", "date", "bibliography", }, "name": []string{ "name", }, "name+definition": []string{ "name", "definition", }, "name+link": []string{ "name", "link", }, } )
Functions ¶
func ValidateNeatThing ¶
ValidateNeatThing runs the validations defined on the viewed result type NeatThing.
func ValidateNeatThingView ¶
func ValidateNeatThingView(result *NeatThingView) (err error)
ValidateNeatThingView runs the validations defined on NeatThingView using the "default" view.
func ValidateNeatThingViewFull ¶
func ValidateNeatThingViewFull(result *NeatThingView) (err error)
ValidateNeatThingViewFull runs the validations defined on NeatThingView using the "full" view.
func ValidateNeatThingViewName ¶
func ValidateNeatThingViewName(result *NeatThingView) (err error)
ValidateNeatThingViewName runs the validations defined on NeatThingView using the "name" view.
func ValidateNeatThingViewNameDefinition ¶
func ValidateNeatThingViewNameDefinition(result *NeatThingView) (err error)
ValidateNeatThingViewNameDefinition runs the validations defined on NeatThingView using the "name+definition" view.
func ValidateNeatThingViewNameLink ¶
func ValidateNeatThingViewNameLink(result *NeatThingView) (err error)
ValidateNeatThingViewNameLink runs the validations defined on NeatThingView using the "name+link" view.
Types ¶
type NeatThing ¶
type NeatThing struct { // Type to project Projected *NeatThingView // View to render View string }
NeatThing is the viewed result type that is projected based on a view.
type NeatThingView ¶
type NeatThingView struct { // The neat thing Name *string // What the neat thing is Definition *string // Illustrative link for the neat thing Link *string // When this was a neat thing Date *string Bibliography []string }
NeatThingView is a type that runs validations on a projected type.