xutils

package module
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2022 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultBitMap = NewBitMap(1024)

Functions

func AesDecrypt

func AesDecrypt(crypted, key []byte) ([]byte, error)

func AesEncrypt

func AesEncrypt(origData, key []byte) ([]byte, error)

func HostLocalAddr

func HostLocalAddr() string

HostLocalAddr local address

func HostPublicAddr

func HostPublicAddr() string

HostPublicAddr public address

func HttpGet

func HttpGet(url string, result interface{}) error

HttpGet http get 请求

func HttpPost

func HttpPost(url string, requset interface{}, result interface{}) error

httpPost http post 请求

func JSONFile

func JSONFile(filename string, obj interface{}) error

JSONFile load json file

func LicenseWrite

func LicenseWrite(fileName string, l *License) error

LicenseWrite 写入文件

func PKCS5Padding

func PKCS5Padding(ciphertext []byte, blockSize int) []byte

func PKCS5UnPadding

func PKCS5UnPadding(origData []byte) []byte

func YAMLFile

func YAMLFile(filename string, obj interface{}) error

YAMLFile load yaml file

Types

type BitMap

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

func NewBitMap

func NewBitMap(n int) *BitMap

func NewBitMapWithBase

func NewBitMapWithBase(n, b int) *BitMap

func (*BitMap) All

func (b *BitMap) All() []int

func (*BitMap) Clear

func (b *BitMap) Clear()

func (*BitMap) Del

func (b *BitMap) Del(n int)

func (*BitMap) Include

func (b *BitMap) Include(n int) bool

func (*BitMap) Set

func (b *BitMap) Set(n int)

func (*BitMap) String

func (b *BitMap) String() string

type License

type License struct {
	Address       string    // 发布证书服务地址
	ServeGuid     string    // 服务唯一Id
	ServeName     string    // 服务名称
	MaxNumber     int       // 最大接入设备数目
	CreatedAt     time.Time // 创建时间
	EffectiveTime int       // 有效时长
}

func LicenseRead

func LicenseRead(filename string) (*License, error)

LicenseRead 读

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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