utils

package
v0.0.32-beta.2 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetNamespace

func GetNamespace(ctx context.Context, appCtx *structs.AppCtx) (string, error)

func GetParamUnauthField added in v0.0.22

func GetParamUnauthField(ctx context.Context) map[string]interface{}

GetParamUnauthField 获取参数的所有无权限字段

func GetParamUnauthFieldByKey added in v0.0.22

func GetParamUnauthFieldByKey(ctx context.Context, key string) interface{}

GetParamUnauthFieldByKey 通过 key 获取参数的无权限字段 - 如果参数类型为 Record 则返回 []string - 如果参数类型为 RecordList,则返回 [][]string

func GetParamUnauthFieldRecordByKey added in v0.0.22

func GetParamUnauthFieldRecordByKey(ctx context.Context, key string) (unauthFields []string)

GetParamUnauthFieldRecordByKey 通过 key 获取记录类型参数的无权限字段

func GetParamUnauthFieldRecordListByKey added in v0.0.22

func GetParamUnauthFieldRecordListByKey(ctx context.Context, key string) (unauthFieldsList [][]string)

GetParamUnauthFieldRecordListByKey 通过 key 获取记录列表类型参数的无权限字段

func GetRecordUnauthFieldByObject added in v0.0.22

func GetRecordUnauthFieldByObject(ctx context.Context, objectAPIName string) map[int64][]string

func GetRecordUnauthFieldByObjectAndRecordID added in v0.0.22

func GetRecordUnauthFieldByObjectAndRecordID(ctx context.Context, objectAPIName string, recordID int64) []string

func GetTenantName

func GetTenantName(ctx context.Context, appCtx *structs.AppCtx) (string, error)

func GoWithRecover

func GoWithRecover(ctx context.Context, f func() error)

func LocalDebugMode

func LocalDebugMode(ctx context.Context) context.Context

LocalDebugMode 设置调试模式

func ParseBatchResult added in v0.0.22

func ParseBatchResult(resp *structs.BatchResult, result interface{}) error

func ParseFlowVariableToMap

func ParseFlowVariableToMap(variables intern.ExecuteFlowVariables) map[string]interface{}

func ParseInt64

func ParseInt64(v interface{}) (int64, error)

func ParseMapToFlowVariable

func ParseMapToFlowVariable(params map[string]interface{}) intern.ExecuteFlowVariables

func ParseMultilingualNewToOld

func ParseMultilingualNewToOld(new structs.Multilingual) (old intern.Multilingual)

func ParseUnauthFields added in v0.0.22

func ParseUnauthFields(unauthFieldInput [][]string, unauthFieldOutput interface{}) error

func SetAppConfToCtx

func SetAppConfToCtx(ctx context.Context, appCtx *structs.AppCtx) context.Context

func SetCtx

func SetCtx(ctx context.Context, appCtx *structs.AppCtx, method string) context.Context

func SetLaneNameToCtx

func SetLaneNameToCtx(ctx context.Context, lane string) context.Context

SetLaneNameToCtx 设置泳道环境, 只在调试模式下生效

func SetUserMetaInfoToContext added in v0.0.28

func SetUserMetaInfoToContext(ctx context.Context, appCtx *structs.AppCtx) context.Context

func StrInStrs added in v0.0.22

func StrInStrs(strs []string, str string) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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