Documentation ¶
Index ¶
- type DynamoAccessor
- func (svc *DynamoAccessor) Delete(ctx context.Context, keyPath string) error
- func (svc *DynamoAccessor) DeleteAll(ctx context.Context) error
- func (svc *DynamoAccessor) Get(ctx context.Context, keyPath string, destObject interface{}) error
- func (svc *DynamoAccessor) GetAll(ctx context.Context, ctor NewObjectConstructor) ([]interface{}, error)
- func (svc *DynamoAccessor) Put(ctx context.Context, keyPath string, object interface{}) error
- type KevValueAccessor
- type NewObjectConstructor
- type S3Accessor
- func (svc *S3Accessor) BucketPrivilege(bucketPrivs ...string) sparta.IAMRolePrivilege
- func (svc *S3Accessor) Delete(ctx context.Context, keyPath string) error
- func (svc *S3Accessor) DeleteAll(ctx context.Context) error
- func (svc *S3Accessor) Get(ctx context.Context, keyPath string, destObject interface{}) error
- func (svc *S3Accessor) GetAll(ctx context.Context, ctor NewObjectConstructor) ([]interface{}, error)
- func (svc *S3Accessor) KeysPrivilege(keyPrivileges ...string) sparta.IAMRolePrivilege
- func (svc *S3Accessor) Put(ctx context.Context, keyPath string, object interface{}) error
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
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