Documentation ¶
Index ¶
- func AesDecryptText(fieldID int64, realEncryptKey []byte, encryptedText string) (originText string, err error)
- func BoolPtr(val bool) *bool
- func BoolValueOfPtr(val *bool) bool
- func Decode(input interface{}, output interface{}) error
- func GetAGWDomain(ctx context.Context) string
- func GetAGWDomainByConf(ctx context.Context) string
- func GetAPaaSPersistFaaSMapFromCtx(ctx context.Context) (res map[string]string)
- func GetAPaaSPersistFaaSMapStr(ctx context.Context) string
- func GetAPaaSPersistFaaSValueFromCtx(ctx context.Context, key string) string
- func GetApiTimeoutFromCtx(ctx context.Context) map[string]int64
- func GetAppIDAndSecret() (string, string, error)
- func GetBoe(ctx context.Context) string
- func GetDebugTypeFromCtx(ctx context.Context) int
- func GetDistributedMaskFromCtx(ctx context.Context) string
- func GetEnv() string
- func GetEnvBoeFromCtx(ctx context.Context) string
- func GetEnvOrgID() string
- func GetFaaSInfraDomain(ctx context.Context) string
- func GetFaaSType(ctx context.Context) string
- func GetFunctionNameFromCtx(ctx context.Context) string
- func GetInnerAPIPSM(ctx context.Context) string
- func GetInnerAPIPSMFromCtx(ctx context.Context) string
- func GetLogIDFromCtx(ctx context.Context) string
- func GetLogIDFromExtra(extra map[string]interface{}) string
- func GetLoopMaskFromCtx(ctx context.Context) []string
- func GetNamespace() string
- func GetNamespaceFromCtx(ctx context.Context) string
- func GetOpenAPIDomain(ctx context.Context) string
- func GetServiceID() string
- func GetSourceTypeFromCtx(ctx context.Context) int
- func GetTTEnvFromCtx(ctx context.Context) string
- func GetTenantFromCtx(ctx context.Context) (*structs.Tenant, error)
- func GetTenantIDFromCtx(ctx context.Context) int64
- func GetTenantName() string
- func GetTriggerTaskIDFromCtx(ctx context.Context) int64
- func GetTriggerTypeFromCtx(ctx context.Context) string
- func GetUserContext(ctx context.Context) (res structs.UserContext)
- func GetUserContextMap(ctx context.Context) (res map[string]interface{})
- func GetUserIDFromCtx(ctx context.Context) int64
- func Int64InInt64s(ns []int, n int) bool
- func Int64Ptr(val int64) *int64
- func Int64ValueOfPtr(p *int64, defaultVal int64) int64
- func IntInInts(ns []int, n int) bool
- func IntPtr(val int) *int
- func IntValueOfPtr(p *int, defaultVal int) int
- func InvokeFuncWithRetry(retryCount int, retryInterval time.Duration, f func() error) error
- func IsDebug(ctx context.Context) bool
- func IsLocalDebug(ctx context.Context) bool
- func IsMicroservice(ctx context.Context) bool
- func JsonMarshalBytes(val interface{}) ([]byte, error)
- func JsonUnmarshalBytes(val []byte, addr interface{}) error
- func LevelInfo(level logrus.Level) (string, int)
- func NowMils() int64
- func PrintLog(contents ...interface{})
- func PtrToInt(p *int, defaultVal int) int
- func SetAPaaSPersistFaaSMapToCtx(ctx context.Context, aPaaSPersistFaaSMap map[string]string) context.Context
- func SetApiTimeoutMethodToCtx(ctx context.Context, method string) context.Context
- func SetApiTimeoutToCtx(ctx context.Context, timeout map[string]int64) context.Context
- func SetDebugTypeToCtx(ctx context.Context, debugType int) context.Context
- func SetDistributedMaskToCtx(ctx context.Context, mask string) context.Context
- func SetEnvBoeToCtx(ctx context.Context, boe string) context.Context
- func SetFunctionNameToCtx(ctx context.Context, functionName string) context.Context
- func SetInnerAPIPSMToCtx(ctx context.Context, psm string) context.Context
- func SetKEnvToCtx(ctx context.Context, kEnv string) context.Context
- func SetKEnvToCtxForRPC(ctx context.Context) context.Context
- func SetLogIDToCtx(ctx context.Context, logID string) context.Context
- func SetLoopMaskToCtx(ctx context.Context, mask []string) context.Context
- func SetSourceTypeToCtx(ctx context.Context, sourceType int) context.Context
- func SetTTEnvToCtx(ctx context.Context, ttEnv string) context.Context
- func SetTenantToCtx(ctx context.Context, tenant *structs.Tenant) context.Context
- func SetTriggerTaskIDToCtx(ctx context.Context, taskID int64) context.Context
- func SetTriggerTypeToCtx(ctx context.Context, triggerType string) context.Context
- func SetUserContext(ctx context.Context, userCtx structs.UserContext) context.Context
- func SetUserContextMap(ctx context.Context, userCtxMap map[string]interface{}) context.Context
- func SetUserIDToCtx(ctx context.Context, userID int64) context.Context
- func StrInStrs(strs []string, str string) bool
- func StringPtr(val string) *string
- func StringValueOfPtr(p *string, defaultVal string) string
- func TimeMils(t time.Time) int64
- func WithAPaaSPersistFaaSValue(ctx context.Context, key, value string) context.Context
- type ConsoleLogger
- type LogFormatter
- type PathReplace
- func (p *PathReplace) APIName(APIName string) *PathReplace
- func (p *PathReplace) ExecutionID(instanceID int64) *PathReplace
- func (p *PathReplace) FieldAPIName(fieldAPIName string) *PathReplace
- func (p *PathReplace) FileID(fileID string) *PathReplace
- func (p *PathReplace) FunctionAPIName(functionAPIName string) *PathReplace
- func (p *PathReplace) Namespace(namespace string) *PathReplace
- func (p *PathReplace) ObjectAPIName(objectAPIName string) *PathReplace
- func (p *PathReplace) Path() string
- func (p *PathReplace) RecordID(recordID int64) *PathReplace
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AesDecryptText ¶
func BoolValueOfPtr ¶
func GetAGWDomain ¶
func GetAGWDomainByConf ¶
func GetAPaaSPersistFaaSMapFromCtx ¶ added in v0.0.4
func GetAPaaSPersistFaaSMapStr ¶ added in v0.0.4
func GetAPaaSPersistFaaSValueFromCtx ¶ added in v0.0.4
func GetAppIDAndSecret ¶
func GetDebugTypeFromCtx ¶
func GetEnvBoeFromCtx ¶
func GetEnvOrgID ¶
func GetEnvOrgID() string
func GetFaaSInfraDomain ¶
func GetFaaSType ¶ added in v0.0.4
func GetFunctionNameFromCtx ¶
func GetInnerAPIPSM ¶
GetInnerAPIPSM open-sdk: from ctx faaS-sdk: from const by env
func GetInnerAPIPSMFromCtx ¶
func GetLogIDFromCtx ¶
func GetLogIDFromExtra ¶
func GetLoopMaskFromCtx ¶
func GetNamespace ¶
func GetNamespace() string
func GetNamespaceFromCtx ¶
func GetOpenAPIDomain ¶
func GetServiceID ¶
func GetServiceID() string
func GetSourceTypeFromCtx ¶
func GetTTEnvFromCtx ¶
func GetTenantIDFromCtx ¶
func GetTenantName ¶
func GetTenantName() string
func GetTriggerTaskIDFromCtx ¶
func GetTriggerTypeFromCtx ¶
func GetUserContext ¶
func GetUserContext(ctx context.Context) (res structs.UserContext)
func GetUserContextMap ¶ added in v0.0.2
func GetUserIDFromCtx ¶
func Int64InInt64s ¶
func Int64ValueOfPtr ¶
func IntValueOfPtr ¶
func InvokeFuncWithRetry ¶
func IsLocalDebug ¶
func IsMicroservice ¶ added in v0.0.4
func JsonMarshalBytes ¶
func JsonUnmarshalBytes ¶
func SetAPaaSPersistFaaSMapToCtx ¶ added in v0.0.4
func SetApiTimeoutToCtx ¶
func SetDistributedMaskToCtx ¶
func SetFunctionNameToCtx ¶
func SetInnerAPIPSMToCtx ¶
func SetSourceTypeToCtx ¶
func SetTenantToCtx ¶
func SetTriggerTaskIDToCtx ¶
func SetTriggerTypeToCtx ¶
func SetUserContext ¶
func SetUserContextMap ¶ added in v0.0.2
func StringValueOfPtr ¶
Types ¶
type ConsoleLogger ¶
type ConsoleLogger struct {
// contains filtered or unexported fields
}
func GetConsoleLogger ¶
func GetConsoleLogger(logIDs ...string) *ConsoleLogger
func (*ConsoleLogger) Errorf ¶
func (c *ConsoleLogger) Errorf(format string, args ...interface{})
func (*ConsoleLogger) Infof ¶
func (c *ConsoleLogger) Infof(format string, args ...interface{})
func (*ConsoleLogger) Result ¶
func (c *ConsoleLogger) Result(format string, args ...interface{})
func (*ConsoleLogger) Warnf ¶
func (c *ConsoleLogger) Warnf(format string, args ...interface{})
type LogFormatter ¶
type LogFormatter struct { }
type PathReplace ¶
type PathReplace struct {
// contains filtered or unexported fields
}
PathReplace 路径替换工具
func NewPathReplace ¶
func NewPathReplace(path string) *PathReplace
func (*PathReplace) APIName ¶
func (p *PathReplace) APIName(APIName string) *PathReplace
func (*PathReplace) ExecutionID ¶
func (p *PathReplace) ExecutionID(instanceID int64) *PathReplace
func (*PathReplace) FieldAPIName ¶
func (p *PathReplace) FieldAPIName(fieldAPIName string) *PathReplace
func (*PathReplace) FileID ¶
func (p *PathReplace) FileID(fileID string) *PathReplace
func (*PathReplace) FunctionAPIName ¶
func (p *PathReplace) FunctionAPIName(functionAPIName string) *PathReplace
func (*PathReplace) Namespace ¶
func (p *PathReplace) Namespace(namespace string) *PathReplace
func (*PathReplace) ObjectAPIName ¶
func (p *PathReplace) ObjectAPIName(objectAPIName string) *PathReplace
func (*PathReplace) Path ¶
func (p *PathReplace) Path() string
func (*PathReplace) RecordID ¶
func (p *PathReplace) RecordID(recordID int64) *PathReplace
Click to show internal directories.
Click to hide internal directories.