bolt

package
Version: v1.11.0 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2019 License: Apache-2.0 Imports: 4 Imported by: 4

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) (*fb.ShareLink, error)

Get gets a Share Link from an hash.

func (ShareStore) GetByPath

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

GetByPath gets all the links for a specific path.

func (ShareStore) GetPermanent

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

GetPermanent gets the permanent link from a path.

func (ShareStore) Gets

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

Gets retrieves all the shareable links.

func (ShareStore) Save

func (s ShareStore) Save(l *fb.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 fb.FSBuilder) (*fb.User, error)

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

func (UsersStore) GetByUsername

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

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

func (UsersStore) Gets

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

Gets gets all the users from the database.

func (UsersStore) Save

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

Save saves a user to the database.

func (UsersStore) Update

func (u UsersStore) Update(us *fb.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