ddbproto

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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

func NewClient(tableName string, region string) *DdbProto

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

func (b *DdbProto) DeleteProto(ctx context.Context, columnFamily string, rowKey string) error

func (*DdbProto) ListProtos

func (b *DdbProto) ListProtos(ctx context.Context, columnFamily string, messageType proto.Message, opts PageOptions) ([]proto.Message, string, error)

func (*DdbProto) ReadProto

func (b *DdbProto) ReadProto(ctx context.Context, rowKey string, columnFamily string, message proto.Message, readMask *fieldmaskpb.FieldMask) error

func (*DdbProto) UpdateProto

func (b *DdbProto) UpdateProto(ctx context.Context, rowKey string, columnFamily string, message proto.Message, updateMask *fieldmaskpb.FieldMask) error

func (*DdbProto) WriteProto

func (b *DdbProto) WriteProto(ctx context.Context, rowKey string, columnFamily string, message proto.Message) error

type ErrInvalidNextToken

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

func (ErrInvalidNextToken) Error

func (e ErrInvalidNextToken) Error() string

type ErrMismatchedTypes

type ErrMismatchedTypes struct {
	Expected reflect.Type
	Actual   reflect.Type
}

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 Item

type Item struct {
	PK    string
	SK    string
	Proto string
}

Create struct to hold info about new item

type PageOptions

type PageOptions struct {
	RowKeyPrefix string
	PageSize     int32
	NextToken    string
	MaxPageSize  int32
	ReadMask     *fieldmaskpb.FieldMask
}

Jump to

Keyboard shortcuts

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