Documentation ¶
Index ¶
- Constants
- 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 EnableMesh() bool
- func ErrorWrapper(body []byte, extra map[string]interface{}, err error) ([]byte, error)
- func GetAGWDomain(ctx context.Context) string
- func GetAGWDomainByConf(ctx context.Context) string
- func GetAPaaSLaneFromCtx(ctx context.Context) string
- func GetAPaaSPersistFaaSMapFromCtx(ctx context.Context) (copyRes 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 GetAppInfoFromCtx(ctx context.Context) (*structs.AppInfo, error)
- func GetBizIDC() string
- func GetBoe(ctx context.Context) string
- func GetCurFunctionMetaConfFromCtx(ctx context.Context) *structs.FunctionMeta
- 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 GetEventInfoFromCtx(ctx context.Context) (*structs.EventInfo, error)
- func GetExecuteIDFromCtx(ctx context.Context) string
- func GetFaaSEnvIDFromCtx(ctx context.Context) string
- func GetFaaSEnvTypeFromCtx(ctx context.Context) int64
- func GetFaaSInfraDomain(ctx context.Context) string
- func GetFaaSInfraDomainName() string
- func GetFaaSInfraPSM(ctx context.Context) string
- func GetFaaSInfraPSMFromEnv() (psm string, cluster string)
- func GetFaaSLaneIDFromCtx(ctx context.Context) string
- func GetFaaSPlatform() string
- func GetFaaSType(ctx context.Context) string
- func GetFuncAPINameFromCtx(ctx context.Context) string
- func GetFunctionAPIIDFromCtx(ctx context.Context) string
- func GetFunctionMetaConfFromCtx(ctx context.Context, apiName string) *structs.FunctionMeta
- func GetFunctionNameFromCtx(ctx context.Context) string
- func GetGlobalAuthType() *string
- func GetInnerAPIPSM(ctx context.Context) string
- func GetInnerAPIPSMFromCtx(ctx context.Context) string
- func GetInnerAPIPSMFromEnv() string
- func GetLGWClusterFromEnv() string
- func GetLGWPSMFromEnv() string
- func GetLogIDFromCtx(ctx context.Context) string
- func GetLogIDFromExtra(extra map[string]interface{}) string
- func GetLoopMaskFromCtx(ctx context.Context) []string
- func GetMeshDestReqTimeout(ctx context.Context) int64
- func GetNamespace() string
- func GetNamespaceFromCtx(ctx context.Context) string
- func GetOpenAPIDomain(ctx context.Context) string
- func GetOpenAPIDomainByConf(ctx context.Context) string
- func GetOpenAPIDomainName() string
- func GetOpenAPIPSMAndCluster(ctx context.Context) (psm string, cluster string)
- func GetParamUnauthFieldByKey(ctx context.Context, key string) (unauthFields interface{})
- func GetParamUnauthFieldMapFromCtx(ctx context.Context) (keyToUnauthFields map[string]interface{})
- func GetParamUnauthFieldRecordByKey(ctx context.Context, key string) (unauthFields []string)
- func GetParamUnauthFieldRecordListByKey(ctx context.Context, key string) (unauthFieldsList [][]string)
- func GetRecordID(record interface{}) int64
- func GetRecordUnauthFieldByObject(ctx context.Context, objectAPIName string) (recordIDToUnauthFields map[int64][]string)
- func GetRecordUnauthFieldByObjectAndRecordID(ctx context.Context, objectAPIName string, recordID int64) (unauthFields []string)
- func GetSDKConf(ctx context.Context) *structs.SDKConf
- func GetSDKTransientConf(ctx context.Context) *structs.SDKTransientConf
- func GetServiceID() string
- func GetSocketAddr() 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 GetTenantTypeFromCtx(ctx context.Context) int64
- func GetTraceHeader(ctx context.Context) map[string]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 IsCloseMesh(ctx context.Context) bool
- func IsDebug(ctx context.Context) bool
- func IsExternalFaaS() bool
- func IsLocalDebug(ctx context.Context) bool
- func IsMicroservice(ctx context.Context) bool
- func IsRuntime(ctx context.Context) bool
- func IsTrueString(str string) 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 OpenMesh(ctx context.Context) bool
- func ParseStrList(v interface{}) (strs []string)
- func ParseStrsList(v interface{}) (strsList [][]string)
- func PrintLog(contents ...interface{})
- func PtrToInt(p *int, defaultVal int) int
- func SetAPaaSLaneToCtx(ctx context.Context, lane string) context.Context
- func SetAPaaSPersistFaaSMapToCtx(ctx context.Context, aPaaSPersistFaaSMap map[string]string) context.Context
- func SetAPaaSPersistHeader(ctx context.Context, header http.Header)
- func SetApiTimeoutMethodToCtx(ctx context.Context, method string) context.Context
- func SetApiTimeoutToCtx(ctx context.Context, timeout map[string]int64) context.Context
- func SetAppInfoToCtx(ctx context.Context, appInfo *structs.AppInfo) 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 SetEventIDToCtx(ctx context.Context, eventID string) context.Context
- func SetEventInfoToCtx(ctx context.Context, appInfo *structs.EventInfo) context.Context
- func SetFaaSEnvIDCtx(ctx context.Context, envID string) context.Context
- func SetFaaSEnvTypeCtx(ctx context.Context, envType int64) context.Context
- func SetFaaSLaneIDCtx(ctx context.Context, laneID string) context.Context
- func SetFuncAPINameToCtx(ctx context.Context, funcAPIName string) context.Context
- func SetFunctionMetaConfToCtx(ctx context.Context, metaConf map[string]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 SetRecordUnauthField(ctx context.Context, unauthFieldMap RecordUnauthField) context.Context
- func SetRuntimeType(ctx context.Context, runtimeType 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 SetUserAndAuthTypeToCtx(ctx context.Context, authType *string) context.Context
- func SetUserAndAuthTypeToHeaders(ctx context.Context, headers map[string][]string) map[string][]string
- func SetUserAndMixAuthTypeToCtx(ctx context.Context, authType *string, isMix bool) context.Context
- func SetUserAndMixAuthTypeToHeaders(ctx context.Context, headers map[string][]string, isMix bool) map[string][]string
- 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 ToString(v interface{}) string
- func WebIDELevelInfo(level logrus.Level) string
- func WithAPaaSPersistFaaSValue(ctx context.Context, key, value string) context.Context
- func WriteUnauthFieldMapWithLock(ctx context.Context, objectAPIName string, recordID int64, ...)
- 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) ObjectAPINameV3(objectAPIName string) *PathReplace
- func (p *PathReplace) Path() string
- func (p *PathReplace) RecordID(recordID int64) *PathReplace
- func (p *PathReplace) RecordIDStr(recordID string) *PathReplace
- type RecordUnauthField
- type RuntimeType
- type WebIDELogFormatter
Constants ¶
View Source
const ( // Log Type Console = "Console" System = "System" Result = "Result" WebIDESource = "apaas-ide" ISWebIDE = "IS_WEB_IDE" )
Variables ¶
This section is empty.
Functions ¶
func AesDecryptText ¶
func BoolValueOfPtr ¶
func ErrorWrapper ¶ added in v0.0.22
func GetAGWDomain ¶
func GetAGWDomainByConf ¶
func GetAPaaSLaneFromCtx ¶ added in v0.0.4
func GetAPaaSPersistFaaSMapFromCtx ¶ added in v0.0.4
func GetAPaaSPersistFaaSMapStr ¶ added in v0.0.4
func GetAPaaSPersistFaaSValueFromCtx ¶ added in v0.0.4
func GetAppIDAndSecret ¶
func GetAppInfoFromCtx ¶ added in v0.0.8
func GetCurFunctionMetaConfFromCtx ¶ added in v0.0.19
func GetCurFunctionMetaConfFromCtx(ctx context.Context) *structs.FunctionMeta
func GetDebugTypeFromCtx ¶
func GetEnvBoeFromCtx ¶
func GetEnvOrgID ¶
func GetEnvOrgID() string
func GetEventInfoFromCtx ¶ added in v0.0.8
func GetExecuteIDFromCtx ¶ added in v0.0.29
func GetFaaSEnvIDFromCtx ¶ added in v0.0.23
func GetFaaSEnvTypeFromCtx ¶ added in v0.0.23
GetEnvTypeFromCtx
func GetFaaSInfraDomain ¶
func GetFaaSInfraDomainName ¶ added in v0.0.23
func GetFaaSInfraDomainName() string
func GetFaaSInfraPSMFromEnv ¶ added in v0.0.23
func GetFaaSLaneIDFromCtx ¶ added in v0.0.20
func GetFaaSPlatform ¶ added in v0.0.23
func GetFaaSPlatform() string
func GetFaaSType ¶ added in v0.0.4
func GetFuncAPINameFromCtx ¶ added in v0.0.19
func GetFunctionAPIIDFromCtx ¶ added in v0.0.31
func GetFunctionMetaConfFromCtx ¶ added in v0.0.19
func GetFunctionMetaConfFromCtx(ctx context.Context, apiName string) *structs.FunctionMeta
func GetFunctionNameFromCtx ¶
func GetGlobalAuthType ¶ added in v0.0.21
func GetGlobalAuthType() *string
GetGlobalAuthType 全局鉴权类型配置,优先级低于接口级
func GetInnerAPIPSM ¶
GetInnerAPIPSM open-sdk: from ctx faaS-sdk: from const by env Deprecated
func GetInnerAPIPSMFromCtx ¶
func GetInnerAPIPSMFromEnv ¶ added in v0.0.23
func GetInnerAPIPSMFromEnv() string
func GetLGWClusterFromEnv ¶ added in v0.0.23
func GetLGWClusterFromEnv() string
func GetLGWPSMFromEnv ¶ added in v0.0.23
func GetLGWPSMFromEnv() string
func GetLogIDFromCtx ¶
func GetLogIDFromExtra ¶
func GetLoopMaskFromCtx ¶
func GetMeshDestReqTimeout ¶ added in v0.0.28
func GetNamespace ¶
func GetNamespace() string
func GetNamespaceFromCtx ¶
func GetOpenAPIDomain ¶
func GetOpenAPIDomainByConf ¶ added in v0.0.23
func GetOpenAPIDomainName ¶ added in v0.0.23
func GetOpenAPIDomainName() string
func GetOpenAPIPSMAndCluster ¶ added in v0.0.23
func GetParamUnauthFieldByKey ¶ added in v0.0.19
func GetParamUnauthFieldMapFromCtx ¶ added in v0.0.19
参数对应的无权限字段
func GetParamUnauthFieldRecordByKey ¶ added in v0.0.19
func GetParamUnauthFieldRecordListByKey ¶ added in v0.0.19
func GetRecordID ¶ added in v0.0.19
func GetRecordID(record interface{}) int64
func GetRecordUnauthFieldByObject ¶ added in v0.0.19
func GetRecordUnauthFieldByObjectAndRecordID ¶ added in v0.0.19
func GetSDKTransientConf ¶ added in v0.0.23
func GetSDKTransientConf(ctx context.Context) *structs.SDKTransientConf
func GetServiceID ¶
func GetServiceID() string
func GetSocketAddr ¶ added in v0.0.23
func GetSocketAddr() string
func GetSourceTypeFromCtx ¶
func GetTTEnvFromCtx ¶
func GetTenantIDFromCtx ¶
func GetTenantName ¶
func GetTenantName() string
func GetTenantTypeFromCtx ¶ added in v0.0.29
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 IsCloseMesh ¶ added in v0.0.23
func IsExternalFaaS ¶ added in v0.0.23
func IsExternalFaaS() bool
func IsLocalDebug ¶
func IsMicroservice ¶ added in v0.0.4
func IsTrueString ¶ added in v0.0.23
func JsonMarshalBytes ¶
func JsonUnmarshalBytes ¶
func ParseStrList ¶ added in v0.0.19
func ParseStrList(v interface{}) (strs []string)
func ParseStrsList ¶ added in v0.0.19
func ParseStrsList(v interface{}) (strsList [][]string)
func SetAPaaSLaneToCtx ¶ added in v0.0.4
func SetAPaaSPersistFaaSMapToCtx ¶ added in v0.0.4
func SetAPaaSPersistHeader ¶ added in v0.0.26
func SetApiTimeoutToCtx ¶
func SetAppInfoToCtx ¶ added in v0.0.8
func SetDistributedMaskToCtx ¶
func SetEventIDToCtx ¶ added in v0.0.29
func SetEventInfoToCtx ¶ added in v0.0.8
func SetFaaSEnvIDCtx ¶ added in v0.0.23
func SetFaaSEnvTypeCtx ¶ added in v0.0.23
func SetFaaSLaneIDCtx ¶ added in v0.0.20
func SetFuncAPINameToCtx ¶ added in v0.0.19
func SetFunctionMetaConfToCtx ¶ added in v0.0.19
SetFunctionMetaConfToCtx 提供给框架层使用
func SetFunctionNameToCtx ¶
func SetInnerAPIPSMToCtx ¶
func SetRecordUnauthField ¶ added in v0.0.19
func SetRecordUnauthField(ctx context.Context, unauthFieldMap RecordUnauthField) context.Context
func SetRuntimeType ¶ added in v0.0.23
func SetSourceTypeToCtx ¶
func SetTenantToCtx ¶
func SetTriggerTaskIDToCtx ¶
func SetTriggerTypeToCtx ¶
func SetUserAndAuthTypeToCtx ¶ added in v0.0.5
func SetUserAndAuthTypeToHeaders ¶ added in v0.0.5
func SetUserAndMixAuthTypeToCtx ¶ added in v0.0.19
SetUserAndMixAuthTypeToCtx 设置鉴权方式 - 接口级配置优先级高于函数级 - 函数级配置 - oql 接口使用 system 和 mix_user_system - 除 oql 之外的接口使用 system 和 user
func SetUserAndMixAuthTypeToHeaders ¶ added in v0.0.19
func SetUserContext ¶
func SetUserContextMap ¶ added in v0.0.2
func StringValueOfPtr ¶
func WebIDELevelInfo ¶ added in v0.0.7
func WithAPaaSPersistFaaSValue ¶ added in v0.0.4
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) ObjectAPINameV3 ¶ added in v0.0.33
func (p *PathReplace) ObjectAPINameV3(objectAPIName string) *PathReplace
func (*PathReplace) Path ¶
func (p *PathReplace) Path() string
func (*PathReplace) RecordID ¶
func (p *PathReplace) RecordID(recordID int64) *PathReplace
func (*PathReplace) RecordIDStr ¶ added in v0.0.33
func (p *PathReplace) RecordIDStr(recordID string) *PathReplace
type RecordUnauthField ¶ added in v0.0.19
RecordUnauthField 记录对应的无权限字段
func GetRecordUnauthField ¶ added in v0.0.19
func GetRecordUnauthField(ctx context.Context) (objToRecordIDToUnauthFields RecordUnauthField)
type RuntimeType ¶ added in v0.0.23
type RuntimeType string
const ( RuntimeTypeRuntime RuntimeType = "0" // 运行态 RuntimeTypeCloudDebug RuntimeType = "1" // 云端调试 RuntimeTypeLocalDebug RuntimeType = "2" // 本地调试 )
func GetRuntimeType ¶ added in v0.0.23
func GetRuntimeType(ctx context.Context) RuntimeType
type WebIDELogFormatter ¶ added in v0.0.7
type WebIDELogFormatter struct { }
Click to show internal directories.
Click to hide internal directories.