Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
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() any
func (*AggregationResult) GetTotal ¶
func (r *AggregationResult) GetTotal() int64
type EditRequest ¶
type PatchRequest ¶
type Response ¶
type Response struct {
ID string `bson:"_id" json:"_id"`
Title string `bson:"title" json:"title"`
Author string `bson:"author,omitempty" json:"author,omitempty"`
Created datetime.CpsTime `bson:"created,omitempty" json:"created,omitzero" swaggertype:"integer"`
Updated datetime.CpsTime `bson:"updated,omitempty" json:"updated,omitzero" swaggertype:"integer"`
Storage string `bson:"storage" json:"-"`
Etag string `bson:"etag" json:"-"`
MimeType string `bson:"mime_type" json:"-"`
Content string `bson:"-" json:"content,omitempty"`
FillBorder bool `bson:"fill_border" json:"fill_border"`
}
type Store ¶
type Store interface {
Create(context.Context, EditRequest) (*Response, error)
Update(context.Context, EditRequest) (*Response, error)
Patch(context.Context, PatchRequest) (*Response, error)
Delete(ctx context.Context, id, userID string) (bool, error)
List(ctx context.Context, query pagination.FilteredQuery) (*AggregationResult, error)
Get(ctx context.Context, id string) (*Response, error)
GetFilepath(model Response) string
}
Source Files
¶
- api.go
- models.go
- store.go
Click to show internal directories.
Click to hide internal directories.