util

package
v0.0.0-...-cd5db6d Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AbsInt

func AbsInt(x int) int

func AesCBCDecrypt

func AesCBCDecrypt(src, key, iv []byte, padding string) ([]byte, error)

func AesCBCEncrypt

func AesCBCEncrypt(src, key, iv []byte, padding string) ([]byte, error)

func Marshal

func Marshal(v interface{}) ([]byte, error)

func MaxInt

func MaxInt(x, y int) int

func Md5

func Md5(text string) string

func MinInt

func MinInt(x, y int) int

func Password

func Password(pwd string, pwdCode string) string

func RandSeq

func RandSeq(n int) string

func UnZip

func UnZip(data []byte) ([]byte, error)

func Unmarshal

func Unmarshal(data []byte, v interface{}) error

func Zip

func Zip(data []byte) ([]byte, error)

Types

type Session

type Session struct {
	MTime time.Time
	Id    int
}

func NewSession

func NewSession(id int, time time.Time) *Session

func ParseSession

func ParseSession(session string) (*Session, error)

func (*Session) IsValid

func (self *Session) IsValid() bool

func (*Session) String

func (self *Session) String() string

Jump to

Keyboard shortcuts

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