Documentation ¶
Index ¶
- Variables
- func ValidateEditPositionRequest(sl validator.StructLevel)
- type API
- type EditPositionItemRequest
- type EditPositionRequest
- type EditRequest
- type ExportRequest
- type ExportResponse
- type ExportViewGroupResponse
- type ImportItemRequest
- type ImportRequest
- type Response
- type Store
- type ValidationError
- type ViewGroup
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func ValidateEditPositionRequest ¶
func ValidateEditPositionRequest(sl validator.StructLevel)
Types ¶
type API ¶
type EditPositionItemRequest ¶
type EditPositionRequest ¶
type EditPositionRequest struct {
Items []EditPositionItemRequest `json:"items" binding:"required,notblank,dive"`
}
func (EditPositionRequest) MarshalJSON ¶
func (r EditPositionRequest) MarshalJSON() ([]byte, error)
func (*EditPositionRequest) UnmarshalJSON ¶
func (r *EditPositionRequest) UnmarshalJSON(b []byte) error
type EditRequest ¶
type EditRequest struct { ID string `json:"-"` Enabled *bool `json:"enabled" binding:"required"` Title string `json:"title" binding:"required,max=255"` Description string `json:"description" binding:"max=255"` Group string `json:"group" binding:"required"` Tags []string `json:"tags"` Author string `json:"author" swaggerignore:"true"` PeriodicRefresh *datetime.DurationWithEnabled `json:"periodic_refresh"` }
type ExportRequest ¶
type ExportResponse ¶
type ExportResponse struct { Groups []ExportViewGroupResponse `json:"groups"` Views []Response `json:"views"` }
type ExportViewGroupResponse ¶
type ImportItemRequest ¶
type ImportRequest ¶
type ImportRequest struct {
Items []ImportItemRequest `json:"items" binding:"required,notblank,dive"`
}
func (ImportRequest) MarshalJSON ¶
func (r ImportRequest) MarshalJSON() ([]byte, error)
func (*ImportRequest) UnmarshalJSON ¶
func (r *ImportRequest) UnmarshalJSON(b []byte) error
type Response ¶
type Response struct { ID string `bson:"_id" json:"_id,omitempty"` Enabled bool `bson:"enabled" json:"enabled"` Title string `bson:"title" json:"title"` Description string `bson:"description" json:"description"` Tabs *[]viewtab.Response `bson:"tabs" json:"tabs,omitempty"` Tags []string `bson:"tags" json:"tags"` PeriodicRefresh *datetime.DurationWithEnabled `bson:"periodic_refresh" json:"periodic_refresh"` Group *ViewGroup `bson:"group" json:"group,omitempty"` Author *author.Author `bson:"author" json:"author,omitempty"` Created *datetime.CpsTime `bson:"created" json:"created,omitempty" swaggertype:"integer"` Updated *datetime.CpsTime `bson:"updated" json:"updated,omitempty" swaggertype:"integer"` IsPrivate bool `bson:"is_private" json:"is_private"` }
type Store ¶
type Store interface { GetOneBy(ctx context.Context, id string) (*Response, error) Insert(ctx context.Context, r EditRequest, withDefaultTab bool) (*Response, error) Update(ctx context.Context, r EditRequest) (*Response, error) // UpdatePositions receives some groups and views with updated positions and updates // positions for all groups and views in db and moves views to another groups if necessary. UpdatePositions(ctx context.Context, r EditPositionRequest) (bool, error) Delete(ctx context.Context, id, userID string) (bool, error) Copy(ctx context.Context, id string, r EditRequest) (*Response, error) Export(ctx context.Context, r ExportRequest) (ExportResponse, error) Import(ctx context.Context, r ImportRequest, userID string) error }
type ValidationError ¶
type ValidationError struct {
// contains filtered or unexported fields
}
func (ValidationError) Error ¶
func (v ValidationError) Error() string
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"` Created *datetime.CpsTime `bson:"created" json:"created,omitempty" swaggertype:"integer"` Updated *datetime.CpsTime `bson:"updated" json:"updated,omitempty" swaggertype:"integer"` }
Click to show internal directories.
Click to hide internal directories.