server

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2023 License: MIT Imports: 11 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	ResponseCodeUnknownError = -10000 - iota
	ResponseCodeParamParseError
	ResponseCodeParamNotEnough
	ResponseCodePasswordStrengthInvalid
	ResponseCodeDuplicated
	ResponseCodeDatabase
	ResponseCodeDataNotExists
	ResponseCodeDataNotMatch
	ResponseCodeModuleNotExists
	ResponseCodeGeneration
)

Variables

View Source
var (
	ResponseMsgUnknownError            = "系统错误"
	ResponseMsgParamParseError         = "参数解析失败"
	ResponseMsgParamNotEnough          = "参数不足"
	ResponseMsgPasswordStrengthInvalid = "密码强度不够"
	ResponseMsgDuplicated              = "数据重复"
	ResponseMsgDatabase                = "执行数据库语句失败"
	ResponseMsgDataNotExists           = "数据不存在"
	ResponseMsgDataNotMatch            = "数据不匹配"
	ResponseMsgModuleNotExists         = "模块不存在"
	ResponseMsgGeneration              = "生成信息失败"
)

Functions

func All

func All(path string, handlers ...fiber.Handler) fiber.Router

func Delete

func Delete(path string, handlers ...fiber.Handler) fiber.Router

func Get

func Get(path string, handlers ...fiber.Handler) fiber.Router

func Group

func Group(path string, handlers ...fiber.Handler) fiber.Router

func InitWebApp

func InitWebApp(views fiber.Views) *webApp

func Listener

func Listener(ln net.Listener) error

func ParsePaginationInfoFromQuery added in v0.1.1

func ParsePaginationInfoFromQuery(ctx *fiber.Ctx) (limit, offset int, orderBy string, err error)

func Post

func Post(path string, handlers ...fiber.Handler) fiber.Router

func Put

func Put(path string, handlers ...fiber.Handler) fiber.Router

func Shutdown

func Shutdown() error

func Start

func Start() error

func Static

func Static(dir string)

func Use

func Use(args ...interface{}) fiber.Router

Types

type CommonResponse

type CommonResponse struct {
	Code int         `json:"code,omitempty"`
	Msg  string      `json:"msg,omitempty"`
	Data interface{} `json:"data,omitempty"`
}

type Paginate

type Paginate struct {
	Total  int64       `json:"total"`
	Offset int         `json:"offset"`
	Limit  int         `json:"limit"`
	Items  interface{} `json:"items"`
}

type TimeCondition

type TimeCondition struct {
	Start database.DateTime `json:"start,omitempty" query:"start"`
	End   database.DateTime `json:"end,omitempty" query:"end"`
}

Jump to

Keyboard shortcuts

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