run

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActionRun

type ActionRun string
const (
	VariableCreate ActionRun = "variable_create" // action type variable create in terraform cloud
	VariableDelete ActionRun = "variable_delete" // action type variable delete in terraform cloud
)

type HttpClient

type HttpClient interface {
	NewRequest(method, url string, bodyData io.Reader) ([]byte, error)
}

func NewNetHttpAdapter

func NewNetHttpAdapter(config *utils.ConfigEnv) HttpClient

type IRunBuilder

type IRunBuilder interface {
	GetRunBuilder(ctx context.Context) // variableType string
}

func GetBuilder

func GetBuilder(builderType string) (IRunBuilder, error)

func NewVariableRunBuilder

func NewVariableRunBuilder(config *utils.ConfigEnv, variableType string) IRunBuilder

type ISetting

type ISetting interface {
	Setting() (*model.SettingAPI, error)
}

func NewSetting

func NewSetting(config *utils.ConfigEnv) ISetting

type IVariable

type IVariable interface {
	Create(ctx context.Context) error
	Read(ctx context.Context) (*model.WorkspaceVariables, error)
	Update(ctx context.Context) error
	Delete(ctx context.Context) error
}

func NewVariableRun

func NewVariableRun(client HttpClient, config *utils.ConfigEnv, workspaces IWorkspaces) IVariable

type IWorkspaces

type IWorkspaces interface {
	ShowWorkspace(ctx context.Context) (*model.Workspaces, error)
	ReturnWorkspaceID(ctx context.Context) (string, error)
}

func NewWorkspaceRun

func NewWorkspaceRun(client HttpClient, ISetting ISetting) IWorkspaces

type Inputs

type Inputs struct {
	TfApiToken     string
	TfWorkspace    string
	TfOrganization string
	TfRunType      string

	VariableType        string
	VariableKey         string
	VariableValue       string
	VariableCategory    string
	VariableSensitive   bool
	VariableHcl         bool
	VariableDescription string

	DeleteVariable string
	CreateVariable string
}

type NetHttpAdapter

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

func (*NetHttpAdapter) NewRequest

func (n *NetHttpAdapter) NewRequest(method string, url string, bodyData io.Reader) ([]byte, error)

type Setting

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

func (Setting) Setting

func (s Setting) Setting() (*model.SettingAPI, error)

type VariableRun

type VariableRun struct {
	Config      *utils.ConfigEnv
	HttpClient  HttpClient
	IWorkspaces IWorkspaces
}

func (VariableRun) Create

func (v VariableRun) Create(ctx context.Context) error

func (VariableRun) Delete

func (v VariableRun) Delete(ctx context.Context) error

func (VariableRun) Read

func (VariableRun) Update

func (v VariableRun) Update(ctx context.Context) error

type VariableRunBuilder

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

func (VariableRunBuilder) GetRunBuilder

func (v VariableRunBuilder) GetRunBuilder(ctx context.Context)

type WorkspaceRun

type WorkspaceRun struct {
	ISetting   ISetting
	HttpClient HttpClient
}

func (*WorkspaceRun) ReturnWorkspaceID

func (w *WorkspaceRun) ReturnWorkspaceID(ctx context.Context) (string, error)

func (*WorkspaceRun) ShowWorkspace

func (w *WorkspaceRun) ShowWorkspace(ctx context.Context) (*model.Workspaces, error)

Jump to

Keyboard shortcuts

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