mine

package module
v1.0.20 Latest Latest
Warning

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

Go to latest
Published: May 31, 2022 License: Apache-2.0 Imports: 17 Imported by: 0

README

mine

介绍

开源的工具集

软件架构

软件架构说明

安装教程
使用说明
参与贡献
特技

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Config = map[string]map[string]string{}
View Source
var Controller = map[string]func(http.ResponseWriter, *http.Request){
	"controller.Home":      controller.Home,
	"controller.Status404": controller.Status404,
}
View Source
var Route = map[string]string{
	"/":            "controller.Home",
	"/favicon.ico": "controller.Status404",
}
View Source
var TEST = true
View Source
var Time = struct {
	Name   string `json:"name"`
	Zone   int    `json:"zone"`
	Format string `json:"format"`
}{
	Name:   "CST",
	Zone:   8 * 3600,
	Format: time.RFC3339,
}

Functions

func Amqp added in v1.0.12

func Amqp() (conn *amqp.Connection, err error)

func GetAuthorization added in v1.0.12

func GetAuthorization(r *http.Request) (s string)

func GetBearer added in v1.0.12

func GetBearer(r *http.Request) (s string)

func GetClientIp added in v1.0.18

func GetClientIp(r *http.Request) (ip string)

func InitConfig added in v1.0.14

func InitConfig(path ...string) (err error)

func MySQL added in v1.0.12

func MySQL() (db *sql.DB, err error)

func Now

func Now(format ...string) string

func Pln

func Pln(a ...any)

func Str2Time added in v1.0.20

func Str2Time(s string) (i int, err error)

func YunPianSend added in v1.0.16

func YunPianSend(mobile, msg string) (err error)

Types

type Return

type Return struct {
	Status   bool `json:"status"`
	Code     any  `json:"code"`
	Msg      any  `json:"msg"`
	Data     any  `json:"data"`
	Datetime any  `json:"datetime,omitempty"`
}

func Err

func Err(a ...any) (r Return)

func Succ

func Succ(a ...any) (r Return)

func (Return) JsonEnCode

func (r Return) JsonEnCode() string

func (Return) JsonEnCodeByte added in v1.0.12

func (r Return) JsonEnCodeByte() (b []byte)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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