accessor

package
v1.9.3 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2019 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DynamoAccessor added in v1.7.0

type DynamoAccessor struct {
	DynamoTableResourceName string
	// contains filtered or unexported fields
}

DynamoAccessor to make it a bit easier to work with Dynamo as the backing store

func (*DynamoAccessor) Delete added in v1.7.0

func (svc *DynamoAccessor) Delete(ctx context.Context, keyPath string) error

Delete handles deleting the resource

func (*DynamoAccessor) DeleteAll added in v1.7.0

func (svc *DynamoAccessor) DeleteAll(ctx context.Context) error

DeleteAll handles deleting all the items

func (*DynamoAccessor) Get added in v1.7.0

func (svc *DynamoAccessor) Get(ctx context.Context,
	keyPath string,
	destObject interface{}) error

Get handles getting the item

func (*DynamoAccessor) GetAll added in v1.7.0

func (svc *DynamoAccessor) GetAll(ctx context.Context,
	ctor NewObjectConstructor) ([]interface{}, error)

GetAll handles returning all of the items

func (*DynamoAccessor) Put added in v1.7.0

func (svc *DynamoAccessor) Put(ctx context.Context, keyPath string, object interface{}) error

Put handles saving the item

type KevValueAccessor added in v1.7.0

type KevValueAccessor interface {
	Delete(ctx context.Context, keyPath string) error
	DeleteAll(ctx context.Context) error
	Put(ctx context.Context, keyPath string, object interface{}) error
	Get(ctx context.Context, keyPath string, object interface{}) error
	GetAll(ctx context.Context, ctor NewObjectConstructor) ([]interface{}, error)
}

KevValueAccessor represents a simple KV store

type NewObjectConstructor

type NewObjectConstructor func() interface{}

NewObjectConstructor returns a fresh instance of the type that's stored in the KV store

type S3Accessor

type S3Accessor struct {
	S3BucketResourceName string
	// contains filtered or unexported fields
}

S3Accessor to make it a bit easier to work with S3 as the backing store

func (*S3Accessor) BucketPrivilege

func (svc *S3Accessor) BucketPrivilege(bucketPrivs ...string) sparta.IAMRolePrivilege

BucketPrivilege returns a privilege that targets the Bucket

func (*S3Accessor) Delete

func (svc *S3Accessor) Delete(ctx context.Context, keyPath string) error

Delete handles deleting the resource

func (*S3Accessor) DeleteAll

func (svc *S3Accessor) DeleteAll(ctx context.Context) error

DeleteAll handles deleting all the items

func (*S3Accessor) Get

func (svc *S3Accessor) Get(ctx context.Context,
	keyPath string,
	destObject interface{}) error

Get handles getting the item

func (*S3Accessor) GetAll

func (svc *S3Accessor) GetAll(ctx context.Context,
	ctor NewObjectConstructor) ([]interface{}, error)

GetAll handles returning all of the items

func (*S3Accessor) KeysPrivilege

func (svc *S3Accessor) KeysPrivilege(keyPrivileges ...string) sparta.IAMRolePrivilege

KeysPrivilege returns a privilege that targets the Bucket objects

func (*S3Accessor) Put

func (svc *S3Accessor) Put(ctx context.Context, keyPath string, object interface{}) error

Put handles saving the item

Jump to

Keyboard shortcuts

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