repository

package
v0.0.0-...-ba86dd7 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2022 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type MemoRepo

type MemoRepo interface {
	Add(memo *entity.Memo) (string, error)

	GetById(id string) (*entity.Memo, error)
	GetByUserId(userId string) ([]entity.Memo, error)
	GetByDateRange(start, end, userId string) ([]entity.Memo, error)

	Update(memo entity.Memo) error

	Delete(id string) error
}

type MemoRepoDynamoDB

type MemoRepoDynamoDB struct {
	TableName string
	Client    *dynamodb.DynamoDB
}

func ProvideMemoRepoDynamoDB

func ProvideMemoRepoDynamoDB(awsService *config.AWSService) *MemoRepoDynamoDB

func (*MemoRepoDynamoDB) Add

func (m *MemoRepoDynamoDB) Add(memo *entity.Memo) (string, error)

func (*MemoRepoDynamoDB) Delete

func (m *MemoRepoDynamoDB) Delete(id string) error

func (*MemoRepoDynamoDB) GetByDateRange

func (m *MemoRepoDynamoDB) GetByDateRange(start, end, userId string) ([]entity.Memo, error)

func (*MemoRepoDynamoDB) GetById

func (m *MemoRepoDynamoDB) GetById(id string) (*entity.Memo, error)

func (*MemoRepoDynamoDB) GetByUserId

func (m *MemoRepoDynamoDB) GetByUserId(userId string) ([]entity.Memo, error)

func (*MemoRepoDynamoDB) Update

func (m *MemoRepoDynamoDB) Update(memo entity.Memo) error

type MemoRepoMongoDB

type MemoRepoMongoDB struct {
	ClientOptions *options.ClientOptions
	// contains filtered or unexported fields
}

func ProvideMemoRepoMongoDB

func ProvideMemoRepoMongoDB(awsService *aws.AWSService) *MemoRepoMongoDB

func (*MemoRepoMongoDB) Add

func (repo *MemoRepoMongoDB) Add(memo *entity.Memo) (string, error)

func (*MemoRepoMongoDB) Delete

func (repo *MemoRepoMongoDB) Delete(id string) error

func (*MemoRepoMongoDB) GetByDateRange

func (repo *MemoRepoMongoDB) GetByDateRange(start, end, userId string) ([]entity.Memo, error)

func (*MemoRepoMongoDB) GetById

func (repo *MemoRepoMongoDB) GetById(id string) (*entity.Memo, error)

func (*MemoRepoMongoDB) GetByUserId

func (repo *MemoRepoMongoDB) GetByUserId(userId string) ([]entity.Memo, error)

func (*MemoRepoMongoDB) Update

func (repo *MemoRepoMongoDB) Update(memo entity.Memo) error

Jump to

Keyboard shortcuts

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