Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
Types ¶
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 Category ¶
type Category struct { ID string `bson:"_id" json:"_id"` Name string `bson:"name" json:"name"` Author string `bson:"author" json:"author"` Created *datetime.CpsTime `bson:"created" json:"created" swaggertype:"integer"` Updated *datetime.CpsTime `bson:"updated" json:"updated" swaggertype:"integer"` }
type EditRequest ¶
type ListRequest ¶
type ListRequest struct { pagination.FilteredQuery SortBy string `form:"sort_by" binding:"oneoforempty=name created"` }
type Response ¶
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 EditRequest) (*Response, error) Update(ctx context.Context, r EditRequest) (*Response, error) Delete(ctx context.Context, id, userID string) (bool, error) }
Click to show internal directories.
Click to hide internal directories.