store

package
v1.12.0 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2017 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PaginationPageMinimum = 0
	PaginationSizeMinimum = 1
	PaginationSizeMaximum = 100
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Filter added in v1.0.0

type Filter struct {
	Deleted bool
}

func NewFilter added in v1.0.0

func NewFilter() *Filter

func (*Filter) Validate added in v1.0.0

func (f *Filter) Validate() error

type Pagination added in v1.0.0

type Pagination struct {
	Page int
	Size int
}

func NewPagination added in v1.0.0

func NewPagination() *Pagination

func (*Pagination) Validate added in v1.0.0

func (p *Pagination) Validate() error

type Session

type Session interface {
	store.Session

	GetDatasetsForUserByID(userID string, filter *Filter, pagination *Pagination) ([]*upload.Upload, error)
	GetDatasetByID(datasetID string) (*upload.Upload, error)
	CreateDataset(dataset *upload.Upload) error
	UpdateDataset(dataset *upload.Upload) error
	DeleteDataset(dataset *upload.Upload) error
	CreateDatasetData(dataset *upload.Upload, datasetData []data.Datum) error
	ActivateDatasetData(dataset *upload.Upload) error
	ArchiveDeviceDataUsingHashesFromDataset(dataset *upload.Upload) error
	UnarchiveDeviceDataUsingHashesFromDataset(dataset *upload.Upload) error
	DeleteOtherDatasetData(dataset *upload.Upload) error
	DestroyDataForUserByID(userID string) error
}

type Store

type Store interface {
	store.Store

	NewSession(logger log.Logger) Session
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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