base

package
v0.0.0-...-6e9c874 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CtxKeyUID = "uid"
)

Variables

This section is empty.

Functions

func RespStatusAndData

func RespStatusAndData(statusCode int, data interface{}) map[string]interface{}

func SaltHashCompare

func SaltHashCompare(digest []byte, password *string) bool

func SaltHashGenerate

func SaltHashGenerate(password *string) (string, error)

func Transport

func Transport(req *http.Request) (int, string)

func WriteStatusAndDataJSON

func WriteStatusAndDataJSON(ctx *server.Context, status int, data interface{}) error

func WriteStatusAndIDJSON

func WriteStatusAndIDJSON(ctx *server.Context, status int, id interface{}) error

func WriteStatusAndPageJSON

func WriteStatusAndPageJSON(ctx *server.Context, status int, data, data1, data2, pages interface{}) error

Types

type Context

type Context struct {
	*server.Context
}

func (*Context) SetUID

func (c *Context) SetUID(id uint32)

func (*Context) UID

func (c *Context) UID() uint32

type Controller

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

func New

func New(db *sql.DB) *Controller

func (*Controller) SQLStore

func (c *Controller) SQLStore() *sql.DB

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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