mainDB

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsDataValid added in v0.0.5

func IsDataValid(data interface{}) bool

IsDataValid checks if data is valid

func IsUpdateValid added in v0.0.5

func IsUpdateValid(update interface{}) bool

IsUpdateValid checks if the update is valid

Types

type MainDB

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

MainDB is used to handle user mainDB data

func New

func New() *MainDB

New returns a new mainDB handler struct

func (MainDB) Create

func (mainDB MainDB) Create(data types.Main) string

Create is used to add new mainDB data

func (MainDB) GenerateID

func (mainDB MainDB) GenerateID() string

GenerateID is used to generate an user id

func (MainDB) Get

func (mainDB MainDB) Get(filter types.Main) (data types.Main)

Get is used to a users data

func (MainDB) Update

func (mainDB MainDB) Update(userID string, update types.Main) string

Update updates user's mainDB data

Jump to

Keyboard shortcuts

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