data

package
v0.0.0-...-ae80017 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrQuestionNotFound = fmt.Errorf("questionID not found")
)

Functions

This section is empty.

Types

type Store

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

Store represents a physical datastore.

func NewStore

func NewStore(table string, dynamo *dynamodb.DynamoDB) *Store

NewStore returns a instantiated Store.

func (*Store) DeleteQuestion

func (ds *Store) DeleteQuestion(questionID string) error

DeleteQuestion deletes a question in the database by primary key.

func (*Store) GetQuestion

func (ds *Store) GetQuestion(questionID string) (*quiz.Question, error)

GetQuestion retrieves a question in the database by primary key.

func (*Store) UpdateQuestion

func (ds *Store) UpdateQuestion(qq *quiz.Question) error

UpdateQuestion creates or overwrites a question in the database by primary key.

Jump to

Keyboard shortcuts

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