storage

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2016 License: MIT Imports: 9 Imported by: 14

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrStorageFileNotFound    error = errors.New("File not found")
	ErrStorageFileNotReadable error = errors.New("File not readable")
	ErrStorageFileNotWritable error = errors.New("File not writable")
	ErrStorageFileInvalid     error = errors.New("Syntax error in storage file")
	ErrStorageItemNotFound    error = errors.New("Item not available in storage")
)

Functions

This section is empty.

Types

type ManifestFilter

type ManifestFilter func(*dsapid.ManifestResource) bool

func FilterManifestEnabled

func FilterManifestEnabled() ManifestFilter

func FilterManifestForUser

func FilterManifestForUser(uuid string) ManifestFilter

func FilterManifestName

func FilterManifestName(value string) ManifestFilter

func FilterManifestOs

func FilterManifestOs(value string) ManifestFilter

func FilterManifestPublic

func FilterManifestPublic(value bool) ManifestFilter

func FilterManifestUuid

func FilterManifestUuid(value string) ManifestFilter

func FilterManifestVersion added in v0.6.5

func FilterManifestVersion(value string) ManifestFilter

type ManifestStorage

func NewManifestStorage

func NewManifestStorage(basedir string) ManifestStorage

type ManifestsByPublishedAt

type ManifestsByPublishedAt []*dsapid.ManifestResource

func (ManifestsByPublishedAt) Len

func (t ManifestsByPublishedAt) Len() int

func (ManifestsByPublishedAt) Less

func (t ManifestsByPublishedAt) Less(i, j int) bool

func (ManifestsByPublishedAt) Swap

func (t ManifestsByPublishedAt) Swap(i, j int)

type UserStorage

type UserStorage interface {
	Save() error
	Add(string, *dsapid.UserResource)
	Update(string, *dsapid.UserResource)
	Delete(string)
	EnsureExists(string, string) *dsapid.UserResource
	Get(string) *dsapid.UserResource
	GetOK(string) (*dsapid.UserResource, bool)
	FindByName(string) (*dsapid.UserResource, error)
	FindByEmail(string) (*dsapid.UserResource, error)
	FindByToken(string) (*dsapid.UserResource, error)
	Dump() map[string]*dsapid.UserResource
	GuestUser() *dsapid.UserResource
}

func NewUserStorage

func NewUserStorage(filename string) UserStorage

Jump to

Keyboard shortcuts

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