Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AggregationResult ¶
type AggregationResult struct { Data []User `bson:"data" json:"data"` TotalCount int64 `bson:"total_count" json:"total_count"` }
func (*AggregationResult) GetData ¶
func (r *AggregationResult) GetData() interface{}
func (*AggregationResult) GetTotal ¶
func (r *AggregationResult) GetTotal() int64
type EditRequest ¶
type EditRequest struct { ID string `json:"-"` Password string `json:"password"` Name string `json:"name" binding:"required,max=255"` Firstname string `json:"firstname" binding:"max=255"` Lastname string `json:"lastname" binding:"max=255"` Email string `json:"email" binding:"required,email"` Role string `json:"role" binding:"required"` UILanguage string `json:"ui_language"` IsEnabled *bool `json:"enable" binding:"required"` DefaultView string `json:"defaultview"` UITours map[string]bool `json:"ui_tours"` }
type ListRequest ¶
type ListRequest struct { pagination.FilteredQuery SortBy string `form:"sort_by" binding:"oneoforempty=_id name role enable"` }
type Store ¶
type Store interface { Find(ListRequest) (*AggregationResult, error) GetOneBy(string) (*User, error) Insert(EditRequest) (*User, error) Update(EditRequest) (*User, error) Delete(string) (bool, error) }
type User ¶
type User struct { ID string `bson:"_id" json:"_id"` Name string `bson:"name" json:"name"` Lastname string `bson:"lastname" json:"lastname"` Firstname string `bson:"firstname" json:"firstname"` Email string `bson:"email" json:"email"` Role Role `bson:"role" json:"role"` UILanguage string `bson:"ui_language" json:"ui_language"` UITours map[string]bool `bson:"ui_tours" json:"ui_tours"` IsEnabled bool `bson:"enable" json:"enable"` DefaultView *View `bson:"defaultview" json:"defaultview"` ExternalID string `bson:"external_id" json:"external_id"` Source string `bson:"source" json:"source"` AuthApiKey string `bson:"authkey" json:"authkey"` }
type Validator ¶
func NewValidator ¶
Click to show internal directories.
Click to hide internal directories.