nitrdb

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetApiKey

func GetApiKey() string

GetApiKey returns current User Api Key

func SetUserData

func SetUserData(db *bolt.DB, id string, user User) error

SetUserData adds User data to nitr database with default values

func SetupDB

func SetupDB() (*bolt.DB, error)

SetupDB creates nitr database with default values

Types

type User

type User struct {
	Username string `json:"username"`
	Password string `json:"password"`
	Apikey   string `json:"apikey"`
	QrCode   string `json:"qrCode"`
}

User data

func GetUserByID

func GetUserByID(db *bolt.DB, id string) User

GetUserByID returns User by ID

Jump to

Keyboard shortcuts

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