plugin

package
v0.13.1 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2023 License: MPL-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultChunkSize is the default chunk size for streaming
	DefaultChunkSize = 65536 // 64KiB
)
View Source
const StorageDomain = "storage"
View Source
const (
	Subtype = subtypes.Subtype("plugin")
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*options)

Option - how Options are passed as arguments.

func WithAttributes

func WithAttributes(attrs *structpb.Struct) Option

WithAttributes provides an optional attributes field.

func WithBucketPrefix

func WithBucketPrefix(bp string) Option

WithBucketPrefix provides an optional bucket prefix.

func WithChunkSize

func WithChunkSize(chunkSize uint32) Option

WithChunkSize provides an optional chunkSize to associate with a StorageClient. ChunkSize is the number of bytes to send to the plugin in a single request. If not provided, the default is 64KiB. The recommended chunk size for GRPC streamed messages is 16KiB to 64KiB.

func WithDescription

func WithDescription(desc string) Option

WithDescription provides an optional description.

func WithLimit

func WithLimit(l int) Option

WithLimit provides an option to provide a limit. Intentionally allowing negative integers. If WithLimit < 0, then unlimited results are returned. If WithLimit == 0, then default limits are used for results.

func WithName

func WithName(name string) Option

WithName provides an optional name.

func WithSecrets

func WithSecrets(secrets *structpb.Struct) Option

WithSecrets provides an optional secrets field.

func WithVersion

func WithVersion(v uint32) Option

WithVersion provides an optional version number

func WithWorkerFilter

func WithWorkerFilter(wf string) Option

WithWorkerFilter provides a worker filter that indicate which workers can support requests for this storage bucket.

type Repository

type Repository struct {
	// contains filtered or unexported fields
}

func NewRepository

func NewRepository(ctx context.Context, r db.Reader, w db.Writer, kms *kms.Kms) (*Repository, error)

NewRepository creates a new Repository. The returned repository is not safe for concurrent go routines to access it

type StorageBucket

type StorageBucket struct {
	*store.StorageBucket

	Secrets *structpb.Struct `gorm:"-"`
	// contains filtered or unexported fields
}

StorageBucket represents a bucket within an external object store. It contains secret data needed to create and read objects within the external object store.

func (*StorageBucket) SetTableName

func (s *StorageBucket) SetTableName(n string)

SetTableName sets the table name.

func (*StorageBucket) TableName

func (s *StorageBucket) TableName() string

TableName returns the table name for the storage bucket.

type StorageBucketSecret

type StorageBucketSecret struct {
	*store.StorageBucketSecret
	// contains filtered or unexported fields
}

func (*StorageBucketSecret) SetTableName

func (sbs *StorageBucketSecret) SetTableName(n string)

SetTableName sets the table name.

func (*StorageBucketSecret) TableName

func (sbs *StorageBucketSecret) TableName() string

TableName returns the table name for the storage bucket secrets.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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