Documentation ¶
Index ¶
- func AttrBuilder[T any, TP any](ctx context.Context, key string, builder ...func(data TP)) context.Context
- func AttrMake[T any, TP any](ctx context.Context, key string, builder func() TP)
- func ByteCountIEC[T int64 | uint64](b T) string
- func ByteCountSI[T int64 | uint64](b T) string
- func CheckLicenseFiles[T sys_entity.SysLicense | sys_do.SysLicense](ctx context.Context, info sys_model.License, data *T) (response *T, err error)
- func CheckPermission[TRes any](ctx context.Context, f func() (TRes, error), ...) (TRes, error)
- func CheckPermissionOr[TRes any](ctx context.Context, f func() (TRes, error), ...) (TRes, error)
- func If[R any](condition bool, trueVal, falseVal R) R
- func RemoveSliceAt[T int | int64 | string | uint | uint64](slice []T, elem T) []T
- func SearchFilterEx(search *sys_model.SearchParams, fields ...string) *sys_model.SearchParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AttrBuilder ¶
func ByteCountIEC ¶ added in v0.2.100
ByteCountIEC 以1024作为基数
func ByteCountSI ¶ added in v0.2.100
ByteCountSI 以1000作为基数
func CheckLicenseFiles ¶
func CheckLicenseFiles[T sys_entity.SysLicense | sys_do.SysLicense](ctx context.Context, info sys_model.License, data *T) (response *T, err error)
func CheckPermission ¶
func CheckPermission[TRes any](ctx context.Context, f func() (TRes, error), permissions ...*permission.SysPermissionTree) (TRes, error)
func CheckPermissionOr ¶
func CheckPermissionOr[TRes any](ctx context.Context, f func() (TRes, error), permissions ...*permission.SysPermissionTree) (TRes, error)
func RemoveSliceAt ¶ added in v0.2.103
func SearchFilterEx ¶ added in v0.2.105
func SearchFilterEx(search *sys_model.SearchParams, fields ...string) *sys_model.SearchParams
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.