base

package
v0.0.0-...-ebc8d01 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2019 License: MIT Imports: 4 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 RespStatusAndIDCODEData

func RespStatusAndIDCODEData(statusCode int, data1 interface{}, data2 interface{}) map[string]interface{}

func RespStatusAndTwoData

func RespStatusAndTwoData(statusCode int, data1 interface{}, data2 interface{}) map[string]interface{}

func SaltHashCompare

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

func SaltHashGenerate

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

func WriteStatusAndDataJSON

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

func WriteStatusAndIDJSON

func WriteStatusAndIDJSON(ctx *server.Context, status int, id 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