Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
Types ¶
type AggregationResult ¶
type AggregationResult struct { Data []ViewGroup `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 ListRequest ¶
type ListRequest struct { pagination.Query Search string `form:"search" json:"search"` WithViews bool `form:"with_views" json:"with_views"` WithTabs bool `form:"with_tabs" json:"with_tabs"` WithWidgets bool `form:"with_widgets" json:"with_widgets"` WithFlags bool `form:"with_flags" json:"with_flags"` WithPrivate bool `form:"with_private" json:"with_private"` UserID string `form:"-" json:"-"` }
type Store ¶
type Store interface { Find(ctx context.Context, r ListRequest, authorizedViewIds, ownedPrivateIds []string) (*AggregationResult, error) GetOneBy(ctx context.Context, id string) (*ViewGroup, error) Insert(ctx context.Context, r EditRequest) (*ViewGroup, error) Update(ctx context.Context, r EditRequest) (*ViewGroup, error) Delete(ctx context.Context, id, userID string) (bool, error) }
type Validator ¶
type ViewGroup ¶
type ViewGroup struct { ID string `bson:"_id" json:"_id,omitempty"` Title string `bson:"title" json:"title"` Author *author.Author `bson:"author" json:"author,omitempty"` Views *[]view.Response `bson:"views,omitempty" json:"views,omitempty"` Created *datetime.CpsTime `bson:"created" json:"created,omitempty" swaggertype:"integer"` Updated *datetime.CpsTime `bson:"updated" json:"updated,omitempty" swaggertype:"integer"` Deletable *bool `bson:"deletable,omitempty" json:"deletable,omitempty"` IsPrivate bool `bson:"is_private" json:"is_private"` }
Click to show internal directories.
Click to hide internal directories.