Documentation
¶
Index ¶
- func CreateJwtToken(secret, issuer string, audience []string, subject string, expired time.Time) (string, error)
- func DecodeId(id, alphabet, salt string, length int) int
- func DecodeIdArray(ids []string, alphabet, salt string, length int) []int
- func DecryptAES(cipherText, key, iv string) (string, error)
- func EncodeId(id int, alphabet, salt string, length int) string
- func EncryptAES(plainText, key, iv string) (string, error)
- func GetValueByTag(entity any, tagName, tagValue string) (any, error)
- func LoadConfig(path string, cfgPtr any) error
- func MD5(plainText string) string
- func MD5Mix(plainText string, first, last int) string
- func ParseJwtToken(token, secret, issuer string, audience []string) (string, error)
- type KodoClient
- type KodoConfig
- type SftpClient
- func (cli *SftpClient) Delete(dir string) error
- func (cli *SftpClient) Disconnect() error
- func (cli *SftpClient) Download(srcPath, dstPath string) error
- func (cli *SftpClient) ListDirs(path, suffix string) ([]string, error)
- func (cli *SftpClient) ListFiles(path, suffix string) ([]string, error)
- func (cli *SftpClient) MakeDirs(dir string) error
- func (cli *SftpClient) Rename(oldname, newname string) error
- func (cli *SftpClient) Upload(srcPath, dstPath string) error
- type SftpConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateJwtToken ¶
func CreateJwtToken(secret, issuer string, audience []string, subject string, expired time.Time) (string, error)
生成 JWT Token
func DecodeIdArray ¶
转换id数组
func GetValueByTag ¶
根据tag信息获取值
Types ¶
type KodoClient ¶
type KodoClient struct {
// contains filtered or unexported fields
}
kodo云存储客户端
func NewKodoClient ¶
func NewKodoClient(accessKey, secretKey, region, bucket string) *KodoClient
创建kodo客户端
type KodoConfig ¶
type KodoConfig struct { AccessKey string `mapstructure:"accessKey"` SecretKey string `mapstructure:"secretKey"` Region string `mapstructure:"region"` Bucket string `mapstructure:"bucket"` }
七牛云配置
type SftpClient ¶
type SftpClient struct {
// contains filtered or unexported fields
}
sftp客户端
func NewSftpClient ¶
func NewSftpClient(host string, port int64, username, password string) (*SftpClient, error)
创建sftp客户端
func (*SftpClient) ListDirs ¶
func (cli *SftpClient) ListDirs(path, suffix string) ([]string, error)
列举目录中的文件夹
Click to show internal directories.
Click to hide internal directories.