goutil

package module
v0.0.0-...-a7e1b89 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2020 License: Apache-2.0 Imports: 16 Imported by: 4

README

goutil

utils for go-gywn project

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLogger

func GetLogger() (log *logrus.Logger)

GetLogger get logger

func GinMode

func GinMode() string

GinMode get gin mode

Types

type Crypto

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

Crypto Crypto

func GetCrypto

func GetCrypto(key string) Crypto

GetCrypto Get Crypto

func (*Crypto) DecryptAES

func (o *Crypto) DecryptAES(securemess string) (decodedmess string)

DecryptAES Decrypt AES algorithm

func (*Crypto) EncryptAES

func (o *Crypto) EncryptAES(message string) (encmess string)

EncryptAES Decrypt AES algorithm

func (*Crypto) MD5

func (o *Crypto) MD5(value string) string

MD5 get md5

func (*Crypto) SHA1

func (o *Crypto) SHA1(value string) string

SHA1 get sha1

type FileUtil

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

FileUtil FileUtil

func GetFileUtil

func GetFileUtil() FileUtil

GetFileUtil GetFileUtil

func (*FileUtil) GetABSPath

func (o *FileUtil) GetABSPath() string

GetABSPath GetABSPath

func (*FileUtil) GetFilePath

func (o *FileUtil) GetFilePath(path string) string

GetFilePath GetFilePath

func (*FileUtil) GetTemplate

func (o *FileUtil) GetTemplate(name string, templateString string) (t *template.Template, err error)

GetTemplate GetTemplate

func (*FileUtil) ReadFile

func (o *FileUtil) ReadFile(path string) (r string)

ReadFile read file content

Jump to

Keyboard shortcuts

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