api

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

type Command struct {
	Name       string
	Inputs     []string
	OutputType string
}

type CommandOutput

type CommandOutput struct {
	Type   *Type
	Output interface{}
}

type DredgefileCallbacks

type DredgefileCallbacks interface {
	AddVariablesToDredgefile(variable map[string]string) error
	AddWorkflowToDredgefile(workflow config.Workflow) error
	AddBucketToDredgefile(bucket config.Bucket) error
	AddProviderToDredgefile(resource, provider string, providerConfig map[string]string) error
	RelativePathFromDredgefile(path string) (string, error)
}

type ExecutionCallbacks

type ExecutionCallbacks interface {
	ExecuteResourceCommand(resource string, command string) (*CommandOutput, error)
	SetEnv(name string, value interface{}) error
	Template(input string) (string, error)
}

type Field

type Field struct {
	Name        string
	Description string
	Type        string
}

type InputRequest

type InputRequest struct {
	Name         string
	Description  string
	Type         InputType
	Values       []string
	DefaultValue string
}

type InputType

type InputType int
const (
	Text InputType = iota
	Select
)

func (InputType) String

func (i InputType) String() string

type LogLevel

type LogLevel int
const (
	Fatal LogLevel = iota
	Error
	Warn
	Info
	Debug
	Trace
)

func (LogLevel) String

func (l LogLevel) String() string

type NoResult

type NoResult struct{}

func (*NoResult) Error

func (n *NoResult) Error() string

type ResourceDefinition

type ResourceDefinition struct {
	Name     string
	Fields   []Field
	Commands []Command
}

func (*ResourceDefinition) GetCommand

func (r *ResourceDefinition) GetCommand(name string) (*Command, error)

type Type

type Type struct {
	Name    string
	IsArray bool
	Fields  []Field
}

type UserInteractionCallbacks

type UserInteractionCallbacks interface {
	Log(level LogLevel, msg string, args ...interface{}) error
	Confirm(msg string, args ...interface{}) (bool, error)
	RequestInput(inputRequests []InputRequest) (map[string]string, error)
	OpenUrl(url string) error
}

Jump to

Keyboard shortcuts

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