metricsgroupaction

package
v0.0.0-...-a65319e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 8, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActionsConfiguration

type ActionsConfiguration struct {
	util.BaseModel
	MetricsGroupActionID uuid.UUID `json:"-"`
	Repeatable           bool      `json:"repeatable"`
	NumberOfCycles       int16     `json:"numberOfCycles"`
}

type ActionsExecutions

type ActionsExecutions struct {
	util.BaseModel
	GroupActionID uuid.UUID  `json:"groupActionId"`
	ExecutionLog  string     `json:"executionLog"`
	Status        string     `json:"status"`
	StartedAt     *time.Time `json:"startedAt"`
	FinishedAt    *time.Time `json:"finishedAt"`
}

type GroupActionExecutionStatusResume

type GroupActionExecutionStatusResume struct {
	ID         string     `json:"id"`
	Nickname   string     `json:"nickname"`
	ActionType string     `json:"actionType"`
	Status     string     `json:"status"`
	StartedAt  *time.Time `json:"triggeredAt"`
}

type Main

type Main struct {
	// contains filtered or unexported fields
}

func (Main) CreateNewExecution

func (main Main) CreateNewExecution(groupActionID string) (ActionsExecutions, errors.Error)

func (Main) DeleteGroupAction

func (main Main) DeleteGroupAction(id string) errors.Error

func (Main) FindGroupActionByID

func (main Main) FindGroupActionByID(id string) (MetricsGroupAction, errors.Error)

func (Main) ListGroupActionExecutionResumeByGroup

func (main Main) ListGroupActionExecutionResumeByGroup(groupID string) ([]GroupActionExecutionStatusResume, errors.Error)

func (Main) ParseGroupAction

func (main Main) ParseGroupAction(metricsGroupAction io.ReadCloser) (MetricsGroupAction, errors.Error)

func (Main) SaveGroupAction

func (main Main) SaveGroupAction(metricsGroupAction MetricsGroupAction) (MetricsGroupAction, errors.Error)

func (Main) SetExecutionFailed

func (main Main) SetExecutionFailed(actionExecutionID string, executionLog string) (ActionsExecutions, errors.Error)

func (Main) SetExecutionSuccess

func (main Main) SetExecutionSuccess(actionExecutionID string, executionLog string) (ActionsExecutions, errors.Error)

func (Main) UpdateGroupAction

func (main Main) UpdateGroupAction(id string, metricsGroupAction MetricsGroupAction) (MetricsGroupAction, errors.Error)

func (Main) ValidateActionCanBeExecuted

func (main Main) ValidateActionCanBeExecuted(metricsGroupAction MetricsGroupAction) bool

func (Main) ValidateGroupAction

func (main Main) ValidateGroupAction(metricsGroupAction MetricsGroupAction, workspaceID uuid.UUID) errors.ErrorList

type MetricsGroupAction

type MetricsGroupAction struct {
	util.BaseModel
	MetricsGroupID       uuid.UUID            `json:"metricsGroupId"`
	ActionID             uuid.UUID            `json:"actionId"`
	Nickname             string               `json:"nickname"`
	ExecutionParameters  json.RawMessage      `json:"executionParameters"`
	ActionsConfiguration ActionsConfiguration `json:"configuration"`
	DeletedAt            *time.Time           `json:"-"`
}

type UseCases

type UseCases interface {
	ValidateGroupAction(metricsGroupAction MetricsGroupAction, workspaceID uuid.UUID) errors.ErrorList
	ParseGroupAction(metricsGroupAction io.ReadCloser) (MetricsGroupAction, errors.Error)
	FindGroupActionByID(id string) (MetricsGroupAction, errors.Error)
	SaveGroupAction(metricsGroupAction MetricsGroupAction) (MetricsGroupAction, errors.Error)
	ListGroupActionExecutionResumeByGroup(groupID string) ([]GroupActionExecutionStatusResume, errors.Error)
	UpdateGroupAction(id string, metricsGroupAction MetricsGroupAction) (MetricsGroupAction, errors.Error)
	DeleteGroupAction(id string) errors.Error
	SetExecutionFailed(actionExecutionID string, executionLog string) (ActionsExecutions, errors.Error)
	SetExecutionSuccess(actionExecutionID string, executionLog string) (ActionsExecutions, errors.Error)
	ValidateActionCanBeExecuted(metricsGroupAction MetricsGroupAction) bool
	CreateNewExecution(groupActionID string) (ActionsExecutions, errors.Error)
}

func NewMain

func NewMain(db *gorm.DB, pluginRepo plugin.UseCases, actionRepo action.UseCases) UseCases

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL