memory

package
v0.0.0-...-0bc60f7 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2015 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Repository

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

func NewRepository

func NewRepository(nested visit.RepositoryInterface, maxEntries int) (*Repository, error)

func (*Repository) FindAll

func (repository *Repository) FindAll(limit int64, offset int64) (result []*entity.Visit, err error)

func (*Repository) FindAllByClientID

func (repository *Repository) FindAllByClientID(
	clientID string,
	limit int64,
	offset int64,
) (result []*entity.Visit, err error)

func (*Repository) FindAllBySessionID

func (repository *Repository) FindAllBySessionID(
	sessionID types.UUID,
	limit int64,
	offset int64,
) (result []*entity.Visit, err error)

func (*Repository) FindByID

func (repository *Repository) FindByID(visitID types.UUID) (result *entity.Visit, err error)

func (*Repository) Insert

func (repository *Repository) Insert(visit *entity.Visit) (err error)

Save visit to cache and run nested save

func (*Repository) Verify

func (repository *Repository) Verify(sessionID types.UUID, clientID string) (ok bool, err error)

Verify method MUST check that sessionID is not registered by another not empty clientID If sessionID or clientID not found it'll run nested repository and cache result (if its ok)

Jump to

Keyboard shortcuts

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