Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API interface { Create(c *gin.Context) Get(c *gin.Context) GetDependencies(c *gin.Context) GetImpacts(c *gin.Context) Update(c *gin.Context) Delete(c *gin.Context) BulkCreate(c *gin.Context) BulkUpdate(c *gin.Context) BulkDelete(c *gin.Context) }
func NewApi ¶
func NewApi( store Store, serviceChangeListener chan<- entityservice.ChangeEntityMessage, metricMetaUpdater metrics.MetaUpdater, transformer common.PatternFieldsTransformer, logger zerolog.Logger, ) API
type BulkDeleteRequestItem ¶
type BulkDeleteRequestItem struct {
ID string `json:"_id" binding:"required"`
}
type BulkUpdateRequestItem ¶
type BulkUpdateRequestItem struct { EditRequest ID string `json:"_id" binding:"required"` }
type ContextGraphAggregationResult ¶
type ContextGraphAggregationResult struct { Data []ContextGraphEntity `bson:"data"` TotalCount int64 `bson:"total_count" json:"total_count"` }
func (*ContextGraphAggregationResult) GetData ¶
func (r *ContextGraphAggregationResult) GetData() interface{}
func (*ContextGraphAggregationResult) GetTotal ¶
func (r *ContextGraphAggregationResult) GetTotal() int64
type ContextGraphEntity ¶
type ContextGraphEntity struct { entity.Entity `bson:",inline"` StateDependsCount *int `bson:"state_depends_count" json:"state_depends_count,omitempty"` StateSetting *StateSettingResponse `bson:"state_setting" json:"state_setting,omitempty"` }
type ContextGraphRequest ¶
type ContextGraphRequest struct { pagination.Query entity.SortRequest ID string `form:"_id" json:"_id"` Search string `form:"search" json:"search"` Category string `form:"category" json:"category"` WithFlags bool `form:"with_flags" json:"with_flags"` // Show dependencies defining the state of the entity DefineState bool `form:"define_state" json:"define_state"` }
type CreateRequest ¶
type CreateRequest struct { EditRequest ID string `json:"_id" binding:"id"` }
type EditRequest ¶
type EditRequest struct { ID string `json:"-"` Name string `json:"name" binding:"required,max=255"` Author string `json:"author" swaggerignore:"true"` Enabled *bool `json:"enabled" binding:"required"` OutputTemplate string `json:"output_template" binding:"required,max=500"` Category string `json:"category"` ImpactLevel int64 `json:"impact_level" binding:"required,min=1,max=10"` Infos []entity.InfoRequest `json:"infos" binding:"dive"` SliAvailState *int64 `json:"sli_avail_state" binding:"required,min=0,max=3"` Coordinates *types.Coordinates `json:"coordinates"` common.EntityPatternFieldsRequest }
type Response ¶
type Response struct { entity.Entity `bson:",inline"` OutputTemplate string `bson:"output_template" json:"output_template"` SliAvailState int64 `bson:"sli_avail_state" json:"sli_avail_state"` Author *author.Author `bson:"author" json:"author"` savedpattern.EntityPatternFields `bson:",inline"` }
type StateSettingResponse ¶
type Store ¶
type Store interface { GetOneBy(ctx context.Context, id string) (*Response, error) GetDependencies(ctx context.Context, r ContextGraphRequest, userID string) (*ContextGraphAggregationResult, error) GetImpacts(ctx context.Context, r ContextGraphRequest, userID string) (*ContextGraphAggregationResult, error) Create(ctx context.Context, request CreateRequest) (*Response, error) Update(ctx context.Context, request UpdateRequest) (*Response, ServiceChanges, error) Delete(ctx context.Context, id, userID string) (bool, error) }
type UpdateRequest ¶
type UpdateRequest struct { EditRequest ID string `json:"-"` }
Click to show internal directories.
Click to hide internal directories.