Documentation ¶
Index ¶
- Constants
- type DynamoKeyValueService
- func (s *DynamoKeyValueService) DeleteKey(ctx context.Context, req *kvstorepb.KvStoreDeleteKeyRequest) (*kvstorepb.KvStoreDeleteKeyResponse, error)
- func (s *DynamoKeyValueService) GetValue(ctx context.Context, req *kvstorepb.KvStoreGetValueRequest) (*kvstorepb.KvStoreGetValueResponse, error)
- func (s *DynamoKeyValueService) ScanKeys(req *kvstorepb.KvStoreScanKeysRequest, stream kvstorepb.KvStore_ScanKeysServer) error
- func (s *DynamoKeyValueService) SetValue(ctx context.Context, req *kvstorepb.KvStoreSetValueRequest) (*kvstorepb.KvStoreSetValueResponse, error)
Constants ¶
View Source
const ( AttribPk = "_pk" AttribSk = "_sk" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DynamoKeyValueService ¶
type DynamoKeyValueService struct {
// contains filtered or unexported fields
}
DynamoKeyValueService - an AWS DynamoDB implementation of the Nitric Document Service
func New ¶
func New(resolver resource.AwsResourceResolver) (*DynamoKeyValueService, error)
New creates a new AWS DynamoDB implementation of a DocumentServiceServer
func NewWithClient ¶
func NewWithClient(provider resource.AwsResourceResolver, client *dynamodb.Client) (*DynamoKeyValueService, error)
NewWithClient creates a DocumentServiceServer with an given DynamoDB client instance.
Primarily used for testing
func (*DynamoKeyValueService) DeleteKey ¶
func (s *DynamoKeyValueService) DeleteKey(ctx context.Context, req *kvstorepb.KvStoreDeleteKeyRequest) (*kvstorepb.KvStoreDeleteKeyResponse, error)
Delete a document from the DynamoDB table
func (*DynamoKeyValueService) GetValue ¶
func (s *DynamoKeyValueService) GetValue(ctx context.Context, req *kvstorepb.KvStoreGetValueRequest) (*kvstorepb.KvStoreGetValueResponse, error)
Get a document from the DynamoDB table
func (*DynamoKeyValueService) ScanKeys ¶
func (s *DynamoKeyValueService) ScanKeys(req *kvstorepb.KvStoreScanKeysRequest, stream kvstorepb.KvStore_ScanKeysServer) error
func (*DynamoKeyValueService) SetValue ¶
func (s *DynamoKeyValueService) SetValue(ctx context.Context, req *kvstorepb.KvStoreSetValueRequest) (*kvstorepb.KvStoreSetValueResponse, error)
Set a document in the DynamoDB table
Click to show internal directories.
Click to hide internal directories.