storage

package
v0.0.0-...-f67852a Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2018 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CharacterInfoItem

type CharacterInfoItem struct {
	*model.CharacterInfo
	CharacterID string `json:"characterID"`
	StreamerID  string `json:"streamerID"`
}

type CharacterRepository

type CharacterRepository interface {
	// List retrieves characters list from database
	List(streamerID string) ([]*model.CharacterInfo, error)
	// Add adds new character to database
	Add(streamerID string, character *model.CharacterInfo) error
	// Delete deletes character from database
	Delete(streamerID, region, realm, name string) error
}

CharacterRepository is a permanent storage of a streamer's characters

type DynamoRepository

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

DynamoRepository is a CharacterRepository implementation for DynamoDB

func New

func New() (*DynamoRepository, error)

func (*DynamoRepository) Add

func (db *DynamoRepository) Add(streamerID string, character *model.CharacterInfo) error

func (*DynamoRepository) Delete

func (db *DynamoRepository) Delete(streamerID, region, realm, name string) error

func (*DynamoRepository) List

func (db *DynamoRepository) List(streamerID string) ([]*model.CharacterInfo, error)

Jump to

Keyboard shortcuts

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