extraDB

package
v0.0.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsDataValid added in v0.0.2

func IsDataValid(data interface{}) bool

IsDataValid checks if data is valid

func IsUpdateValid added in v0.0.2

func IsUpdateValid(update interface{}) bool

IsUpdateValid checks if the update is valid

Types

type ExtraDB

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

ExtraDB is used to handle user extra data

func New

func New() *ExtraDB

New returns a new extraDB handler struct

func (ExtraDB) Create

func (extraDB ExtraDB) Create(data types.Extra) string

Create is used to add new data into database

func (ExtraDB) Get

func (extraDB ExtraDB) Get(userID string) (data types.Extra)

Get is used to a users data

func (ExtraDB) Update

func (extraDB ExtraDB) Update(userID string, update types.Extra) string

Update updates user's extraDB data

Jump to

Keyboard shortcuts

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