Documentation ¶
Index ¶
- Variables
- func ValidateAvatarView(result *AvatarView) (err error)
- func ValidateFollowerCollectionView(result FollowerCollectionView) (err error)
- func ValidateFollowerView(result *FollowerView) (err error)
- func ValidateFollowersPage(result *FollowersPage) (err error)
- func ValidateFollowersPageView(result *FollowersPageView) (err error)
- type AvatarView
- type FollowerCollectionView
- type FollowerView
- type FollowersPage
- type FollowersPageView
Constants ¶
This section is empty.
Variables ¶
var ( // FollowersPageMap is a map of attribute names in result type FollowersPage // indexed by view name. FollowersPageMap = map[string][]string{ "default": []string{ "followers", "total", "page", }, } // FollowerCollectionMap is a map of attribute names in result type // FollowerCollection indexed by view name. FollowerCollectionMap = map[string][]string{ "default": []string{ "id", "name", "avatar", }, } // FollowerMap is a map of attribute names in result type Follower indexed by // view name. FollowerMap = map[string][]string{ "default": []string{ "id", "name", "avatar", }, } )
Functions ¶
func ValidateAvatarView ¶
func ValidateAvatarView(result *AvatarView) (err error)
ValidateAvatarView runs the validations defined on AvatarView.
func ValidateFollowerCollectionView ¶
func ValidateFollowerCollectionView(result FollowerCollectionView) (err error)
ValidateFollowerCollectionView runs the validations defined on FollowerCollectionView using the "default" view.
func ValidateFollowerView ¶
func ValidateFollowerView(result *FollowerView) (err error)
ValidateFollowerView runs the validations defined on FollowerView using the "default" view.
func ValidateFollowersPage ¶
func ValidateFollowersPage(result *FollowersPage) (err error)
ValidateFollowersPage runs the validations defined on the viewed result type FollowersPage.
func ValidateFollowersPageView ¶
func ValidateFollowersPageView(result *FollowersPageView) (err error)
ValidateFollowersPageView runs the validations defined on FollowersPageView using the "default" view.
Types ¶
type AvatarView ¶
type AvatarView struct {
URL *string
}
AvatarView is a type that runs validations on a projected type.
type FollowerCollectionView ¶
type FollowerCollectionView []*FollowerView
FollowerCollectionView is a type that runs validations on a projected type.
type FollowerView ¶
type FollowerView struct { ID *int64 Name *string Avatar *AvatarView }
FollowerView is a type that runs validations on a projected type.
type FollowersPage ¶
type FollowersPage struct { // Type to project Projected *FollowersPageView // View to render View string }
FollowersPage is the viewed result type that is projected based on a view.
type FollowersPageView ¶
type FollowersPageView struct { Followers FollowerCollectionView Total *int32 Page *int32 }
FollowersPageView is a type that runs validations on a projected type.