Versions in this module Expand all Collapse all v1 v1.0.1 Jun 27, 2023 v1.0.0 Jun 27, 2023 Changes in this version + var Array struct + var Format struct + var Get struct + var In struct + var Is struct + var Json struct + var Map struct + var Mime struct + var MimeMap = map[string]string + var Net struct + var Parse struct + var Password struct + var Rand struct + var Struct struct + var Unity struct + var Validate = func(model any) *validator + var Version struct + func ArrayEmpty(array []T) (slice []any) + func ArrayFilter(array []string) (slice []string) + func ArrayRemove(array []string, args ...string) []string + func ArrayUnique(array []T) (slice []any) + func Calc(input any) (output float64) + func Caller() *caller + func CustomProcessApi(url string, api string) (result string) + func Default(param T, value ...T) (result T) + func EnvToml(args ...string) (result any) + func ForMap(slice []T, fun func(item T) (result T)) (newSlice []T) + func FormatQuery(data any) (result string) + func GetCaller() (funcName string, fileName string, line int) + func GetIp(key ...string) (result any) + func GetMac() (result string) + func GetType(value any) (result string) + func InArray(value T, array []T) (ok bool) + func InMapKey(key string, array map[string]any) bool + func InMapValue(value any, array map[string]string) bool + func IsAccepted(value any) (ok bool) + func IsActiveUrl(value any) (ok bool) + func IsAlpha(value any) (ok bool) + func IsAlphaDash(value any) (ok bool) + func IsAlphaNum(value any) (ok bool) + func IsArray(value any) (ok bool) + func IsBool(value any) (ok bool) + func IsChs(value any) (ok bool) + func IsChsAlpha(value any) (ok bool) + func IsChsAlphaNum(value any) (ok bool) + func IsChsDash(value any) (ok bool) + func IsCntrl(value any) (ok bool) + func IsDate(date any) (ok bool) + func IsDomain(domain any) (ok bool) + func IsEmail(email any) (ok bool) + func IsEmpty(value any) (ok bool) + func IsFalse(value any) (ok bool) + func IsFloat(value any) (ok bool) + func IsGraph(value any) (ok bool) + func IsIdCard(value any) (ok bool) + func IsIp(ip any) (ok bool) + func IsJsonString(value any) (ok bool) + func IsLower(value any) (ok bool) + func IsMacAddr(value any) (ok bool) + func IsMap(value any) (ok bool) + func IsMapAny(value any) (ok bool) + func IsMobile(value any) (ok bool) + func IsNumber(value any) (ok bool) + func IsPhone(phone any) (ok bool) + func IsSlice(value any) (ok bool) + func IsSliceSlice(value any) (ok bool) + func IsSpace(value any) (ok bool) + func IsString(value any) (ok bool) + func IsTrue(value any) (ok bool) + func IsUpper(value any) (ok bool) + func IsUrl(url any) (ok bool) + func IsXdigit(value any) (ok bool) + func IsZip(value any) (ok bool) + func JsonDecode(data any) (result any) + func JsonEncode(data any) (result string) + func JsonGet(jsonString any, key any) (result any, err error) + func MapMerge(map1 map[any]any, map2 map[any]any) map[any]any + func MapMergeString(map1 map[string]string, map2 map[string]string) map[string]string + func MapToURL(params map[string]any) (result string) + func MapWithField(data T, field []string) (result T) + func MapWithoutField(data T, field []string) (result T) + func MimeType(suffix any) (mime string) + func NetTcping(host any, opts ...map[string]any) (ok bool, detail []map[string]any) + func ParseParams(params map[string]any) (result map[string]any) + func ParseParamsBefore(params url.Values) (result map[string]any) + func PasswordCreate(password any) (result string) + func PasswordVerify(encode any, password any) (ok bool) + func RandInt(max int, min ...int) (result int) + func RandString(length int, chars ...string) (result string) + func Redirect(url any) (result string) + func Replace(value any, params map[string]any) (result string) + func StructDel(obj any, key string) + func StructGet(obj any, key string) (result any) + func StructHas(obj any, key string) (ok bool) + func StructKeys(obj any) (slice []string) + func StructLen(obj any) (length int) + func StructMap(obj any) (result map[string]any) + func StructSet(obj any, key string, val any) + func StructSlice(obj any) (slice []any) + func StructValues(obj any) (slice []any) + func Ternary(IF bool, TRUE T, FALSE T) T + func UnityIds(param ...any) (ids []any) + func UnityKeys(param any, reg ...any) (keys []any) + func ValidateRules(name string, value any, rule string, message map[string]string) (err error) + func VersionCompare(v1, v2 any) (result int) + func VersionGo() (result string) + type AsyncStruct struct + Data T + Mutex sync.RWMutex + Wait sync.WaitGroup + func Async() *AsyncStruct[T] + func (this *AsyncStruct[T]) Get(key string) any + func (this *AsyncStruct[T]) Has(key string) (ok bool) + func (this *AsyncStruct[T]) Result() T + func (this *AsyncStruct[T]) Set(key string, val any) + type CurlRequest struct + Body any + Client *http.Client + Data map[string]any + Headers map[string]any + Method string + Query map[string]any + Url string + type CurlResponse struct + Body *io.ReadCloser + Byte []byte + Error error + Headers *http.Header + Json map[string]any + Request *http.Request + StatusCode int + Text string + type CurlStruct struct + func Curl(request ...CurlRequest) *CurlStruct + func (this *CurlStruct) Body(body any) *CurlStruct + func (this *CurlStruct) Client(client *http.Client) *CurlStruct + func (this *CurlStruct) Data(key string, value any) *CurlStruct + func (this *CurlStruct) Datas(data map[string]any) *CurlStruct + func (this *CurlStruct) Delete(url string) *CurlStruct + func (this *CurlStruct) Get(url string) *CurlStruct + func (this *CurlStruct) Header(key any, value any) *CurlStruct + func (this *CurlStruct) Headers(headers map[string]any) *CurlStruct + func (this *CurlStruct) Method(method string) *CurlStruct + func (this *CurlStruct) Patch(url string) *CurlStruct + func (this *CurlStruct) Post(url string) *CurlStruct + func (this *CurlStruct) Put(url string) *CurlStruct + func (this *CurlStruct) Query(key any, value any) *CurlStruct + func (this *CurlStruct) Querys(params map[string]any) *CurlStruct + func (this *CurlStruct) Send() *CurlResponse + func (this *CurlStruct) Url(url string) *CurlStruct + type EnvModel struct + func Env() *EnvModel + func (this *EnvModel) All() (result map[string]any) + func (this *EnvModel) Get(key any, def ...any) (result any) + func (this *EnvModel) Mode(mode string) *EnvModel + func (this *EnvModel) Path(path string) *EnvModel + func (this *EnvModel) TomlAll() (result any) + type FileCacheClient struct + func NewFileCache(dir any, expire any, prefix ...any) (*FileCacheClient, error) + func (this *FileCacheClient) Clear() (ok bool) + func (this *FileCacheClient) ClearE() (err error) + func (this *FileCacheClient) Del(key any) (ok bool) + func (this *FileCacheClient) DelE(key any) (err error) + func (this *FileCacheClient) DelPrefix(prefix ...any) (ok bool) + func (this *FileCacheClient) DelPrefixE(prefix ...any) (err error) + func (this *FileCacheClient) DelTags(tags ...any) (ok bool) + func (this *FileCacheClient) DelTagsE(tag ...any) (err error) + func (this *FileCacheClient) Get(key any) (result []byte) + func (this *FileCacheClient) GetInfo(key any) (info map[string]any) + func (this *FileCacheClient) GetKeys() (slice []string) + func (this *FileCacheClient) Has(key any) (exist bool) + func (this *FileCacheClient) Set(key any, value []byte, expire ...any) (ok bool) + func (this *FileCacheClient) SetE(key any, value []byte, expire int64) (err error) + type FileCacheClientItem struct + type FileRequest struct + Dir string + Domain string + Ext string + Format string + Limit int + Name string + Page int + Path string + Prefix string + Sub bool + type FileResponse struct + Byte []byte + Error error + Result any + Slice []any + Text string + type FileStruct struct + func File(request ...FileRequest) *FileStruct + func (this *FileStruct) Byte(path ...any) (result *FileResponse) + func (this *FileStruct) Dir(dir any) *FileStruct + func (this *FileStruct) DirInfo(dir ...any) (result *FileResponse) + func (this *FileStruct) Domain(domain any) *FileStruct + func (this *FileStruct) Download(path ...any) (result *FileResponse) + func (this *FileStruct) EnZip() (result *FileResponse) + func (this *FileStruct) Exist(path ...any) (ok bool) + func (this *FileStruct) Ext(ext any) *FileStruct + func (this *FileStruct) Limit(limit any) *FileStruct + func (this *FileStruct) Line(path ...any) (result *FileResponse) + func (this *FileStruct) List(path ...any) (result *FileResponse) + func (this *FileStruct) Name(name any) *FileStruct + func (this *FileStruct) Page(page any) *FileStruct + func (this *FileStruct) Path(path any) *FileStruct + func (this *FileStruct) Prefix(prefix any) *FileStruct + func (this *FileStruct) Remove(path ...any) (result *FileResponse) + func (this *FileStruct) Save(reader io.Reader, path ...string) (result *FileResponse) + func (this *FileStruct) UnZip() (result *FileResponse) + type LangModel struct + Directory string + Lang string + Mode string + func Lang(model ...LangModel) *LangModel + func (this *LangModel) Value(key any, args ...any) (result any) + type ViperModel struct + Content string + Mode string + Name string + Path string + func Viper(model ...ViperModel) *ViperModel + func (this *ViperModel) Read() (result ViperResponse) + func (this *ViperModel) SetMode(mode string) *ViperModel + func (this *ViperModel) SetName(name string) *ViperModel + func (this *ViperModel) SetPath(path string) *ViperModel + type ViperResponse struct + Error error + Result map[string]any + Viper *viper.Viper + func (this *ViperResponse) Get(key string, def ...any) (result any) + func (this *ViperResponse) Set(key string, value any) (result ViperResponse)