store

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrRecordNotFound returned, when record was not found in the repository.
	ErrRecordNotFound = errors.New("record not found")
)

Functions

This section is empty.

Types

type OperationRepository

type OperationRepository interface {
	Create(operations ...model.Operation) error
	FindByNumber(number string, limit uint64, order string) ([]model.Operation, error)
	DeleteByResourceID(id int64) (int64, error)
}

OperationRepository is responsible for operations data.

type ResourceRepository

type ResourceRepository interface {
	Create(resource *model.Resource) error
	Update(resource *model.Resource) error
	FindByUID(uid string) (*model.Resource, error)
	All() ([]model.Resource, error)
}

ResourceRepository is responsible for resources data.

type Store

type Store interface {
	Resource() ResourceRepository
	Operation() OperationRepository
}

Store is responsible for data manipulation.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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