Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AggregationResult ¶
type AggregationResult struct { Data []StateSetting `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 JUnitThresholds ¶
type JUnitThresholds struct { Skipped StateThresholds `json:"skipped" bson:"skipped" binding:"required"` Errors StateThresholds `json:"errors" bson:"errors" binding:"required"` Failures StateThresholds `json:"failures" bson:"failures" binding:"required"` }
type StateSetting ¶
type StateSetting struct { ID string `json:"_id" bson:"_id"` Method string `json:"method" bson:"method"` Type string `json:"type" bson:"type"` JunitThresholds *JUnitThresholds `json:"junit_thresholds,omitempty" bson:"junit_thresholds,omitempty"` }
type StateSettingRequest ¶
type StateSettingRequest struct { ID string `json:"-" bson:"-"` Method string `json:"method" bson:"method" binding:"required"` Type string `json:"type" bson:"type" binding:"required"` JunitThresholds *JUnitThresholds `json:"junit_thresholds,omitempty" bson:"junit_thresholds,omitempty"` }
type StateThresholds ¶
type StateThresholds struct { Minor float64 `json:"minor" bson:"minor" binding:"required,numeric,gte=0,lte=100,ltefield=Major,ltefield=Critical"` Major float64 `json:"major" bson:"major" binding:"required,numeric,gte=0,lte=100,ltefield=Critical"` Critical float64 `json:"critical" bson:"critical" binding:"required,numeric,gte=0,lte=100"` Type *int `json:"type" bson:"type" binding:"required"` }
type Store ¶
type Store interface { Find(query pagination.Query) (AggregationResult, error) Update(request StateSettingRequest) (*StateSetting, error) }
type Validator ¶
type Validator interface { ValidateStateSettingRequest(sl validator.StructLevel) ValidateStateThresholds(sl validator.StructLevel) }
func NewValidator ¶
func NewValidator() Validator
Click to show internal directories.
Click to hide internal directories.