avs

package
v0.0.0-...-6d4a0cd Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2020 License: Apache-2.0, Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefinitionType = "BASIC"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BasicEvaluationCreateRequest

type BasicEvaluationCreateRequest struct {
	DefinitionType   string `json:"definition_type"`
	Name             string `json:"name"`
	Description      string `json:"description"`
	Service          string `json:"service"`
	URL              string `json:"url"`
	CheckType        string `json:"check_type"`
	Interval         int32  `json:"interval"`
	TesterAccessId   int64  `json:"tester_access_id"`
	Timeout          int    `json:"timeout"`
	ReadOnly         bool   `json:"read_only"`
	ContentCheck     string `json:"content_check"`
	ContentCheckType string `json:"content_check_type"`
	Threshold        string `json:"threshold"`
	GroupId          int64  `json:"group_id"`
	Visibility       string `json:"visibility"`
	ParentId         int64  `json:"parent_id"`
}

type BasicEvaluationCreateResponse

type BasicEvaluationCreateResponse struct {
	DefinitionType   string `json:"definition_type"`
	Name             string `json:"name"`
	Description      string `json:"description"`
	Service          string `json:"service"`
	URL              string `json:"url"`
	CheckType        string `json:"check_type"`
	Interval         int32  `json:"interval"`
	TesterAccessId   int64  `json:"tester_access_id"`
	Timeout          int    `json:"timeout"`
	ReadOnly         bool   `json:"read_only"`
	ContentCheck     string `json:"content_check"`
	ContentCheckType string `json:"content_check_type"`
	Threshold        int64  `json:"threshold"`
	GroupId          int64  `json:"group_id"`
	Visibility       string `json:"visibility"`

	DateCreated                int64    `json:"dateCreated"`
	DateChanged                int64    `json:"dateChanged"`
	Owner                      string   `json:"owner"`
	Status                     string   `json:"status"`
	Alerts                     []int    `json:"alerts"`
	Tags                       []string `json:"tags"`
	Id                         int64    `json:"id"`
	LegacyCheckId              int64    `json:"legacy_check_id"`
	InternalInterval           int64    `json:"internal_interval"`
	AuthType                   string   `json:"auth_type"`
	IndividualOutageEventsOnly bool     `json:"individual_outage_events_only"`
	IdOnTester                 string   `json:"id_on_tester"`
}

type Config

type Config struct {
	OauthTokenEndpoint     string
	OauthUsername          string
	OauthPassword          string
	OauthClientId          string
	ApiEndpoint            string
	DefinitionType         string `envconfig:"default=BASIC"`
	ApiKey                 string
	Disabled               bool `envconfig:"default=false"`
	InternalTesterAccessId int64
	GroupId                int64
	ExternalTesterAccessId int64
	ParentId               int64
}

type Delegator

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

func NewDelegator

func NewDelegator(avsConfig Config, operationsStorage storage.Operations) *Delegator

func (*Delegator) CreateEvaluation

func (del *Delegator) CreateEvaluation(logger logrus.FieldLogger, operation internal.ProvisioningOperation, evalAssistant EvalAssistant, url string) (internal.ProvisioningOperation, time.Duration, error)

func (*Delegator) DeleteAvsEvaluation

func (del *Delegator) DeleteAvsEvaluation(deProvisioningOperation internal.DeprovisioningOperation, logger logrus.FieldLogger, assistant EvalAssistant) (internal.DeprovisioningOperation, error)

type EvalAssistant

type EvalAssistant interface {
	CreateBasicEvaluationRequest(operations internal.ProvisioningOperation, configForModel *configForModel, url string) (*BasicEvaluationCreateRequest, error)
	AppendOverrides(inputCreator internal.ProvisionInputCreator, evaluationId int64)
	IsAlreadyCreated(lifecycleData internal.AvsLifecycleData) bool
	SetEvalId(lifecycleData *internal.AvsLifecycleData, evalId int64)
	IsAlreadyDeleted(lifecycleData internal.AvsLifecycleData) bool
	GetEvaluationId(lifecycleData internal.AvsLifecycleData) int64
	// contains filtered or unexported methods
}

type ExternalEvalAssistant

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

func NewExternalEvalAssistant

func NewExternalEvalAssistant(avsConfig Config) *ExternalEvalAssistant

func (*ExternalEvalAssistant) AppendOverrides

func (eea *ExternalEvalAssistant) AppendOverrides(inputCreator internal.ProvisionInputCreator, evaluationId int64)

func (*ExternalEvalAssistant) CreateBasicEvaluationRequest

func (eea *ExternalEvalAssistant) CreateBasicEvaluationRequest(operations internal.ProvisioningOperation, configForModel *configForModel, url string) (*BasicEvaluationCreateRequest, error)

func (*ExternalEvalAssistant) GetEvaluationId

func (eea *ExternalEvalAssistant) GetEvaluationId(lifecycleData internal.AvsLifecycleData) int64

func (*ExternalEvalAssistant) IsAlreadyCreated

func (eea *ExternalEvalAssistant) IsAlreadyCreated(lifecycleData internal.AvsLifecycleData) bool

func (*ExternalEvalAssistant) IsAlreadyDeleted

func (eea *ExternalEvalAssistant) IsAlreadyDeleted(lifecycleData internal.AvsLifecycleData) bool

func (*ExternalEvalAssistant) ProvideCheckType

func (eea *ExternalEvalAssistant) ProvideCheckType() string

func (*ExternalEvalAssistant) ProvideSuffix

func (eea *ExternalEvalAssistant) ProvideSuffix() string

func (*ExternalEvalAssistant) ProvideTesterAccessId

func (eea *ExternalEvalAssistant) ProvideTesterAccessId() int64

func (*ExternalEvalAssistant) SetEvalId

func (eea *ExternalEvalAssistant) SetEvalId(lifecycleData *internal.AvsLifecycleData, evalId int64)

type InternalEvalAssistant

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

func NewInternalEvalAssistant

func NewInternalEvalAssistant(avsConfig Config) *InternalEvalAssistant

func (*InternalEvalAssistant) AppendOverrides

func (iec *InternalEvalAssistant) AppendOverrides(inputCreator internal.ProvisionInputCreator, evaluationId int64)

func (*InternalEvalAssistant) CreateBasicEvaluationRequest

func (iec *InternalEvalAssistant) CreateBasicEvaluationRequest(operations internal.ProvisioningOperation, configForModel *configForModel, url string) (*BasicEvaluationCreateRequest, error)

func (*InternalEvalAssistant) GetEvaluationId

func (iec *InternalEvalAssistant) GetEvaluationId(lifecycleData internal.AvsLifecycleData) int64

func (*InternalEvalAssistant) IsAlreadyCreated

func (iec *InternalEvalAssistant) IsAlreadyCreated(lifecycleData internal.AvsLifecycleData) bool

func (*InternalEvalAssistant) IsAlreadyDeleted

func (iec *InternalEvalAssistant) IsAlreadyDeleted(lifecycleData internal.AvsLifecycleData) bool

func (*InternalEvalAssistant) ProvideCheckType

func (iec *InternalEvalAssistant) ProvideCheckType() string

func (*InternalEvalAssistant) ProvideSuffix

func (iec *InternalEvalAssistant) ProvideSuffix() string

func (*InternalEvalAssistant) ProvideTesterAccessId

func (iec *InternalEvalAssistant) ProvideTesterAccessId() int64

func (*InternalEvalAssistant) SetEvalId

func (iec *InternalEvalAssistant) SetEvalId(lifecycleData *internal.AvsLifecycleData, evalId int64)

type ModelConfigurator

type ModelConfigurator interface {
	ProvideSuffix() string
	ProvideTesterAccessId() int64
	ProvideCheckType() string
}

type RetryConfig

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

Jump to

Keyboard shortcuts

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