Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
Types ¶
type API ¶
type AggregationResult ¶
type AggregationResult struct { Data []Response `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 CreateRequest ¶
type CreateRequest struct { EditRequest Name string `json:"name" binding:"required,max=255"` }
type EditRequest ¶
type ListRequest ¶
type ListRequest struct { pagination.FilteredQuery SortBy string `form:"sort_by" binding:"oneoforempty=name"` Permission string `form:"permission"` }
type Permission ¶
type Response ¶
type Response struct { ID string `bson:"_id" json:"_id"` Name string `bson:"name" json:"name"` Description string `bson:"description" json:"description"` DefaultView *View `bson:"defaultview" json:"defaultview"` Permissions []Permission `bson:"permissions" json:"permissions"` Editable *bool `bson:"editable,omitempty" json:"editable,omitempty"` Deletable *bool `bson:"deletable,omitempty" json:"deletable,omitempty"` AuthConfig security.AuthMethodConf `bson:"auth_config" json:"auth_config"` Author *author.Author `bson:"author,omitempty" json:"author,omitempty"` Created *datetime.CpsTime `bson:"created,omitempty" json:"created,omitempty" swaggertype:"integer"` Updated *datetime.CpsTime `bson:"updated,omitempty" json:"updated,omitempty" swaggertype:"integer"` }
type Store ¶
type Store interface { Find(ctx context.Context, r ListRequest) (*AggregationResult, error) GetOneBy(ctx context.Context, id string) (*Response, error) Insert(ctx context.Context, r CreateRequest) (*Response, error) Update(ctx context.Context, id string, r EditRequest) (*Response, error) Delete(ctx context.Context, id, userID string) (bool, error) GetTemplates(ctx context.Context) ([]Template, error) }
type Template ¶
type Template struct { ID string `bson:"_id" json:"_id"` Name string `bson:"name" json:"name"` Description string `bson:"description" json:"description"` Permissions []Permission `bson:"permissions" json:"permissions"` }
type Validator ¶
Click to show internal directories.
Click to hide internal directories.