bolt

package
v1.2.9 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2017 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigStore

type ConfigStore struct {
	DB *storm.DB
}

ConfigStore is a configuration store.

func (ConfigStore) Get

func (c ConfigStore) Get(name string, to interface{}) error

Get gets a configuration from the database to an interface.

func (ConfigStore) Save

func (c ConfigStore) Save(name string, from interface{}) error

Save saves a configuration from an interface to the database.

type ShareStore

type ShareStore struct {
	DB *storm.DB
}

ShareStore is a shareable links store.

func (ShareStore) Delete

func (s ShareStore) Delete(hash string) error

Delete deletes a Share Link from the database.

func (ShareStore) Get

func (s ShareStore) Get(hash string) (*fm.ShareLink, error)

Get gets a Share Link from an hash.

func (ShareStore) GetByPath

func (s ShareStore) GetByPath(hash string) ([]*fm.ShareLink, error)

GetByPath gets all the links for a specific path.

func (ShareStore) GetPermanent

func (s ShareStore) GetPermanent(path string) (*fm.ShareLink, error)

GetPermanent gets the permanent link from a path.

func (ShareStore) Gets

func (s ShareStore) Gets() ([]*fm.ShareLink, error)

Gets retrieves all the shareable links.

func (ShareStore) Save

func (s ShareStore) Save(l *fm.ShareLink) error

Save stores a Share Link on the database.

type UsersStore

type UsersStore struct {
	DB *storm.DB
}

UsersStore is a users store.

func (UsersStore) Delete

func (u UsersStore) Delete(id int) error

Delete deletes a user from the database.

func (UsersStore) Get

func (u UsersStore) Get(id int, builder fm.FSBuilder) (*fm.User, error)

Get gets a user with a certain id from the database.

func (UsersStore) GetByUsername

func (u UsersStore) GetByUsername(username string, builder fm.FSBuilder) (*fm.User, error)

GetByUsername gets a user with a certain username from the database.

func (UsersStore) Gets

func (u UsersStore) Gets(builder fm.FSBuilder) ([]*fm.User, error)

Gets gets all the users from the database.

func (UsersStore) Save

func (u UsersStore) Save(us *fm.User) error

Save saves a user to the database.

func (UsersStore) Update

func (u UsersStore) Update(us *fm.User, fields ...string) error

Update updates the whole user object or only certain fields.

Jump to

Keyboard shortcuts

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