codes

package
v0.0.0-...-7540414 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2020 License: MIT Imports: 9 Imported by: 1

Documentation

Index

Constants

View Source
const (
	SPLIT_CHAR = ","
	QUATO      = "\""
)

Variables

This section is empty.

Functions

func JoinAndSort

func JoinAndSort(p map[string]string, contact, split string) string

*

连接变量名和变量值,并按变量名进行排序

func ToMd5Hex

func ToMd5Hex(str string) string

Types

type AsString

type AsString struct {
	Value string
}

JSON的万能转换,将其它类型转换成string

func (*AsString) MarshalJSON

func (this *AsString) MarshalJSON() ([]byte, error)

作为普通字符串输出

func (*AsString) UnmarshalJSON

func (this *AsString) UnmarshalJSON(data []byte) error

type Sensitive

type Sensitive struct {
	Head    int            //头,位数
	Tail    int            //尾,位数
	Padding bool           //是否补齐
	Replace bool           //是否替换
	Pattern *regexp.Regexp //正则表达式
	Mask    rune           //掩码字符
}

func (*Sensitive) Convert

func (this *Sensitive) Convert(source string) string

执行转换

type Tags

type Tags struct {
	Values []string
}

标签

func (*Tags) FromString

func (this *Tags) FromString(str string)

func (*Tags) MarshalJSON

func (this *Tags) MarshalJSON() ([]byte, error)

作为普通字符串输出

func (*Tags) ToString

func (this *Tags) ToString() string

func (*Tags) UnmarshalJSON

func (this *Tags) UnmarshalJSON(data []byte) error

type ThreeDES

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

func (*ThreeDES) Decrypt

func (this *ThreeDES) Decrypt(src string) (string, error)

func (*ThreeDES) DecryptForce

func (this *ThreeDES) DecryptForce(str string) string

func (*ThreeDES) Encrypt

func (this *ThreeDES) Encrypt(str string) (string, error)

func (*ThreeDES) EncryptForce

func (this *ThreeDES) EncryptForce(str string) string

func (*ThreeDES) SetKey

func (this *ThreeDES) SetKey(s string) error

Jump to

Keyboard shortcuts

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