Documentation ¶
Index ¶
- func ValidateEditPositionRequest(sl validator.StructLevel)
- func ValidateWidgetParametersJunitRequest(sl validator.StructLevel)
- type API
- type AggregationResult
- type BaseEditRequest
- type BulkCreateRequest
- type BulkDeleteRequest
- type BulkUpdateRequest
- type BulkUpdateRequestItem
- type EditPositionItemRequest
- type EditPositionRequest
- type EditRequest
- type ListRequest
- type Store
- type TabRequest
- type Validator
- type WidgetParametersJunitRequest
- type WidgetRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateEditPositionRequest ¶
func ValidateEditPositionRequest(sl validator.StructLevel)
func ValidateWidgetParametersJunitRequest ¶
func ValidateWidgetParametersJunitRequest(sl validator.StructLevel)
Types ¶
type AggregationResult ¶
type AggregationResult struct { Data []viewgroup.View `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 BaseEditRequest ¶
type BaseEditRequest struct { 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"` Tabs []TabRequest `json:"tabs" binding:"dive"` Tags []string `json:"tags"` PeriodicRefresh *types.DurationWithEnabled `json:"periodic_refresh"` Author string `json:"author" swaggerignore:"true"` }
type BulkCreateRequest ¶
type BulkCreateRequest struct {
Items []EditRequest `binding:"required,notblank,dive"`
}
func (BulkCreateRequest) MarshalJSON ¶
func (r BulkCreateRequest) MarshalJSON() ([]byte, error)
func (*BulkCreateRequest) UnmarshalJSON ¶
func (r *BulkCreateRequest) UnmarshalJSON(b []byte) error
type BulkDeleteRequest ¶
type BulkDeleteRequest struct {
IDs []string `form:"ids[]" binding:"required,notblank"`
}
type BulkUpdateRequest ¶
type BulkUpdateRequest struct {
Items []BulkUpdateRequestItem `binding:"required,notblank,dive"`
}
func (BulkUpdateRequest) MarshalJSON ¶
func (r BulkUpdateRequest) MarshalJSON() ([]byte, error)
func (*BulkUpdateRequest) UnmarshalJSON ¶
func (r *BulkUpdateRequest) UnmarshalJSON(b []byte) error
type BulkUpdateRequestItem ¶
type BulkUpdateRequestItem struct { BaseEditRequest ID string `json:"_id" binding:"required"` }
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 { BaseEditRequest ID string `json:"-"` }
type ListRequest ¶
type ListRequest struct { pagination.Query Search string `form:"search"` Ids []string `form:"-"` }
type Store ¶
type Store interface { Find(r ListRequest) (*AggregationResult, error) GetOneBy(r string) (*viewgroup.View, error) Insert(userID string, r []EditRequest) ([]viewgroup.View, error) Update([]BulkUpdateRequestItem) ([]viewgroup.View, 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(r EditPositionRequest) (bool, error) Delete(id []string) (bool, error) }
type TabRequest ¶
type TabRequest struct { ID string `json:"_id" binding:"required,max=255"` Title string `json:"title" binding:"required,max=255"` Widgets []WidgetRequest `json:"widgets" binding:"dive"` }
type Validator ¶
func NewValidator ¶
type WidgetParametersJunitRequest ¶
type WidgetParametersJunitRequest struct { IsAPI bool `json:"is_api" mapstructure:"is_api"` Directory string `json:"directory" mapstructure:"directory"` ScreenshotDirectories []string `json:"screenshot_directories" mapstructure:"screenshot_directories"` VideoDirectories []string `json:"video_directories" mapstructure:"video_directories"` ScreenshotFilemask string `json:"screenshot_filemask" mapstructure:"screenshot_filemask"` VideoFilemask string `json:"video_filemask" mapstructure:"video_filemask"` RemainParameters map[string]interface{} `json:"-" mapstructure:",remain"` }
func (WidgetParametersJunitRequest) MarshalJSON ¶
func (w WidgetParametersJunitRequest) MarshalJSON() ([]byte, error)
type WidgetRequest ¶
type WidgetRequest struct { ID string `json:"_id" binding:"required,max=255"` Title string `json:"title" binding:"max=255"` Type string `json:"type" binding:"required,max=255"` GridParameters map[string]interface{} `json:"grid_parameters"` Parameters interface{} `json:"parameters"` }
func (*WidgetRequest) UnmarshalJSON ¶
func (w *WidgetRequest) UnmarshalJSON(b []byte) error
Click to show internal directories.
Click to hide internal directories.