ddb

package
v0.0.0-...-09b5a61 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Convert

Convert from the DAO event to the aggregate

Types

type HappinessRatingEvent

type HappinessRatingEvent struct {
	UserID string    `dynamo:"user_id,hash"`
	Time   time.Time `dynamo:"time,range"`
	Score  int       `dynamo:"score"`
	Notes  string    `dynamo:"notes,omitempty"`
}

HappinessRatingEvent is the event stored in the event store It is considered the source of truth

type HappinessRatingEventDAO

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

HappinessRatingEventDAO is the access layer to the happiness events

func New

func New(ratingTableName string, db *dynamo.DB) *HappinessRatingEventDAO

New returns a new DAO to access happiness events

func (*HappinessRatingEventDAO) GetRatings

GetRatings gets all ratings by partition key

func (*HappinessRatingEventDAO) Rate

Rate allows one to rate their happiness

Jump to

Keyboard shortcuts

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