dao

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLocalTimeZone added in v0.1.1

func GetLocalTimeZone() (string, error)

func IsFuzzySelector

func IsFuzzySelector(s string) bool

IsFuzzySelector checks if filter is fuzzy or not.

Types

type Accessor

type Accessor interface {
	Lister
	Getter
}

type Alias

type Alias struct {
	*config.Aliases
}

Alias tracks standard and custom command aliases.

func NewAlias

func NewAlias() *Alias

NewAlias returns a new set of aliases.

func (*Alias) AsResource

func (a *Alias) AsResource(cmd string) (string, bool)

AsResource returns a matching resource if it exists.

func (*Alias) Check

func (a *Alias) Check(cmd string) bool

Check verifies an alias is defined for this command.

func (*Alias) Ensure

func (a *Alias) Ensure(cloud string) (config.Alias, error)

Ensure makes sure alias are loaded.

func (*Alias) Get

func (a *Alias) Get(_ context.Context, _ string) (Object, error)

Get fetch a resource.

func (*Alias) List

func (a *Alias) List(ctx context.Context) ([]Object, error)

List returns a collection of aliases.

type BObj

type BObj struct {
	Accessor
}

func (*BObj) Get

func (bo *BObj) Get(ctx context.Context, path string) (Object, error)

func (*BObj) List

func (bo *BObj) List(ctx context.Context) ([]Object, error)

type Describer

type Describer interface {
	// Describe describes a resource.
	Describe(path string) (string, error)
	Init(ctx context.Context)
}

type Disk added in v0.1.4

type Disk struct {
	Accessor
	// contains filtered or unexported fields
}

func (*Disk) Describe added in v0.1.4

func (disk *Disk) Describe(instanceId string) (string, error)

func (*Disk) Get added in v0.1.4

func (disk *Disk) Get(ctx context.Context, path string) (Object, error)

func (*Disk) Init added in v0.1.4

func (disk *Disk) Init(ctx context.Context)

func (*Disk) List added in v0.1.4

func (disk *Disk) List(ctx context.Context) ([]Object, error)

type EBS

type EBS struct {
	Accessor
	// contains filtered or unexported fields
}

func (*EBS) Describe

func (ebs *EBS) Describe(volId string) (string, error)

func (*EBS) Get

func (ebs *EBS) Get(ctx context.Context, path string) (Object, error)

func (*EBS) Init

func (ebs *EBS) Init(ctx context.Context)

func (*EBS) List

func (ebs *EBS) List(ctx context.Context) ([]Object, error)

type EC2

type EC2 struct {
	Accessor
	// contains filtered or unexported fields
}

func (*EC2) Describe

func (e *EC2) Describe(instanceId string) (string, error)

func (*EC2) Get

func (e *EC2) Get(ctx context.Context, path string) (Object, error)

func (*EC2) Init

func (ec2 *EC2) Init(ctx context.Context)

func (*EC2) List

func (e *EC2) List(ctx context.Context) ([]Object, error)

type EC2I

type EC2I struct {
	Accessor
	// contains filtered or unexported fields
}

func (*EC2I) Describe

func (ei *EC2I) Describe(imageId string) (string, error)

func (*EC2I) Get

func (ei *EC2I) Get(ctx context.Context, path string) (Object, error)

func (*EC2I) Init

func (ei *EC2I) Init(ctx context.Context)

func (*EC2I) List

func (ei *EC2I) List(ctx context.Context) ([]Object, error)

type EC2S

type EC2S struct {
	Accessor
	// contains filtered or unexported fields
}

func (*EC2S) Describe

func (es *EC2S) Describe(snapshotId string) (string, error)

func (*EC2S) Get

func (es *EC2S) Get(ctx context.Context, path string) (Object, error)

func (*EC2S) Init

func (es *EC2S) Init(ctx context.Context)

func (*EC2S) List

func (es *EC2S) List(ctx context.Context) ([]Object, error)

type ECSClusters added in v0.1.4

type ECSClusters struct {
	Accessor
	// contains filtered or unexported fields
}

func (*ECSClusters) Describe added in v0.1.4

func (ecsClusters *ECSClusters) Describe(clusterName string) (string, error)

func (*ECSClusters) Get added in v0.1.4

func (ecsClusters *ECSClusters) Get(ctx context.Context, path string) (Object, error)

func (*ECSClusters) Init added in v0.1.4

func (ecsClusters *ECSClusters) Init(ctx context.Context)

func (*ECSClusters) List added in v0.1.4

func (ecsClusters *ECSClusters) List(ctx context.Context) ([]Object, error)

type ECSContainers added in v0.1.4

type ECSContainers struct {
	Accessor
	// contains filtered or unexported fields
}

func (*ECSContainers) Describe added in v0.1.4

func (ecscn *ECSContainers) Describe(runtimeId string) (string, error)

func (*ECSContainers) Get added in v0.1.4

func (ecscn *ECSContainers) Get(ctx context.Context, path string) (Object, error)

func (*ECSContainers) Init added in v0.1.4

func (ecscn *ECSContainers) Init(ctx context.Context)

func (*ECSContainers) List added in v0.1.4

func (ecscn *ECSContainers) List(ctx context.Context) ([]Object, error)

type ECSServices added in v0.1.4

type ECSServices struct {
	Accessor
	// contains filtered or unexported fields
}

func (*ECSServices) Describe added in v0.1.4

func (ecsServices *ECSServices) Describe(serviceName string) (string, error)

func (*ECSServices) Get added in v0.1.4

func (ecsServices *ECSServices) Get(ctx context.Context, path string) (Object, error)

func (*ECSServices) Init added in v0.1.4

func (ecsServices *ECSServices) Init(ctx context.Context)

func (*ECSServices) List added in v0.1.4

func (ecsServices *ECSServices) List(ctx context.Context) ([]Object, error)

type ECSTasks added in v0.1.4

type ECSTasks struct {
	Accessor
	// contains filtered or unexported fields
}

func (*ECSTasks) Describe added in v0.1.4

func (ecsTasks *ECSTasks) Describe(taskArn string) (string, error)

func (*ECSTasks) Get added in v0.1.4

func (ecsTasks *ECSTasks) Get(ctx context.Context, path string) (Object, error)

func (*ECSTasks) Init added in v0.1.4

func (ecsTasks *ECSTasks) Init(ctx context.Context)

func (*ECSTasks) List added in v0.1.4

func (ecsTasks *ECSTasks) List(ctx context.Context) ([]Object, error)

type Getter

type Getter interface {
	// Get return a given resource.
	Get(ctx context.Context, path string) (Object, error)
}

Getter represents a resource getter.

type IAMU

type IAMU struct {
	Accessor
	// contains filtered or unexported fields
}

func (*IAMU) Get

func (iamu *IAMU) Get(ctx context.Context, path string) (Object, error)

func (*IAMU) Init

func (iamu *IAMU) Init(ctx context.Context)

func (*IAMU) List

func (iamu *IAMU) List(ctx context.Context) ([]Object, error)

type IAMUG

type IAMUG struct {
	Accessor
	// contains filtered or unexported fields
}

func (*IAMUG) Get

func (iamug *IAMUG) Get(ctx context.Context, path string) (Object, error)

func (*IAMUG) Init

func (iamug *IAMUG) Init(ctx context.Context)

func (*IAMUG) List

func (iamug *IAMUG) List(ctx context.Context) ([]Object, error)

type IAMUGP

type IAMUGP struct {
	Accessor
	// contains filtered or unexported fields
}

func (*IAMUGP) Get

func (iamugp *IAMUGP) Get(ctx context.Context, path string) (Object, error)

func (*IAMUGP) Init

func (iamugp *IAMUGP) Init(ctx context.Context)

func (*IAMUGP) List

func (iamugp *IAMUGP) List(ctx context.Context) ([]Object, error)

type IAMUP

type IAMUP struct {
	Accessor
	// contains filtered or unexported fields
}

func (*IAMUP) Get

func (iamup *IAMUP) Get(ctx context.Context, path string) (Object, error)

func (*IAMUP) Init

func (iamup *IAMUP) Init(ctx context.Context)

func (*IAMUP) List

func (iamup *IAMUP) List(ctx context.Context) ([]Object, error)

type IamGroupUser

type IamGroupUser struct {
	Accessor
	// contains filtered or unexported fields
}

func (*IamGroupUser) Get

func (iamu *IamGroupUser) Get(ctx context.Context, path string) (Object, error)

func (*IamGroupUser) Init

func (igu *IamGroupUser) Init(ctx context.Context)

func (*IamGroupUser) List

func (igu *IamGroupUser) List(ctx context.Context) ([]Object, error)

type IamRole

type IamRole struct {
	Accessor
	// contains filtered or unexported fields
}

func (*IamRole) Get

func (iamu *IamRole) Get(ctx context.Context, path string) (Object, error)

func (*IamRole) Init

func (iamu *IamRole) Init(ctx context.Context)

func (*IamRole) List

func (iamu *IamRole) List(ctx context.Context) ([]Object, error)

type IamRolePloicy

type IamRolePloicy struct {
	Accessor
	// contains filtered or unexported fields
}

func (*IamRolePloicy) Get

func (iamup *IamRolePloicy) Get(ctx context.Context, path string) (Object, error)

func (*IamRolePloicy) Init

func (irp *IamRolePloicy) Init(ctx context.Context)

func (*IamRolePloicy) List

func (irp *IamRolePloicy) List(ctx context.Context) ([]Object, error)

type Lambda

type Lambda struct {
	Accessor
	// contains filtered or unexported fields
}

func (*Lambda) Init

func (l *Lambda) Init(ctx context.Context)

func (*Lambda) List

func (l *Lambda) List(ctx context.Context) ([]Object, error)

type Lister

type Lister interface {
	// List returns a resource collection.
	List(ctx context.Context) ([]Object, error)
}

Lister represents a resource lister.

type Object

type Object interface{}

type S3

type S3 struct {
	Accessor
	// contains filtered or unexported fields
}

func (*S3) Describe

func (s3 *S3) Describe(BName string) (string, error)

func (*S3) Get

func (s3 *S3) Get(ctx context.Context, path string) (Object, error)

func (*S3) Init

func (s3 *S3) Init(ctx context.Context)

func (*S3) List

func (s3 *S3) List(ctx context.Context) ([]Object, error)

type SBObj added in v0.1.4

type SBObj struct {
	Accessor
}

func (SBObj) Get added in v0.1.4

func (bo SBObj) Get(ctx context.Context, path string) (Object, error)

func (SBObj) List added in v0.1.4

func (bo SBObj) List(ctx context.Context) ([]Object, error)

type SG

type SG struct {
	Accessor
	// contains filtered or unexported fields
}

func (*SG) Describe

func (sg *SG) Describe(path string) (string, error)

func (*SG) Get

func (sg *SG) Get(ctx context.Context, path string) (Object, error)

func (*SG) Init

func (sg *SG) Init(ctx context.Context)

func (*SG) List

func (sg *SG) List(ctx context.Context) ([]Object, error)

type SQS

type SQS struct {
	Accessor
	// contains filtered or unexported fields
}

func (*SQS) Describe

func (sqs *SQS) Describe(queueUrl string) (string, error)

func (*SQS) Get

func (sqs *SQS) Get(ctx context.Context, path string) (Object, error)

func (*SQS) Init

func (sqs *SQS) Init(ctx context.Context)

func (*SQS) List

func (sqs *SQS) List(ctx context.Context) ([]Object, error)

type Storage added in v0.1.4

type Storage struct {
	Accessor
	// contains filtered or unexported fields
}

func (*Storage) Init added in v0.1.4

func (s *Storage) Init(ctx context.Context)

func (*Storage) List added in v0.1.4

func (s *Storage) List(ctx context.Context) ([]Object, error)

type Subnet

type Subnet struct {
	Accessor
	// contains filtered or unexported fields
}

func (*Subnet) Describe

func (sn *Subnet) Describe(vpcId string) (string, error)

func (*Subnet) Get

func (sn *Subnet) Get(ctx context.Context, path string) (Object, error)

func (*Subnet) Init

func (sn *Subnet) Init(ctx context.Context)

func (*Subnet) List

func (sn *Subnet) List(ctx context.Context) ([]Object, error)

type VM added in v0.1.4

type VM struct {
	Accessor
	// contains filtered or unexported fields
}

func (*VM) Describe added in v0.1.4

func (vm *VM) Describe(instanceId string) (string, error)

func (*VM) Init added in v0.1.4

func (vm *VM) Init(ctx context.Context)

func (*VM) List added in v0.1.4

func (vm *VM) List(ctx context.Context) ([]Object, error)

type VMI added in v0.1.4

type VMI struct {
	Accessor
	// contains filtered or unexported fields
}

func (*VMI) Describe added in v0.1.4

func (vms *VMI) Describe(imageId string) (string, error)

func (*VMI) Get added in v0.1.4

func (vmi *VMI) Get(ctx context.Context, path string) (Object, error)

func (*VMI) Init added in v0.1.4

func (vmi *VMI) Init(ctx context.Context)

func (*VMI) List added in v0.1.4

func (vmi *VMI) List(ctx context.Context) ([]Object, error)

type VMS added in v0.1.4

type VMS struct {
	Accessor
	// contains filtered or unexported fields
}

func (*VMS) Describe added in v0.1.4

func (vms *VMS) Describe(snapshotId string) (string, error)

func (*VMS) Get added in v0.1.4

func (vms *VMS) Get(ctx context.Context, path string) (Object, error)

func (*VMS) Init added in v0.1.4

func (vms *VMS) Init(ctx context.Context)

func (*VMS) List added in v0.1.4

func (vms *VMS) List(ctx context.Context) ([]Object, error)

type VPC

type VPC struct {
	Accessor
	// contains filtered or unexported fields
}

func (*VPC) Describe

func (v *VPC) Describe(vpcId string) (string, error)

func (*VPC) Get

func (v *VPC) Get(ctx context.Context, path string) (Object, error)

func (*VPC) Init

func (v *VPC) Init(ctx context.Context)

func (*VPC) List

func (v *VPC) List(ctx context.Context) ([]Object, error)

Jump to

Keyboard shortcuts

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