credentialspec

package
v1.36.0 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ResourceName is the name of the credentialspec resource
	ResourceName = "credentialspec"
)

Variables

View Source
var CredentialSpecStatusMap = map[string]CredentialSpecStatus{
	"NONE":    CredentialSpecStatusNone,
	"CREATED": CredentialSpecCreated,
	"REMOVED": CredentialSpecRemoved,
}

Functions

This section is empty.

Types

type CredentialSpecResource

type CredentialSpecResource struct {
}

CredentialSpecResource is the abstraction for credentialspec resources

func NewCredentialSpecResource

func NewCredentialSpecResource(taskARN, region string,
	credentialSpecs []string,
	executionCredentialsID string,
	credentialsManager credentials.Manager,
	ssmClientCreator ssmfactory.SSMClientCreator,
	s3ClientCreator s3factory.S3ClientCreator) (*CredentialSpecResource, error)

NewCredentialSpecResource creates a new CredentialSpecResource object

func (*CredentialSpecResource) ApplyTransition

func (cs *CredentialSpecResource) ApplyTransition(nextState resourcestatus.ResourceStatus) error

ApplyTransition calls the function required to move to the specified status

func (*CredentialSpecResource) Cleanup

func (cs *CredentialSpecResource) Cleanup() error

Cleanup removes the credentialspec created for the task

func (*CredentialSpecResource) Create

func (cs *CredentialSpecResource) Create() error

Create is used to create all the credentialspec resources for a given task

func (*CredentialSpecResource) DesiredTerminal

func (cs *CredentialSpecResource) DesiredTerminal() bool

DesiredTerminal returns true if the credentialspec's desired status is REMOVED

func (*CredentialSpecResource) GetCreatedAt

func (cs *CredentialSpecResource) GetCreatedAt() time.Time

GetCreatedAt sets the timestamp for resource's creation time

func (*CredentialSpecResource) GetDesiredStatus

func (cs *CredentialSpecResource) GetDesiredStatus() resourcestatus.ResourceStatus

GetDesiredStatus safely returns the desired status of the task

func (*CredentialSpecResource) GetKnownStatus

GetKnownStatus safely returns the currently known status of the task

func (*CredentialSpecResource) GetName

func (cs *CredentialSpecResource) GetName() string

GetName safely returns the name of the resource

func (*CredentialSpecResource) GetTargetMapping

func (cs *CredentialSpecResource) GetTargetMapping(credSpecInput string) (string, error)

func (*CredentialSpecResource) GetTerminalReason

func (cs *CredentialSpecResource) GetTerminalReason() string

GetTerminalReason returns an error string to propagate up through to task state change messages

func (*CredentialSpecResource) Initialize

func (cs *CredentialSpecResource) Initialize(resourceFields *taskresource.ResourceFields,
	taskKnownStatus status.TaskStatus,
	taskDesiredStatus status.TaskStatus)

func (*CredentialSpecResource) KnownCreated

func (cs *CredentialSpecResource) KnownCreated() bool

KnownCreated returns true if the credentialspec's known status is CREATED

func (*CredentialSpecResource) MarshalJSON

func (cs *CredentialSpecResource) MarshalJSON() ([]byte, error)

MarshalJSON serialises the CredentialSpecResourceJSON struct to JSON

func (*CredentialSpecResource) NextKnownState

NextKnownState returns the state that the resource should progress to based on its `KnownState`.

func (*CredentialSpecResource) SetAppliedStatus

func (cs *CredentialSpecResource) SetAppliedStatus(status resourcestatus.ResourceStatus) bool

SetAppliedStatus sets the applied status of resource and returns whether the resource is already in a transition

func (*CredentialSpecResource) SetCreatedAt

func (cs *CredentialSpecResource) SetCreatedAt(createdAt time.Time)

SetCreatedAt sets the timestamp for resource's creation time

func (*CredentialSpecResource) SetDesiredStatus

func (cs *CredentialSpecResource) SetDesiredStatus(status resourcestatus.ResourceStatus)

SetDesiredStatus safely sets the desired status of the resource

func (*CredentialSpecResource) SetKnownStatus

func (cs *CredentialSpecResource) SetKnownStatus(status resourcestatus.ResourceStatus)

SetKnownStatus safely sets the currently known status of the resource

func (*CredentialSpecResource) StatusString

StatusString returns the string of the cgroup resource status

func (*CredentialSpecResource) SteadyState

SteadyState returns the transition state of the resource defined as "ready"

func (*CredentialSpecResource) TerminalStatus

TerminalStatus returns the last transition state of credentialspec

func (*CredentialSpecResource) UnmarshalJSON

func (cs *CredentialSpecResource) UnmarshalJSON(b []byte) error

UnmarshalJSON deserialises the raw JSON to a CredentialSpecResourceJSON struct

type CredentialSpecStatus

type CredentialSpecStatus resourcestatus.ResourceStatus
const (
	// is the zero state of a task resource
	CredentialSpecStatusNone CredentialSpecStatus = iota
	// represents a task resource which has been created
	CredentialSpecCreated
	// represents a task resource which has been cleaned up
	CredentialSpecRemoved
)

func (*CredentialSpecStatus) MarshalJSON

func (cs *CredentialSpecStatus) MarshalJSON() ([]byte, error)

MarshalJSON overrides the logic for JSON-encoding the ResourceStatus type

func (CredentialSpecStatus) String

func (cs CredentialSpecStatus) String() string

StatusString returns a human readable string representation of this object

func (*CredentialSpecStatus) UnmarshalJSON

func (cs *CredentialSpecStatus) UnmarshalJSON(b []byte) error

UnmarshalJSON overrides the logic for parsing the JSON-encoded ResourceStatus data

Jump to

Keyboard shortcuts

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