providersetup

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2023 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DiagnosticLog

type DiagnosticLog struct {
	Level ahtypes.LogLevel `json:"level" dynamodbav:"level"`
	Msg   string           `json:"msg" dynamodbav:"msg"`
}

type Setup

type Setup struct {
	ID               string                    `json:"id" dynamodbav:"id"`
	Status           types.ProviderSetupStatus `json:"status" dynamodbav:"status"`
	ProviderType     string                    `json:"providerType" dynamodbav:"providerType"`
	ProviderVersion  string                    `json:"providerVersion" dynamodbav:"providerVersion"`
	Steps            []StepOverview            `json:"steps" dynamodbav:"steps"`
	ConfigValues     map[string]string         `json:"configValues" dynamodbav:"configValues"`
	ConfigValidation map[string]Validation     `json:"configValidation" dynamodbav:"configValidation"`
}

func (*Setup) DDBKeys

func (s *Setup) DDBKeys() (ddb.Keys, error)

func (*Setup) ToAPI

func (s *Setup) ToAPI() types.ProviderSetup

func (*Setup) ToProvider

func (s *Setup) ToProvider() deploy.Provider

func (*Setup) UpdateValidationStatus

func (s *Setup) UpdateValidationStatus()

UpdateValidationStatus updates the status of the setup based on the validation results. If all the validations pass, the status is changed to VALIDATION_SUCCESS If any of the validations have failed, the status is changed to VALIDATION_FAILURE

type Step

type Step struct {
	SetupID      string                      `json:"setupId" dynamodbav:"setupId"`
	Index        int                         `json:"index" dynamodbav:"index"`
	ConfigFields []types.ProviderConfigField `json:"configFields"  dynamodbav:"configFields"`
	Instructions string                      `json:"instructions" dynamodbav:"instructions"`
	Title        string                      `json:"title" dynamodbav:"title"`
}

Step is an instruction step which is saved to DynamoDB. We cache these steps in the database to avoid re-rendering them every time the guided setup page is opened, as they are time-consuming to create.

func BuildStepFromParsedInstructions

func BuildStepFromParsedInstructions(providerID string, index int, s psetup.Step) Step

func (*Step) DDBKeys

func (s *Step) DDBKeys() (ddb.Keys, error)

func (*Step) ToAPI

func (s *Step) ToAPI() types.ProviderSetupStepDetails

type StepOverview

type StepOverview struct {
	Complete bool `json:"complete" dynamodbav:"complete"`
}

type Validation

type Validation struct {
	Name            string                                 `json:"name" dynamodbav:"name"`
	Status          ahtypes.ProviderConfigValidationStatus `json:"status" dynamodbav:"status"`
	FieldsValidated []string                               `json:"fieldsValidated" dynamodbav:"fieldsValidated"`
	Logs            []DiagnosticLog                        `json:"logs" dynamodbav:"logs"`
}

Jump to

Keyboard shortcuts

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