Documentation
¶
Index ¶
- Constants
- func CheckErr(err error)
- func ExportExcel(list interface{}, fileName string, headers, columns []string) error
- func GetCurrentPath() string
- func InitConfig[T any](path string, isDefault ...bool) T
- func IntArrJoinString(arr []int, spilt string) string
- func JsonBodyToObj[T any](data []byte) (result T)
- func JsonToObj[T any](str string) T
- func LoadConfig[T any](path string, isDefault ...bool) T
- func MD5(str string) string
- func RSADecrypt(ciphertext, privateKeyArr []byte) []byte
- func RSADecryptBase64(ciphertext string, privateKeyArr []byte) string
- func RSAEncrypt(plaintext, publicKeyArr []byte) []byte
- func RSAEncryptBase64(plaintext string, publicKeyArr []byte) string
- func ReadFile(path string) []byte
- func SetConfig[T any](path string, isDefault ...bool) T
- func SliceExcept[T1 any, T2 any, T3 any](slice1 []T1, slice2 []T2, compare func(T1, T2) bool, returnValue func(T1) T3) []T3
- func SliceExceptSame[T any](slice1, slice2 []T, compare func(T, T) bool) []T
- func SliceIntersect[T1 any, T2 any, T3 any](slice1 []T1, slice2 []T2, compare func(T1, T2) bool, ...) []T3
- func SliceIntersectSame[T any](slice1, slice2 []T, compare func(T, T) bool) []T
- func SliceUnion[T any](slice1, slice2 []T, compare func(T, T) bool) []T
- func StrLen(str string) int
- func StrToIntArr(str string) []int
- func StringToTime(timeValue string) (time.Time, error)
- func SubMonth(t1, t2 time.Time) (month int)
- func SubString(str string, begin, length int) string
- func ToJson(t interface{}) string
- func ToJsonBody(t interface{}) []byte
- func ToXML(t interface{}) string
- func ToXMLBody(t interface{}) []byte
- func XMLBodyToObj[T any](data []byte) (result T)
- func XMLToObj[T any](str string) T
- type ColWidth
- type KeyStyle
- type ProcessCmd
- func (p *ProcessCmd) Columns(columns ...string) *ProcessCmd
- func (p *ProcessCmd) Headers(headers ...string) *ProcessCmd
- func (p *ProcessCmd) SavePath(path string) *ProcessCmd
- func (p *ProcessCmd) Sheet(sheet string) *ProcessCmd
- func (p *ProcessCmd) Style(f func(currentSheet string, f *excelize.File) error) *ProcessCmd
- func (p *ProcessCmd) ToExcel() *ProcessCmd
- type ProcessCmdStream
- func (p *ProcessCmdStream) Columns(columns ...string) *ProcessCmdStream
- func (p *ProcessCmdStream) Headers(header ...string) *ProcessCmdStream
- func (p *ProcessCmdStream) NewStyle(newStyleFunc ...KeyStyle) *ProcessCmdStream
- func (p *ProcessCmdStream) SavePath(path string) *ProcessCmdStream
- func (p *ProcessCmdStream) SetColWidth(min, max int, width float64) *ProcessCmdStream
- func (p *ProcessCmdStream) Sheet(sheet string) *ProcessCmdStream
- func (p *ProcessCmdStream) Style(...) *ProcessCmdStream
- func (p *ProcessCmdStream) ToExcel() *ProcessCmdStream
- func (p *ProcessCmdStream) Writer(writer io.Writer) *ProcessCmdStream
Constants ¶
View Source
const ( DevConfig configType = iota TestConfig ProdConfig OtherConfig )
Variables ¶
This section is empty.
Functions ¶
func ExportExcel ¶ added in v1.4.7
func GetCurrentPath ¶
func GetCurrentPath() string
func IntArrJoinString ¶
func JsonBodyToObj ¶
func RSADecrypt ¶ added in v1.3.5
func RSADecryptBase64 ¶ added in v1.3.9
func RSAEncrypt ¶ added in v1.3.5
func RSAEncryptBase64 ¶ added in v1.3.9
func SliceExcept ¶ added in v1.0.7
func SliceExceptSame ¶ added in v1.0.8
func SliceIntersect ¶ added in v1.0.7
func SliceIntersectSame ¶ added in v1.0.8
func SliceUnion ¶ added in v1.0.7
func StrToIntArr ¶
func ToJsonBody ¶
func ToJsonBody(t interface{}) []byte
func XMLBodyToObj ¶
Types ¶
type ProcessCmd ¶ added in v1.4.7
type ProcessCmd struct { DefaultSheetName string Path string Error error // contains filtered or unexported fields }
func ExcelProcess ¶ added in v1.4.7
func ExcelProcess(val interface{}) (p *ProcessCmd)
func (*ProcessCmd) Columns ¶ added in v1.4.7
func (p *ProcessCmd) Columns(columns ...string) *ProcessCmd
func (*ProcessCmd) Headers ¶ added in v1.4.7
func (p *ProcessCmd) Headers(headers ...string) *ProcessCmd
func (*ProcessCmd) SavePath ¶ added in v1.4.7
func (p *ProcessCmd) SavePath(path string) *ProcessCmd
func (*ProcessCmd) Sheet ¶ added in v1.4.7
func (p *ProcessCmd) Sheet(sheet string) *ProcessCmd
func (*ProcessCmd) Style ¶ added in v1.4.7
func (p *ProcessCmd) Style(f func(currentSheet string, f *excelize.File) error) *ProcessCmd
func (*ProcessCmd) ToExcel ¶ added in v1.4.7
func (p *ProcessCmd) ToExcel() *ProcessCmd
type ProcessCmdStream ¶ added in v1.4.7
type ProcessCmdStream struct { DefaultSheetName string Path string Error error // contains filtered or unexported fields }
func ExcelProcessStream ¶ added in v1.4.7
func ExcelProcessStream(val interface{}) (p *ProcessCmdStream)
func (*ProcessCmdStream) Columns ¶ added in v1.4.7
func (p *ProcessCmdStream) Columns(columns ...string) *ProcessCmdStream
func (*ProcessCmdStream) Headers ¶ added in v1.4.7
func (p *ProcessCmdStream) Headers(header ...string) *ProcessCmdStream
func (*ProcessCmdStream) NewStyle ¶ added in v1.4.7
func (p *ProcessCmdStream) NewStyle(newStyleFunc ...KeyStyle) *ProcessCmdStream
func (*ProcessCmdStream) SavePath ¶ added in v1.4.7
func (p *ProcessCmdStream) SavePath(path string) *ProcessCmdStream
func (*ProcessCmdStream) SetColWidth ¶ added in v1.4.7
func (p *ProcessCmdStream) SetColWidth(min, max int, width float64) *ProcessCmdStream
func (*ProcessCmdStream) Sheet ¶ added in v1.4.7
func (p *ProcessCmdStream) Sheet(sheet string) *ProcessCmdStream
func (*ProcessCmdStream) Style ¶ added in v1.4.7
func (p *ProcessCmdStream) Style(styleFunc func(styleMap map[string]int, x int, y int, val interface{}) (int, error)) *ProcessCmdStream
func (*ProcessCmdStream) ToExcel ¶ added in v1.4.7
func (p *ProcessCmdStream) ToExcel() *ProcessCmdStream
func (*ProcessCmdStream) Writer ¶ added in v1.4.7
func (p *ProcessCmdStream) Writer(writer io.Writer) *ProcessCmdStream
Click to show internal directories.
Click to hide internal directories.