resources

package
v0.0.0-alpha9 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var IndividualT *testing.T
View Source
var MergeableT *testing.T

Functions

func SetupIndividualType

func SetupIndividualType(t *testing.T, individualFuncCalls []IndividualFuncCall)

func SetupMergeableType

func SetupMergeableType(t *testing.T, individualFuncCalls []MergeableFuncCall)

Types

type Individual

type Individual struct{}

func (Individual) Configure

func (i Individual) Configure(
	ctx context.Context, hst host.Host, name resource.Name, state resource.State,
) error

func (Individual) Destroy

func (i Individual) Destroy(ctx context.Context, hst host.Host, name resource.Name) error

func (Individual) GetState

func (i Individual) GetState(ctx context.Context, hst host.Host, name resource.Name) (resource.State, error)

func (Individual) ValidateName

func (i Individual) ValidateName(name resource.Name) error

type IndividualFuncCall

type IndividualFuncCall struct {
	ValidateName *IndividualFuncValidateName
	GetState     *IndividualFuncGetState
	Configure    *IndividualFuncConfigure
	Destroy      *IndividualFuncDestroy
}

func (IndividualFuncCall) String

func (ifc IndividualFuncCall) String() string

type IndividualFuncCalls

type IndividualFuncCalls []IndividualFuncCall
var IndividualExpectedFuncCalls IndividualFuncCalls

func (IndividualFuncCalls) String

func (ifcs IndividualFuncCalls) String() string

type IndividualFuncConfigure

type IndividualFuncConfigure struct {
	Name        resource.Name
	State       resource.State
	ReturnError error
}

func (IndividualFuncConfigure) String

func (ifc IndividualFuncConfigure) String() string

type IndividualFuncDestroy

type IndividualFuncDestroy struct {
	Name        resource.Name
	ReturnError error
}

func (IndividualFuncDestroy) String

func (ifd IndividualFuncDestroy) String() string

type IndividualFuncGetState

type IndividualFuncGetState struct {
	Name        resource.Name
	ReturnState resource.State
	ReturnError error
}

func (IndividualFuncGetState) String

func (ifgs IndividualFuncGetState) String() string

type IndividualFuncValidateName

type IndividualFuncValidateName struct {
	Name        resource.Name
	ReturnError error
}

func (IndividualFuncValidateName) String

func (ifvn IndividualFuncValidateName) String() string

type IndividualState

type IndividualState struct {
	Value string
}

func (IndividualState) ValidateAndUpdate

func (is IndividualState) ValidateAndUpdate(ctx context.Context, hst host.Host) (resource.State, error)

type Mergeable

type Mergeable struct{}

func (Mergeable) ConfigureAll

func (m Mergeable) ConfigureAll(
	ctx context.Context, hst host.Host,
	actionNameStateMap map[resource.Action]map[resource.Name]resource.State,
) error

func (Mergeable) GetStates

func (m Mergeable) GetStates(
	ctx context.Context, hst host.Host,
	names []resource.Name,
) (map[resource.Name]resource.State, error)

func (Mergeable) ValidateName

func (m Mergeable) ValidateName(name resource.Name) error

type MergeableFuncCall

type MergeableFuncCall struct {
	ValidateName *MergeableFuncValidateName
	GetStates    *MergeableFuncGetStates
	ConfigureAll *MergeableFuncConfigureAll
}

func (MergeableFuncCall) String

func (mfc MergeableFuncCall) String() string

type MergeableFuncCalls

type MergeableFuncCalls []MergeableFuncCall
var MergeableExpectedFuncCalls MergeableFuncCalls

func (MergeableFuncCalls) String

func (mfcs MergeableFuncCalls) String() string

type MergeableFuncConfigureAll

type MergeableFuncConfigureAll struct {
	ActionNameStateMap map[resource.Action]map[resource.Name]resource.State
	ReturnError        error
}

func (MergeableFuncConfigureAll) String

func (mfca MergeableFuncConfigureAll) String() string

type MergeableFuncDestroy

type MergeableFuncDestroy struct {
	Name        resource.Name
	ReturnError error
}

func (MergeableFuncDestroy) String

func (ifd MergeableFuncDestroy) String() string

type MergeableFuncGetStates

type MergeableFuncGetStates struct {
	Names              []resource.Name
	ReturnNameStateMap map[resource.Name]resource.State
	ReturnError        error
}

func (MergeableFuncGetStates) String

func (mfgs MergeableFuncGetStates) String() string

type MergeableFuncValidateName

type MergeableFuncValidateName struct {
	Name        resource.Name
	ReturnError error
}

func (MergeableFuncValidateName) String

func (mfvn MergeableFuncValidateName) String() string

type MergeableState

type MergeableState struct {
	Value string
}

func (MergeableState) ValidateAndUpdate

func (ms MergeableState) ValidateAndUpdate(ctx context.Context, hst host.Host) (resource.State, error)

Jump to

Keyboard shortcuts

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