Documentation ¶
Overview ¶
Package ddbproto package offers a collection of CRUD operations for interaction with AWS Dynamodb, utilizing Protocol Buffers for serialization purposes.
Index ¶
- Variables
- type DdbProto
- func (b *DdbProto) DeleteProto(ctx context.Context, columnFamily string, rowKey string) error
- func (b *DdbProto) ListProtos(ctx context.Context, columnFamily string, messageType proto.Message, ...) ([]proto.Message, string, error)
- func (b *DdbProto) ReadProto(ctx context.Context, rowKey string, columnFamily string, message proto.Message, ...) error
- func (b *DdbProto) UpdateProto(ctx context.Context, rowKey string, columnFamily string, message proto.Message, ...) error
- func (b *DdbProto) WriteProto(ctx context.Context, rowKey string, columnFamily string, message proto.Message) error
- type ErrInvalidNextToken
- type ErrMismatchedTypes
- type ErrNegativePageSize
- type ErrNotFound
- type Item
- type PageOptions
Constants ¶
This section is empty.
Variables ¶
var ErrInvalidFieldMask = errors.New("invalid field mask")
Functions ¶
This section is empty.
Types ¶
type DdbProto ¶
type DdbProto struct {
// contains filtered or unexported fields
}
func NewClient ¶
NewClient creates a new instance of DbdProto. Region must a valid aws region like "us-east-1" or "af-south-1". Either you need to have configured your aws credentials in ~/.aws/credentials, or you need to set the AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables
func (*DdbProto) DeleteProto ¶
DeleteProto permanently deletes the proto message from the database.
func (*DdbProto) ListProtos ¶
func (b *DdbProto) ListProtos(ctx context.Context, columnFamily string, messageType proto.Message, opts PageOptions) ([]proto.Message, string, error)
ListProtos returns an array of proto messages.
func (*DdbProto) ReadProto ¶
func (b *DdbProto) ReadProto(ctx context.Context, rowKey string, columnFamily string, message proto.Message, readMask *fieldmaskpb.FieldMask) error
ReadProto reads the proto message from the database.
type ErrInvalidNextToken ¶
type ErrInvalidNextToken struct {
// contains filtered or unexported fields
}
func (ErrInvalidNextToken) Error ¶
func (e ErrInvalidNextToken) Error() string
type ErrMismatchedTypes ¶
func (ErrMismatchedTypes) Error ¶
func (e ErrMismatchedTypes) Error() string
type ErrNegativePageSize ¶
type ErrNegativePageSize struct{}
func (ErrNegativePageSize) Error ¶
func (e ErrNegativePageSize) Error() string
type ErrNotFound ¶
type ErrNotFound struct {
RowKey string // unavailable locations
}
ErrNotFound is returned when the desired resource is not found in Bigtable.
func (ErrNotFound) Error ¶
func (e ErrNotFound) Error() string
type PageOptions ¶
type PageOptions struct { RowKeyPrefix string PageSize int32 NextToken string MaxPageSize int32 ReadMask *fieldmaskpb.FieldMask }
PageOptions are used with the ListProtos method