Documentation
¶
Overview ¶
Package aws provides AWS adapters shared by Podmin's CLI and agent.
Index ¶
- func New(ctx context.Context, region, profile, bucket string) (*cloud.Client, error)
- type Compute
- type Config
- type ObjectStore
- func (s *ObjectStore) Delete(ctx context.Context, key string) error
- func (s *ObjectStore) EmptyAndDeleteBucket(ctx context.Context) error
- func (s *ObjectStore) EnsureBucket(ctx context.Context) error
- func (s *ObjectStore) Get(ctx context.Context, key string) ([]byte, string, error)
- func (s *ObjectStore) List(ctx context.Context, prefix string) ([]cloud.ObjectInfo, error)
- func (s *ObjectStore) PutIfMatch(ctx context.Context, key string, body []byte, version string) error
- func (s *ObjectStore) PutStream(ctx context.Context, key string, body io.Reader, size int64) error
- type ParameterStore
- func (s *ParameterStore) Archive(context.Context, string) error
- func (s *ParameterStore) Create(ctx context.Context, name string, value []byte) error
- func (s *ParameterStore) Destroy(ctx context.Context, path string) error
- func (s *ParameterStore) Get(ctx context.Context, path string) ([]byte, error)
- func (s *ParameterStore) List(ctx context.Context, path string) ([]string, error)
- func (s *ParameterStore) Restore(context.Context, string) error
- func (s *ParameterStore) Update(ctx context.Context, name string, value []byte) error
- type Secrets
- func (s *Secrets) Archive(ctx context.Context, name string) error
- func (s *Secrets) Create(ctx context.Context, name string, value []byte) error
- func (s *Secrets) Destroy(ctx context.Context, name string) error
- func (s *Secrets) Get(ctx context.Context, name string) ([]byte, error)
- func (s *Secrets) List(ctx context.Context, prefix string) ([]string, error)
- func (s *Secrets) Restore(ctx context.Context, name string) error
- func (s *Secrets) Update(ctx context.Context, name string, value []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Compute ¶
type Compute struct {
// contains filtered or unexported fields
}
Compute provides the EC2 queries required during setup.
func (*Compute) Architecture ¶
Architecture validates an EC2 instance type and returns its Go architecture.
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
Config constructs AWS resources from one SDK configuration.
func (Config) InstanceID ¶
InstanceID returns the current EC2 instance identifier from IMDS.
func (Config) ObjectStore ¶
func (c Config) ObjectStore(bucket string, maxObjectSize int64) *ObjectStore
ObjectStore returns object storage for one S3 bucket; zero disables the read limit.
func (Config) ParameterStore ¶
func (c Config) ParameterStore() *ParameterStore
ParameterStore returns an AWS Systems Manager Parameter Store client.
type ObjectStore ¶
type ObjectStore struct {
// contains filtered or unexported fields
}
ObjectStore provides object operations for one S3 bucket.
func (*ObjectStore) Delete ¶
func (s *ObjectStore) Delete(ctx context.Context, key string) error
Delete removes an object.
func (*ObjectStore) EmptyAndDeleteBucket ¶
func (s *ObjectStore) EmptyAndDeleteBucket(ctx context.Context) error
EmptyAndDeleteBucket permanently removes all current objects and the bucket.
func (*ObjectStore) EnsureBucket ¶
func (s *ObjectStore) EnsureBucket(ctx context.Context) error
EnsureBucket creates an absent bucket, checks its region, and verifies write/read/delete access.
func (*ObjectStore) List ¶
func (s *ObjectStore) List(ctx context.Context, prefix string) ([]cloud.ObjectInfo, error)
List returns one paginated listing beneath prefix.
func (*ObjectStore) PutIfMatch ¶
func (s *ObjectStore) PutIfMatch(ctx context.Context, key string, body []byte, version string) error
PutIfMatch replaces an object matching version, or creates it when version is empty.
type ParameterStore ¶
type ParameterStore struct {
// contains filtered or unexported fields
}
ParameterStore reads and writes AWS Systems Manager parameters.
func (*ParameterStore) Archive ¶
func (s *ParameterStore) Archive(context.Context, string) error
Archive reports that Parameter Store does not support recoverable deletion.
func (*ParameterStore) Create ¶
Create creates a SecureString parameter without overwriting one that exists.
func (*ParameterStore) Destroy ¶
func (s *ParameterStore) Destroy(ctx context.Context, path string) error
Destroy permanently deletes a Parameter Store parameter.
type Secrets ¶
type Secrets struct {
// contains filtered or unexported fields
}
Secrets returns explicitly named current Secrets Manager values.