dummy

package
v0.0.0-...-c11ca93 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Name string = "DummyDb"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DummyDatabase

type DummyDatabase struct {
	DbFolder string `json:"db_folder"`
	// contains filtered or unexported fields
}

func NewDummyDatabase

func NewDummyDatabase(config *json.RawMessage) (d *DummyDatabase, err error)

func (*DummyDatabase) AddAccount

func (d *DummyDatabase) AddAccount(account *types.Account) (err error)
func (d *DummyDatabase) AddDownloadLink(link *types.DownloadLink) (err error)

func (*DummyDatabase) ClearAccesses

func (d *DummyDatabase) ClearAccesses() error

func (*DummyDatabase) DeleteCommand

func (d *DummyDatabase) DeleteCommand(ref *string) error

func (*DummyDatabase) GetAccess

func (d *DummyDatabase) GetAccess(user *string, path string) (api.AccessType, error)

func (*DummyDatabase) GetAccount

func (d *DummyDatabase) GetAccount(authType string, ref string) (account *types.Account, id string, err error)

func (*DummyDatabase) GetCommand

func (d *DummyDatabase) GetCommand(ref string) (command *types.Command, err error)
func (d *DummyDatabase) GetDownloadLink(ref string) (link *types.DownloadLink, err error)

func (*DummyDatabase) GetSession

func (d *DummyDatabase) GetSession(ref string) (session *types.Session, err error)
func (d *DummyDatabase) GetShareLink(key string) (shareLink *types.ShareLink, err error)

func (*DummyDatabase) GetShareLinksFromPath

func (d *DummyDatabase) GetShareLinksFromPath(path string, user string) (shareLink []*types.ShareLink, err error)

func (*DummyDatabase) GetUserAccount

func (d *DummyDatabase) GetUserAccount(id string) (account *types.Account, err error)

func (*DummyDatabase) ListAccounts

func (d *DummyDatabase) ListAccounts(searchDict map[string]string) (accounts []*types.Account, err error)

func (*DummyDatabase) ListCommands

func (d *DummyDatabase) ListCommands(user *string, offset int, limit int, search_parameters *api.CommandsSearchParameters) ([]*types.Command, int, error)
func (d *DummyDatabase) ListShareLinks(user string) (shareLinks []*types.ShareLink, err error)

func (*DummyDatabase) Log

func (d *DummyDatabase) Log(level LogLevel, message string)

func (*DummyDatabase) Name

func (d *DummyDatabase) Name() string

func (*DummyDatabase) RemoveSession

func (d *DummyDatabase) RemoveSession(ref string) (err error)
func (d *DummyDatabase) RemoveShareLink(key string) (err error)

func (*DummyDatabase) SaveCommand

func (d *DummyDatabase) SaveCommand(command *types.Command) (err error)
func (d *DummyDatabase) SaveShareLink(shareLink *types.ShareLink) (err error)

func (*DummyDatabase) SetAccess

func (d *DummyDatabase) SetAccess(user *string, path string, access api.AccessType) error

func (*DummyDatabase) StoreSession

func (d *DummyDatabase) StoreSession(session *types.Session) (err error)

func (*DummyDatabase) UpdateAccount

func (d *DummyDatabase) UpdateAccount(id string, account *types.Account) (err error)
func (d *DummyDatabase) UpdateShareLink(shareLink *types.ShareLink) (err error)

type LogLevel

type LogLevel int
const (
	DEBUG LogLevel = iota
	INFO
	WARNING
	ERROR
)

Jump to

Keyboard shortcuts

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