database

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init()

func SetServer

func SetServer(server *Server)

func SetUser

func SetUser(user *User)

Types

type Server

type Server struct {
	Id        int    `json:"id"`
	Name      string `json:"name"`
	Data      string `json:"data"`
	Enabled   bool   `json:"enabled"`
	PublicKey string `json:"publicKey"`
}

func GetServer

func GetServer(id int) *Server

func GetServerByName

func GetServerByName(name string) *Server

type User

type User struct {
	Id       int    `json:"id"`
	Name     string `json:"name"`
	Password string
	Admin    bool   `json:"admin"`
	Email    string `json:"email"`
	Data     string `json:"data"`
	Banned   bool   `json:"banned"`
}

func GetUser

func GetUser(id int) *User

func (*User) Mask

func (u *User) Mask()

Jump to

Keyboard shortcuts

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