Documentation ¶
Index ¶
- Variables
- func ValidateChatSummary(result *ChatSummary) (err error)
- func ValidateChatSummaryCollection(result ChatSummaryCollection) (err error)
- func ValidateChatSummaryCollectionView(result ChatSummaryCollectionView) (err error)
- func ValidateChatSummaryCollectionViewTiny(result ChatSummaryCollectionView) (err error)
- func ValidateChatSummaryView(result *ChatSummaryView) (err error)
- func ValidateChatSummaryViewTiny(result *ChatSummaryView) (err error)
- type ChatSummary
- type ChatSummaryCollection
- type ChatSummaryCollectionView
- type ChatSummaryView
Constants ¶
This section is empty.
Variables ¶
var ( // ChatSummaryCollectionMap is a map of attribute names in result type // ChatSummaryCollection indexed by view name. ChatSummaryCollectionMap = map[string][]string{ "tiny": []string{ "message", }, "default": []string{ "message", "length", "sent_at", }, } // ChatSummaryMap is a map of attribute names in result type ChatSummary // indexed by view name. ChatSummaryMap = map[string][]string{ "tiny": []string{ "message", }, "default": []string{ "message", "length", "sent_at", }, } )
Functions ¶
func ValidateChatSummary ¶
func ValidateChatSummary(result *ChatSummary) (err error)
ValidateChatSummary runs the validations defined on the viewed result type ChatSummary.
func ValidateChatSummaryCollection ¶
func ValidateChatSummaryCollection(result ChatSummaryCollection) (err error)
ValidateChatSummaryCollection runs the validations defined on the viewed result type ChatSummaryCollection.
func ValidateChatSummaryCollectionView ¶
func ValidateChatSummaryCollectionView(result ChatSummaryCollectionView) (err error)
ValidateChatSummaryCollectionView runs the validations defined on ChatSummaryCollectionView using the "default" view.
func ValidateChatSummaryCollectionViewTiny ¶
func ValidateChatSummaryCollectionViewTiny(result ChatSummaryCollectionView) (err error)
ValidateChatSummaryCollectionViewTiny runs the validations defined on ChatSummaryCollectionView using the "tiny" view.
func ValidateChatSummaryView ¶
func ValidateChatSummaryView(result *ChatSummaryView) (err error)
ValidateChatSummaryView runs the validations defined on ChatSummaryView using the "default" view.
func ValidateChatSummaryViewTiny ¶
func ValidateChatSummaryViewTiny(result *ChatSummaryView) (err error)
ValidateChatSummaryViewTiny runs the validations defined on ChatSummaryView using the "tiny" view.
Types ¶
type ChatSummary ¶
type ChatSummary struct { // Type to project Projected *ChatSummaryView // View to render View string }
ChatSummary is the viewed result type that is projected based on a view.
type ChatSummaryCollection ¶
type ChatSummaryCollection struct { // Type to project Projected ChatSummaryCollectionView // View to render View string }
ChatSummaryCollection is the viewed result type that is projected based on a view.
type ChatSummaryCollectionView ¶
type ChatSummaryCollectionView []*ChatSummaryView
ChatSummaryCollectionView is a type that runs validations on a projected type.
type ChatSummaryView ¶
type ChatSummaryView struct { // Message sent to the server Message *string // Length of the message sent Length *int // Time at which the message was sent SentAt *string }
ChatSummaryView is a type that runs validations on a projected type.