common

package
v0.0.0-...-1fd6b9d Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2021 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Client clients

Functions

func AesDecryptCBC

func AesDecryptCBC(enc string, key []byte) (string, error)

func AesEncryptCBC

func AesEncryptCBC(origData []byte, key []byte) string

func CheckIp

func CheckIp(ip string) bool

func Md5

func Md5(str []byte) []byte

func ReleaseToken

func ReleaseToken(id uint) (token string, err error)

func Sendsms

func Sendsms(phone string) (captcha string, err error)

func Verify

func Verify(v verifyImpl) (isVerify bool)

func VerifyMobileFormat

func VerifyMobileFormat(mobileNum string) bool

Types

type Claims

type Claims struct {
	Userid uint
	jwt.StandardClaims
}

func ParseToken

func ParseToken(token string) (*Claims, error)

type SftpClient

type SftpClient struct {
	Uid  uint
	Sftp *sftp.Client
}

func (*SftpClient) ReceiveWsMsg

func (c *SftpClient) ReceiveWsMsg(wsConn *websocket.Conn, exitCh chan bool)

func (*SftpClient) SessionWait

func (c *SftpClient) SessionWait(wsConn *websocket.Conn, quitChan chan bool)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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