modules

package
v0.0.0-...-e75eb70 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2020 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	I *initialize = nil
)
View Source
var (
	Translated *i18n
)

Functions

func InstanceDB

func InstanceDB(dbTable string, selector ...int) (dbInstance *database, err error)

func InstanceRd

func InstanceRd(rPoT *RdPoT) (rdInstance *rd, err error)

func New

func New() *module

func NewDatabase

func NewDatabase() *database

func NewI18N

func NewI18N() *i18n

func NewInitialize

func NewInitialize() *initialize

func NewRedis

func NewRedis() *rd

func Sd

func Sd(ctx *gin.Context) *sd

func SdInstance

func SdInstance() gin.HandlerFunc

Types

type File

type File struct {
}

func NewFile

func NewFile() *File

func (*File) Create

func (fs *File) Create(pathname string) (err error)

func (*File) IsExists

func (fs *File) IsExists(pathname string) (ok bool, err error)

func (*File) Open

func (fs *File) Open(pathname string) (f *os.File, err error)

func (*File) Writer

func (fs *File) Writer(pathname string, content ...interface{}) (err error)

type Mail

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

func NewMail

func NewMail(cfg *MailPoT) *Mail

func (*Mail) Send

func (mail *Mail) Send(mpPoT []*MailParamsPoT) (err error)

type MailParamsPoT

type MailParamsPoT struct {
	From    string
	To      string
	Subject string
	Body    string
}

type MailPoT

type MailPoT struct {
	Username string
	Password string
	Host     string
	Port     int
}

type RdPoT

type RdPoT struct {
	DB       int
	Selector bool
}

type RedisPoT

type RedisPoT struct {
	Addr     string
	Password string
	DB       int
}

type Token

type Token struct {
	Keys *TokenPoT
}

func NewToken

func NewToken() *Token

func (*Token) Pwd

func (token *Token) Pwd(keys ...string) (res string, err error)

type TokenPoT

type TokenPoT struct {
	PubKey []byte
	PrvKey []byte
}

type Utils

type Utils struct {
}

func NewUtils

func NewUtils() *Utils

func (*Utils) IntRand

func (util *Utils) IntRand(min, max int) int

func (*Utils) InterfaceToStringInMap

func (util *Utils) InterfaceToStringInMap(data map[interface{}]interface{}) (toMap map[string]interface{})

func (*Utils) InterfaceToStruct

func (util *Utils) InterfaceToStruct(data map[interface{}]interface{}, res interface{}) (err error)

func (*Utils) JsonToMap

func (util *Utils) JsonToMap(data []byte) (toMap map[string]interface{})

func (*Utils) MapToStruct

func (util *Utils) MapToStruct(src interface{}, data interface{}) (err error)

func (*Utils) SetTimeLocation

func (util *Utils) SetTimeLocation(toTime string) (*time.Location, error)

func (*Utils) StrContains

func (util *Utils) StrContains(str string, src ...interface{}) (ok bool, err error)

func (*Utils) StructToMap

func (util *Utils) StructToMap(data interface{}) (res *gin.H, err error)

type YuwInitialize

type YuwInitialize struct {
	Table bool
	Redis bool
	I18nT bool
	Email bool
	Admin bool
}

Jump to

Keyboard shortcuts

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