jsondb

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JsonDB

type JsonDB struct {
	// contains filtered or unexported fields
}

func New

func New(dbPath string) (*JsonDB, error)

New returns a new pointer JsonDB

func (*JsonDB) DeleteClient

func (o *JsonDB) DeleteClient(clientID string) error

func (*JsonDB) GetClientByID

func (o *JsonDB) GetClientByID(clientID string, hasQRCode bool) (model.ClientData, error)

func (*JsonDB) GetClients

func (o *JsonDB) GetClients(hasQRCode bool) ([]model.ClientData, error)

func (*JsonDB) GetGlobalSettings

func (o *JsonDB) GetGlobalSettings() (model.GlobalSetting, error)

GetGlobalSettings func to query global settings from the database

func (*JsonDB) GetServer

func (o *JsonDB) GetServer() (model.Server, error)

GetServer func to query Server setting from the database

func (*JsonDB) GetUser

func (o *JsonDB) GetUser() (model.User, error)

GetUser func to query user info from the database

func (*JsonDB) Init

func (o *JsonDB) Init() error

func (*JsonDB) SaveClient

func (o *JsonDB) SaveClient(client model.Client) error

func (*JsonDB) SaveGlobalSettings

func (o *JsonDB) SaveGlobalSettings(globalSettings model.GlobalSetting) error

func (*JsonDB) SaveServerInterface

func (o *JsonDB) SaveServerInterface(serverInterface model.ServerInterface) error

func (*JsonDB) SaveServerKeyPair

func (o *JsonDB) SaveServerKeyPair(serverKeyPair model.ServerKeypair) error

Jump to

Keyboard shortcuts

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