utils

package
v0.0.0-...-499e268 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DatabaseCreate

func DatabaseCreate() error

func DatabaseDelete

func DatabaseDelete(user_id string) error

func DatabaseInsert

func DatabaseInsert(user_id string, token string) error

func GenerateId

func GenerateId() string

func VerifyAdminKey

func VerifyAdminKey(key string) bool

Verify admin key

func VerifyToken

func VerifyToken(token string) (bool, error)

Types

type User

type User struct {
	UserID string `json:"user_id"`
	Token  string `json:"token"`
}

func DatabaseSelectAll

func DatabaseSelectAll() ([]User, error)

Jump to

Keyboard shortcuts

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