funs

package
v0.2.115 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2023 License: MIT Imports: 12 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AttrBuilder

func AttrBuilder[T any, TP any](ctx context.Context, key string, builder ...func(data TP)) context.Context

func AttrMake

func AttrMake[T any, TP any](ctx context.Context, key string, builder func() TP)

func ByteCountIEC added in v0.2.100

func ByteCountIEC[T int64 | uint64](b T) string

ByteCountIEC 以1024作为基数

func ByteCountSI added in v0.2.100

func ByteCountSI[T int64 | uint64](b T) string

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 If added in v0.1.0

func If[R any](condition bool, trueVal, falseVal R) R

func RemoveSliceAt added in v0.2.103

func RemoveSliceAt[T int | int64 | string | uint | uint64](slice []T, elem T) []T

func SearchFilterEx added in v0.2.105

func SearchFilterEx(search *sys_model.SearchParams, fields ...string) *sys_model.SearchParams

Types

This section is empty.

Jump to

Keyboard shortcuts

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