morekit

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

* morekit.go Kit-difine * by:Leftyer * dt:2025-11-01

Index

Constants

View Source
const (
	DBTypePostgreSQL = kitDB.DBTypePostgreSQL
	DBTypeSQLite     = kitDB.DBTypeSQLite
)

DataBase-type-difine by:Leftyer dt:2025-11-01

Variables

This section is empty.

Functions

func AppDataPath added in v0.1.6

func AppDataPath(appName string) (string, error)

AppData-Path by:Leftyer dt:2025-11-01

func BuildFileName added in v0.1.16

func BuildFileName(ext string) string

File-BuildFileName by:Leftyer dt:2025-11-01

func DateFormatDay added in v0.1.6

func DateFormatDay(d string) string

Date-FormatDay by:Leftyer dt:2025-11-01

func DeviceGetBIOSUUID

func DeviceGetBIOSUUID() string

Device-GetBIOSUUID by:Leftyer dt:2025-11-01

func DeviceGetBootTime

func DeviceGetBootTime() string

Device-GetBootTime by:Leftyer dt:2025-11-01

func DeviceGetCPUCores

func DeviceGetCPUCores() int

Device-GetCPUCores by:Leftyer dt:2025-11-01

func DeviceGetCPUName

func DeviceGetCPUName() string

Device-GetCPUName by:Leftyer dt:2025-11-01

func DeviceGetDefaultIP

func DeviceGetDefaultIP() string

Device-GetDefaultIP by:Leftyer dt:2025-11-01

func DeviceGetDiskTotalGB

func DeviceGetDiskTotalGB() float64

Device-GetDiskTotalGB by:Leftyer dt:2025-11-01

func DeviceGetIPList

func DeviceGetIPList() []string

Device-GetIPList by:Leftyer dt:2025-11-01

func DeviceGetId

func DeviceGetId() string

Device-GetId by:Leftyer dt:2025-11-01

func DeviceGetInfo

func DeviceGetInfo() *host.InfoStat

Device-GetInfo by:Leftyer dt:2025-11-01

func DeviceGetMACList

func DeviceGetMACList() []string

Device-GetMACList by:Leftyer dt:2025-11-01

func DeviceGetMemoryGB

func DeviceGetMemoryGB() float64

Device-GetMemoryGB by:Leftyer dt:2025-11-01

func DeviceGetName

func DeviceGetName() string

Device-GetName by:Leftyer dt:2025-11-01

func EncAesCbcDecrypt added in v0.1.9

func EncAesCbcDecrypt(ciphertext, key string) (string, error)

Encryption-AesCbcDecrypt by:Leftyer dt:2025-11-01

func EncAesCbcEncrypt added in v0.1.9

func EncAesCbcEncrypt(plaintext, key string) (string, error)

Encryption-AesCbcEncrypt by:Leftyer dt:2025-11-01

func EncAesGcmDecrypt added in v0.1.9

func EncAesGcmDecrypt(ciphertext, key string) (string, error)

Encryption-AesGcmDecrypt by:Leftyer dt:2025-11-01

func EncAesGcmEncrypt added in v0.1.9

func EncAesGcmEncrypt(plaintext, key string) (string, error)

Encryption-AesGcmEncrypt by:Leftyer dt:2025-11-01

func EncArgon2idHash added in v0.1.9

func EncArgon2idHash(password string) (string, error)

Encryption-Argon2idHash by:Leftyer dt:2025-11-01

func EncArgon2idVerify added in v0.1.9

func EncArgon2idVerify(password, encodedHash string) (bool, error)

Encryption-Argon2idVerify by:Leftyer dt:2025-11-01

func EncBase64Decode added in v0.1.9

func EncBase64Decode(ciphertext string) (string, error)

Encryption-Base64Decode by:Leftyer dt:2025-11-01

func EncBase64Encode added in v0.1.9

func EncBase64Encode(plaintext string) string

Encryption-Base64Encode by:Leftyer dt:2025-11-01

func EncBase64URLDecode added in v0.1.9

func EncBase64URLDecode(ciphertext string) (string, error)

Encryption-Base64UrlDecode by:Leftyer dt:2025-11-01

func EncBase64URLEncode added in v0.1.9

func EncBase64URLEncode(plaintext string) string

Encryption-Base64UrlEncode by:Leftyer dt:2025-11-01

func EncBcryptHash added in v0.1.9

func EncBcryptHash(password string) (string, error)

Encryption-BcryptHash by:Leftyer dt:2025-11-01

func EncBcryptVerify added in v0.1.9

func EncBcryptVerify(password, hash string) bool

Encryption-BcryptVerify by:Leftyer dt:2025-11-01

func EncDesDecrypt added in v0.1.9

func EncDesDecrypt(ciphertext, key string) (string, error)

Encryption-DesDecrypt by:Leftyer dt:2025-11-01

func EncDesEncrypt added in v0.1.9

func EncDesEncrypt(plaintext, key string) (string, error)

Encryption-DesEncrypt by:Leftyer dt:2025-11-01

func EncHmacSha256 added in v0.1.9

func EncHmacSha256(plaintext, key string) string

Encryption-HmacSha256 by:Leftyer dt:2025-11-01

func EncHmacSha512 added in v0.1.9

func EncHmacSha512(plaintext, key string) string

Encryption-HmacSha512 by:Leftyer dt:2025-11-01

func EncMd5 added in v0.1.6

func EncMd5(plaintext string) string

Encryption-Md5 by:Leftyer dt:2025-11-01

func EncRsaDecrypt added in v0.1.9

func EncRsaDecrypt(ciphertext, priKey string) (string, error)

Encryption-RsaDecrypt by:Leftyer dt:2025-11-01

func EncRsaEncrypt added in v0.1.9

func EncRsaEncrypt(plaintext, pubKey string) (string, error)

Encryption-RsaEncrypt by:Leftyer dt:2025-11-01

func EncRsaGenerateKey added in v0.1.9

func EncRsaGenerateKey(bits int) (priKey, pubKey string, err error)

Encryption-RsaGenerateKey by:Leftyer dt:2025-11-01

func EncRsaSign added in v0.1.9

func EncRsaSign(data, priKey string) (string, error)

Encryption-RsaSign by:Leftyer dt:2025-11-01

func EncRsaVerify added in v0.1.9

func EncRsaVerify(data, sign, pubKey string) error

Encryption-RsaVerify by:Leftyer dt:2025-11-01

func EncSha1 added in v0.1.9

func EncSha1(plaintext string) string

Encryption-Sha1 by:Leftyer dt:2025-11-01

func EncSha256 added in v0.1.9

func EncSha256(plaintext string) string

Encryption-Sha256 by:Leftyer dt:2025-11-01

func EncSha512 added in v0.1.9

func EncSha512(plaintext string) string

Encryption-Sha512 by:Leftyer dt:2025-11-01

func EncUrlDecode added in v0.1.9

func EncUrlDecode(ciphertext string) (string, error)

Encryption-UrlDecode by:Leftyer dt:2025-11-01

func EncUrlEncode added in v0.1.9

func EncUrlEncode(plaintext string) string

Encryption-UrlEncode by:Leftyer dt:2025-11-01

func FileCopy added in v0.1.5

func FileCopy(src, dst string) error

File-Copy by:Leftyer dt:2025-11-01

func FileIsExist

func FileIsExist(path string) bool

File-IsExist by:Leftyer dt:2025-11-01

func FileRead

func FileRead(filePath string) (string, error)

File-Read by:Leftyer dt:2025-11-01

func FileReadGob added in v0.1.9

func FileReadGob[T any](path string) (*T, error)

File-ReadGob by:Leftyer dt:2025-11-01

func FileReadJson added in v0.1.9

func FileReadJson[T any](path string) (*T, error)

File-ReadJson by:Leftyer dt:2025-11-01

func FileReadLarge added in v0.1.15

func FileReadLarge(path string) (string, error)

File-ReadLarge by:Leftyer dt:2026-08-07

func FileUpload added in v0.1.9

func FileUpload(subDir string, file *multipart.FileHeader) (*kitFile.UploadResult, error)

File-Upload by:Leftyer dt:2025-11-01

func FileUploadWithConfig added in v0.1.9

func FileUploadWithConfig(cfg kitFile.FileConfig, subDir string, file *multipart.FileHeader) (*kitFile.UploadResult, error)

File-UploadWithConfig by:Leftyer dt:2025-11-01

func FileWrite

func FileWrite(filePath string, content string, isAppend bool) error

File-Write by:Leftyer dt:2025-11-01

func FileWriteGob added in v0.1.9

func FileWriteGob[T any](path string, v T) error

File-WriteGob by:Leftyer dt:2025-11-01

func FileWriteJson added in v0.1.9

func FileWriteJson[T any](path string, obj T) error

File-WriteJson by:Leftyer dt:2025-11-01

func FolderClear added in v0.1.6

func FolderClear(path string) error

Folder-Clear by:Leftyer dt:2025-11-01

func FolderCopy added in v0.1.5

func FolderCopy(src, dst string) error

Folder-Copy by:Leftyer dt:2025-11-01

func FolderIsExist

func FolderIsExist(path string, isClear int) bool

Folder-IsExist by:Leftyer dt:2025-11-01

func GobRead added in v0.1.9

func GobRead[T any](path string) (*T, error)

Gob-Read by:Leftyer dt:2025-11-01

func GobWrite added in v0.1.9

func GobWrite[T any](path string, obj T) error

Gob-Write by:Leftyer dt:2025-11-01

func JsonRead

func JsonRead[T any](path string) (*T, error)

Json-Read by:Leftyer dt:2025-11-01

func JsonWrite

func JsonWrite[T any](path string, obj T) error

Json-Write by:Leftyer dt:2025-11-01

func MapperBatch added in v0.1.12

func MapperBatch[Src any, Dst any](src []Src) []Dst

* MapperBatch 切片批量转换 by:Leftyer dt:2026-08-06

func MapperSingle added in v0.1.12

func MapperSingle[Src any, Dst any](src Src) Dst

--------------- Mapper Area --------------- * MapperSingle 单对象转换 by:Leftyer dt:2026-08-06

func NetworkGetFreePort added in v0.1.7

func NetworkGetFreePort() int

Network-GetFreePort by:Leftyer dt:2025-11-21

func NetworkIsPortActivate added in v0.1.7

func NetworkIsPortActivate(port int) bool

Network-IsPortActivate by:Leftyer dt:2025-11-21

func ProcessStart added in v0.2.0

func ProcessStart(exePath string, args []string, workDir string) error

Process-Start by:Leftyer dt:2025-11-01

func TplLoad added in v0.1.6

func TplLoad(cfg TmplConfig) error

Template-TplLoad by:Leftyer dt:2025-11-01

Types

type APIResult added in v0.1.10

type APIResult = kitUtility.APIResult

Entity-APIResult by:Leftyer dt:2025-11-01

type BaseEntity added in v0.1.14

type BaseEntity = kitUtility.BaseEntity

Entity-BaseEntity by:Leftyer dt:2025-11-01

type BaseIdEntity added in v0.1.14

type BaseIdEntity = kitUtility.BaseIdEntity

Entity-BaseIdEntity by:Leftyer dt:2025-11-01

type BasePageEntity added in v0.1.14

type BasePageEntity = kitUtility.BasePageEntity

Entity-BasePageEntity by:Leftyer dt:2025-11-01

type DBConfig added in v0.1.6

type DBConfig = kitDB.DBConfig

Database-DBConfig by:Leftyer dt:2025-11-19

type DBer added in v0.1.6

type DBer = kitDB.DBer

Database-DBer by:Leftyer dt:2025-11-19

func DBCore added in v0.1.6

func DBCore(acfg DBConfig) (DBer, error)

Database-Core by:Leftyer dt:2025-11-01

type FileConfig added in v0.1.10

type FileConfig = kitFile.FileConfig

File-Config by:Leftyer dt:2025-11-01

type PageResult added in v0.1.14

type PageResult[T any] = kitUtility.PageResult[T]

Entity-PageResult by:Leftyer dt:2025-11-01

type TmplConfig added in v0.1.6

type TmplConfig = kitTemplate.TmplConfig

Template-TmplConfig by:Leftyer dt:2025-11-19

type UploadResult added in v0.1.10

type UploadResult = kitFile.UploadResult

File-UploadResult by:Leftyer dt:2025-11-01

Jump to

Keyboard shortcuts

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