repository

package
v0.0.0-...-be7b58b Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ByDateDesc

type ByDateDesc []domain.Message

ByDateDesc ...

func (ByDateDesc) Len

func (d ByDateDesc) Len() int

func (ByDateDesc) Less

func (d ByDateDesc) Less(i, j int) bool

func (ByDateDesc) Swap

func (d ByDateDesc) Swap(i, j int)

type MessageInMemoryStore

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

MessageInMemoryStore ...

func NewMessageInMemoryStore

func NewMessageInMemoryStore() *MessageInMemoryStore

NewMessageInMemoryStore ...

type MessageRepository

type MessageRepository interface {
	Save(context.Context, *domain.Message) <-chan error
	Delete(context.Context, string) <-chan error
	Reset(context.Context) <-chan error
	Find(context.Context, string) <-chan QueryResult
	FindAll(context.Context) <-chan QueryResult
}

MessageRepository ...

func NewLRUCacheStore

func NewLRUCacheStore(size int, logger *zap.Logger) (MessageRepository, error)

type MessageRepositoryInMemory

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

MessageRepositoryInMemory ...

func NewMessageInMemory

func NewMessageInMemory(store *MessageInMemoryStore) *MessageRepositoryInMemory

NewMessageInMemory ...

func (*MessageRepositoryInMemory) Delete

func (r *MessageRepositoryInMemory) Delete(ctx context.Context, id string) <-chan error

Delete ...

func (*MessageRepositoryInMemory) Find

Find ...

func (*MessageRepositoryInMemory) FindAll

func (r *MessageRepositoryInMemory) FindAll(ctx context.Context) <-chan QueryResult

FindAll ...

func (*MessageRepositoryInMemory) Reset

func (r *MessageRepositoryInMemory) Reset(ctx context.Context) <-chan error

Reset ...

func (*MessageRepositoryInMemory) Save

func (r *MessageRepositoryInMemory) Save(ctx context.Context, m *domain.Message) <-chan error

Save ...

type QueryResult

type QueryResult struct {
	Result interface{}
	Error  error
}

QueryResult ...

Jump to

Keyboard shortcuts

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