Documentation ¶
Index ¶
- Constants
- type ASMAuthResource
- func (auth *ASMAuthResource) ApplyTransition(nextState resourcestatus.ResourceStatus) error
- func (auth *ASMAuthResource) Cleanup() error
- func (auth *ASMAuthResource) Create() error
- func (auth *ASMAuthResource) DesiredTerminal() bool
- func (auth *ASMAuthResource) GetASMDockerAuthConfig(secretID string) (types.AuthConfig, bool)
- func (auth *ASMAuthResource) GetCreatedAt() time.Time
- func (auth *ASMAuthResource) GetDesiredStatus() resourcestatus.ResourceStatus
- func (auth *ASMAuthResource) GetExecutionCredentialsID() string
- func (auth *ASMAuthResource) GetKnownStatus() resourcestatus.ResourceStatus
- func (auth *ASMAuthResource) GetName() string
- func (auth *ASMAuthResource) GetRequiredASMResources() []*apicontainer.ASMAuthData
- func (auth *ASMAuthResource) GetTerminalReason() string
- func (auth *ASMAuthResource) Initialize(resourceFields *taskresource.ResourceFields, taskKnownStatus status.TaskStatus, ...)
- func (auth *ASMAuthResource) KnownCreated() bool
- func (auth *ASMAuthResource) MarshalJSON() ([]byte, error)
- func (auth *ASMAuthResource) NextKnownState() resourcestatus.ResourceStatus
- func (auth *ASMAuthResource) SetAppliedStatus(status resourcestatus.ResourceStatus) bool
- func (auth *ASMAuthResource) SetCreatedAt(createdAt time.Time)
- func (auth *ASMAuthResource) SetDesiredStatus(status resourcestatus.ResourceStatus)
- func (auth *ASMAuthResource) SetKnownStatus(status resourcestatus.ResourceStatus)
- func (auth *ASMAuthResource) StatusString(status resourcestatus.ResourceStatus) string
- func (auth *ASMAuthResource) SteadyState() resourcestatus.ResourceStatus
- func (auth *ASMAuthResource) TerminalStatus() resourcestatus.ResourceStatus
- func (auth *ASMAuthResource) UnmarshalJSON(b []byte) error
- type ASMAuthStatus
Constants ¶
const (
// ResourceName is the name of the ASM auth resource
ResourceName = "asm-auth"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ASMAuthResource ¶
type ASMAuthResource struct {
// contains filtered or unexported fields
}
ASMAuthResource represents private registry credentials as a task resource. These credentials are stored in AWS Secrets Manager
func NewASMAuthResource ¶
func NewASMAuthResource(taskARN string, asmRequirements []*apicontainer.ASMAuthData, executionCredentialsID string, credentialsManager credentials.Manager, asmClientCreator factory.ClientCreator) *ASMAuthResource
NewASMAuthResource creates a new ASMAuthResource object
func (*ASMAuthResource) ApplyTransition ¶
func (auth *ASMAuthResource) ApplyTransition(nextState resourcestatus.ResourceStatus) error
ApplyTransition calls the function required to move to the specified status
func (*ASMAuthResource) Cleanup ¶
func (auth *ASMAuthResource) Cleanup() error
Cleanup removes the asm auth resource created for the task
func (*ASMAuthResource) Create ¶
func (auth *ASMAuthResource) Create() error
Create fetches credentials from ASM
func (*ASMAuthResource) DesiredTerminal ¶
func (auth *ASMAuthResource) DesiredTerminal() bool
DesiredTerminal returns true if the cgroup's desired status is REMOVED
func (*ASMAuthResource) GetASMDockerAuthConfig ¶
func (auth *ASMAuthResource) GetASMDockerAuthConfig(secretID string) (types.AuthConfig, bool)
GetASMDockerAuthConfig retrieves the docker private registry auth data from the task
func (*ASMAuthResource) GetCreatedAt ¶
func (auth *ASMAuthResource) GetCreatedAt() time.Time
GetCreatedAt sets the timestamp for resource's creation time
func (*ASMAuthResource) GetDesiredStatus ¶
func (auth *ASMAuthResource) GetDesiredStatus() resourcestatus.ResourceStatus
GetDesiredStatus safely returns the desired status of the task
func (*ASMAuthResource) GetExecutionCredentialsID ¶
func (auth *ASMAuthResource) GetExecutionCredentialsID() string
GetExecutionCredentialsID returns the execution role's credential ID
func (*ASMAuthResource) GetKnownStatus ¶
func (auth *ASMAuthResource) GetKnownStatus() resourcestatus.ResourceStatus
GetKnownStatus safely returns the currently known status of the task
func (*ASMAuthResource) GetName ¶
func (auth *ASMAuthResource) GetName() string
GetName safely returns the name of the resource
func (*ASMAuthResource) GetRequiredASMResources ¶
func (auth *ASMAuthResource) GetRequiredASMResources() []*apicontainer.ASMAuthData
GetRequiredASMResources returns the list of ASMAuthData that has to be retrieved from AWS Secrets Manager
func (*ASMAuthResource) GetTerminalReason ¶
func (auth *ASMAuthResource) GetTerminalReason() string
GetTerminalReason returns an error string to propagate up through to task state change messages
func (*ASMAuthResource) Initialize ¶
func (auth *ASMAuthResource) Initialize(resourceFields *taskresource.ResourceFields, taskKnownStatus status.TaskStatus, taskDesiredStatus status.TaskStatus)
func (*ASMAuthResource) KnownCreated ¶
func (auth *ASMAuthResource) KnownCreated() bool
KnownCreated returns true if the cgroup's known status is CREATED
func (*ASMAuthResource) MarshalJSON ¶
func (auth *ASMAuthResource) MarshalJSON() ([]byte, error)
MarshalJSON serialises the ASMAuthResource struct to JSON
func (*ASMAuthResource) NextKnownState ¶
func (auth *ASMAuthResource) NextKnownState() resourcestatus.ResourceStatus
NextKnownState returns the state that the resource should progress to based on its `KnownState`.
func (*ASMAuthResource) SetAppliedStatus ¶
func (auth *ASMAuthResource) SetAppliedStatus(status resourcestatus.ResourceStatus) bool
SetAppliedStatus sets the applied status of resource and returns whether the resource is already in a transition
func (*ASMAuthResource) SetCreatedAt ¶
func (auth *ASMAuthResource) SetCreatedAt(createdAt time.Time)
SetCreatedAt sets the timestamp for resource's creation time
func (*ASMAuthResource) SetDesiredStatus ¶
func (auth *ASMAuthResource) SetDesiredStatus(status resourcestatus.ResourceStatus)
SetDesiredStatus safely sets the desired status of the resource
func (*ASMAuthResource) SetKnownStatus ¶
func (auth *ASMAuthResource) SetKnownStatus(status resourcestatus.ResourceStatus)
SetKnownStatus safely sets the currently known status of the resource
func (*ASMAuthResource) StatusString ¶
func (auth *ASMAuthResource) StatusString(status resourcestatus.ResourceStatus) string
StatusString returns the string of the cgroup resource status
func (*ASMAuthResource) SteadyState ¶
func (auth *ASMAuthResource) SteadyState() resourcestatus.ResourceStatus
SteadyState returns the transition state of the resource defined as "ready"
func (*ASMAuthResource) TerminalStatus ¶
func (auth *ASMAuthResource) TerminalStatus() resourcestatus.ResourceStatus
TerminalStatus returns the last transition state of cgroup
func (*ASMAuthResource) UnmarshalJSON ¶
func (auth *ASMAuthResource) UnmarshalJSON(b []byte) error
UnmarshalJSON deserialises the raw JSON to a ASMAuthResource struct
type ASMAuthStatus ¶
type ASMAuthStatus resourcestatus.ResourceStatus
const ( // is the zero state of a task resource ASMAuthStatusNone ASMAuthStatus = iota // represents a task resource which has been created ASMAuthStatusCreated // represents a task resource which has been cleaned up ASMAuthStatusRemoved )
func (*ASMAuthStatus) MarshalJSON ¶
func (as *ASMAuthStatus) MarshalJSON() ([]byte, error)
MarshalJSON overrides the logic for JSON-encoding the ResourceStatus type
func (ASMAuthStatus) String ¶
func (as ASMAuthStatus) String() string
StatusString returns a human readable string representation of this object
func (*ASMAuthStatus) UnmarshalJSON ¶
func (as *ASMAuthStatus) UnmarshalJSON(b []byte) error
UnmarshalJSON overrides the logic for parsing the JSON-encoded ResourceStatus data