store

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 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)
	FindPreviousActiveDatasetForDevice(dataset *upload.Upload) (*upload.Upload, error)
	CreateDataset(dataset *upload.Upload) error
	UpdateDataset(dataset *upload.Upload) error
	DeleteDataset(dataset *upload.Upload) error
	GetDatasetDataDeduplicatorHashes(dataset *upload.Upload, active bool) ([]string, error)
	FindAllDatasetDataDeduplicatorHashesForDevice(userID string, deviceID string, queryHashes []string) ([]string, error)
	CreateDatasetData(dataset *upload.Upload, datasetData []data.Datum) error
	FindEarliestDatasetDataTime(dataset *upload.Upload) (string, error)
	ActivateDatasetData(dataset *upload.Upload) error
	SetDatasetDataActiveUsingHashes(dataset *upload.Upload, queryHashes []string, active bool) error
	DeactivateOtherDatasetDataAfterTime(dataset *upload.Upload, time string) error
	DeleteOtherDatasetData(dataset *upload.Upload) error
	DestroyDataForUserByID(userID string) error
}

type Store

type Store interface {
	store.Store

	NewSession(logger log.Logger) (Session, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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