Documentation
¶
Index ¶
- func ToDynamodb_Map(entity Entity) (map[string]types.AttributeValue, error)
- type Creation
- type Deletion
- type Entity
- func FindOne(ctx context.Context, props *FindOneProps) (Entity, error)
- func FromDynamodb_StreamMap(input map[string]streamtypes.AttributeValue) (Entity, error)
- func FromDynamodb_TableMap(input map[string]tabletypes.AttributeValue) (Entity, error)
- func FromJson(input []byte) (Entity, error)
- func FromStream(input events.DynamoDBEventRecord) (Entity, error)
- type EntityPage
- type EntityStatus
- type FindAllProps
- type FindByProps
- type FindOneProps
- type Mutation
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ToDynamodb_Map ¶
func ToDynamodb_Map(entity Entity) (map[string]types.AttributeValue, error)
Types ¶
type Creation ¶
type Entity ¶
type Entity interface { ID() string Type() string Version() uint64 Indexes() []string Status() EntityStatus Data(interface{}) error UpdatedAt() time.Time UpdatedBy() string CreatedAt() time.Time CreatedBy() string LastEvent() (message.Event, error) Mutate(ctx context.Context, newState interface{}) Mutation Delete(ctx context.Context) Deletion }
func FromDynamodb_StreamMap ¶
func FromDynamodb_StreamMap(input map[string]streamtypes.AttributeValue) (Entity, error)
func FromDynamodb_TableMap ¶
func FromDynamodb_TableMap(input map[string]tabletypes.AttributeValue) (Entity, error)
func FromStream ¶
func FromStream(input events.DynamoDBEventRecord) (Entity, error)
type EntityPage ¶
func FindAll ¶
func FindAll(ctx context.Context, props *FindAllProps) (EntityPage, error)
func FindBy ¶
func FindBy(ctx context.Context, props *FindByProps) (EntityPage, error)
func NewPage ¶
func NewPage(entities []Entity, nextToken string) EntityPage
type EntityStatus ¶
type EntityStatus string
const ( EntityStatus_Alive EntityStatus = "alive" EntityStatus_Dead EntityStatus = "dead" )
type FindAllProps ¶
type FindByProps ¶
type FindOneProps ¶
Click to show internal directories.
Click to hide internal directories.