bucket

package
v0.0.1-alpha.7 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bar

type Bar struct {
	Foo string
}

func ParseBar

func ParseBar(v any) (Bar, error)

func (Bar) ToValue

func (x Bar) ToValue() (any, error)

type Bucket

type Bucket struct {
	Identifier BucketIdentifier
	Config     BucketConfig
	Attrs      BucketAttrs
}

func (Bucket) ToResourceValue

func (x Bucket) ToResourceValue() (sdk.Resource, error)

type BucketAttrs

type BucketAttrs struct {
	Bar Bar
}

func ParseBucketAttrs

func ParseBucketAttrs(v any) (BucketAttrs, error)

func (BucketAttrs) ToValue

func (x BucketAttrs) ToValue() (any, error)

type BucketConfig

type BucketConfig struct {
	Expiration string
}

func ParseBucketConfig

func ParseBucketConfig(v any) (BucketConfig, error)

func (BucketConfig) ToValue

func (x BucketConfig) ToValue() (any, error)

type BucketCreator

type BucketCreator interface {
	CreateBucket(context.Context, BucketIdentifier, BucketConfig) (Bucket, error)
}

type BucketDeleter

type BucketDeleter interface {
	DeleteBucket(context.Context, BucketIdentifier) error
}

type BucketGetter

type BucketGetter interface {
	GetBucket(context.Context, BucketIdentifier) (Bucket, error)
}

type BucketHandler

type BucketHandler struct {
	BucketGetter  BucketGetter
	BucketCreator BucketCreator
	BucketUpdator BucketUpdator
	BucketDeleter BucketDeleter
}

func (BucketHandler) CreateResource

func (h BucketHandler) CreateResource(ctx context.Context, id sdk.Identifier, config any) (sdk.Resource, error)

func (BucketHandler) DeleteResource

func (h BucketHandler) DeleteResource(ctx context.Context, id sdk.Identifier) error

func (BucketHandler) GetResource

func (h BucketHandler) GetResource(ctx context.Context, id sdk.Identifier) (sdk.Resource, error)

func (BucketHandler) UpdateResource

func (h BucketHandler) UpdateResource(ctx context.Context, id sdk.Identifier, config any, mask []sdk.UpdateMaskField) (sdk.Resource, error)

type BucketIdentifier

type BucketIdentifier struct {
	Account string
	Region  string
	Name    string
}

func ParseBucketIdentifier

func ParseBucketIdentifier(v sdk.Identifier) (BucketIdentifier, error)

func (BucketIdentifier) ResourceType

func (x BucketIdentifier) ResourceType() string

func (BucketIdentifier) ToValue

func (x BucketIdentifier) ToValue() (any, error)

type BucketUpdator

type BucketUpdator interface {
	UpdateBucket(context.Context, BucketIdentifier, BucketConfig, []sdk.UpdateMaskField) (Bucket, error)
}

Jump to

Keyboard shortcuts

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