Documentation
¶
Index ¶
Constants ¶
View Source
const ( HttpClientDialTimeoutDefault = 2 * time.Second HttpClientTLSTimeoutDefault = 1 * time.Second RpcClientConnectTimeoutDefault = 3 * time.Second RpcClientRWTimeoutDefault = 20 * time.Minute APITimeoutDefault = 12 * time.Second AppTokenRefreshRemainTime = 20 * 60 * 1000 // 20m )
View Source
const ( GetAppToken = "openapi_getAppToken" GetAllGlobalConfigs = "openapi_getAllGlobalConfigs" CreateRecord = "openapi_createRecord" CreateRecordV2 = "openapi_createRecordV2" CreateRecordV3 = "openapi_createRecordV3" BatchCreateRecord = "openapi_batchCreateRecord" BatchCreateRecordV2 = "openapi_batchCreateRecordV2" BatchCreateRecordV3 = "openapi_batchCreateRecordV3" BatchCreateRecordAsync = "openapi_batchCreateRecordAsync" UpdateRecord = "openapi_updateRecord" UpdateRecordV2 = "openapi_updateRecordV2" UpdateRecordV3 = "openapi_updateRecordV3" BatchUpdateRecord = "openapi_batchUpdateRecord" BatchUpdateRecordV2 = "openapi_batchUpdateRecordV2" BatchUpdateRecordV3 = "openapi_batchUpdateRecordV3" BatchUpdateRecordAsync = "openapi_batchUpdateRecordAsync" DeleteRecord = "openapi_deleteRecord" DeleteRecordV2 = "openapi_deleteRecordV2" DeleteRecordV3 = "openapi_deleteRecordV3" BatchDeleteRecord = "openapi_batchDeleteRecord" BatchDeleteRecordV2 = "openapi_batchDeleteRecordV2" BatchDeleteRecordV3 = "openapi_batchDeleteRecordV3" BatchDeleteRecordAsync = "openapi_batchDeleteRecordAsync" GetRecords = "openapi_getRecords" GetRecordsV2 = "openapi_getRecordsV2" GetRecordV3 = "openapi_getRecordV3" GetRecordsV3 = "openapi_GetRecordsV3" ModifyRecordsWithTransaction = "openapi_modifyRecordsWithTransaction" Oql = "openapi_oql" GetExecutionUserTaskInfo = "openapi_getExecutionUserTaskInfo" GetExecutionInfo = "openapi_getExecutionInfo" RevokeExecution = "openapi_revokeExecution" ExecuteFlow = "openapi_executeFlow" UploadAttachment = "openapi_uploadAttachment" UploadAttachmentV2 = "openapi_uploadAttachmentV2" DownloadAttachment = "openapi_downloadAttachment" DownloadAttachmentV2 = "openapi_downloadAttachmentV2" DownloadAvatar = "openapi_downloadAvatar" UploadAvatar = "openapi_uploadAvatar" InvokeFuncWithAuth = "openapi_invokeFuncWithAuth" GetFunction = "openapi_getFunction" CreateMessage = "openapi_createMessage" UpdateMessage = "openapi_updateMessage" MGetUserSettings = "openapi_mGetUserSettings" WorkflowUpdateVariables = "openapi_workflowUpdateVariables" TerminateWorkflowInstance = "openapi_terminateWorkflowInstance" GetFields = "openapi_getFieldsV5" GetField = "openapi_getFieldV5" GetUIMetaRecordDetail = "openapi_getUIMetaRecordDetail" GetUIMetaList = "openapi_getUIMetaList" GetMobileList = "openapi_getMobileList" UpdateMobileList = "openapi_updateMobileList" GetIdByApiName = "openapi_getIdByApiName" GetBatchAttachmentToken = "openapi_getBatchAttachmentToken" GetDefaultIntegrationAppAccessToken = "openapi_getDefaultIntegrationAppAccessToken" GetIntegrationAppAccessToken = "openapi_getIntegrationAppAccessToken" GetDefaultIntegrationTenantAccessToken = "openapi_getDefaultIntegrationTenantAccessToken" GetIntegrationTenantAccessToken = "openapi_getIntegrationTenantAccessToken" GetApprovalInstanceList = "openapi_getApprovalInstanceList" GetApprovalInstance = "openapi_getApprovalInstance" GetServiceToken = "faasinfra_getServiceToken" SendLog = "faasinfra_sendLog" InvokeFuncSync = "faasinfra_invokeFuncSync" CreateAsyncTask = "faasinfra_createAsyncTask" CreateDistributedTask = "faasinfra_CreateDistributedTask" CreateAsyncTaskV2 = "faasinfra_createAsyncTaskV2" CreateDistributedTaskV2 = "faasinfra_CreateDistributedTaskV2" InvokeMicroserviceSync = "faasinfra_invokeMicroserviceSync" InvokeMicroserviceAsync = "faasinfra_invokeMicroserviceAsync" RequestMongodb = "faasinfra_requestMongodb" RequestFile = "faasinfra_requestFile" RequestRedis = "faasinfra_requestRedis" )
View Source
const ( EnvTypeDev string = "developmentboe" // Deprecated EnvTypeStaging string = "stagingboe" EnvTypeLr string = "staging" EnvTypeGray string = "gray" EnvTypeOnline string = "online" )
View Source
const ( EnvKEnvironment = "ENV" EnvKOrgID = "KOrgID" EnvKTenantName = "KTenantName" EnvKNamespace = "KNamespace" EnvKSvcID = "KSvcID" EnvKClientID = "KClientID" EnvKClientSecret = "KClientSecret" EnvKOpenApiDomain = "KOpenApiDomain" EnvKFaaSInfraDomain = "KFaaSInfraDomain" EnvKInnerAPIDomain = "KInnerAPIDomain" EnvKFaaSInfraPSM = "KFaaSInfraPSM" EnvKInnerAPIPSM = "KInnerAPIPSM" EnvKLGWPSM = "KLGWPSM" EnvKLGWCluster = "KLGWCluster" EnvKFaaSScene = "KFaaSScene" EnvKFaaSType = "KFaaSType" EnvKMeshHttp = "TCE_ENABLE_HTTP_SIDECAR_EGRESS" EnvKMeshUDS = "WITH_HTTP_MESH_EGRESS_UDS" EnvKSocketAddr = "SERVICE_MESH_HTTP_EGRESS_ADDR" )
View Source
const ( ReplaceNamespace = ":namespace" ReplaceObjectAPIName = ":objectAPIName" ReplaceFieldAPIName = ":fieldAPIName" ReplaceFunctionAPIName = ":functionAPIName" ReplaceRecordID = ":recordID" ReplaceFileID = ":fileID" ReplaceExecutionID = ":executionId" ReplaceAPIName = ":apiName" ReplaceObjectAPINameV3 = ":object_api_name" )
View Source
const ( HttpHeaderKeyTenant = "Tenant" HttpHeaderKeyUser = "User" HttpHeaderKeyServiceID = "X-Kunlun-Service-Id" HttpHeaderKeyAuthorization = "Authorization" HttpHeaderKeyContentType = "Content-Type" HttpHeaderKeyLogID = "X-Tt-Logid" HttpHeaderKeyOrgID = "X-Kunlun-Org-Id" HttpHeaderKeySDKFuncMsg = "Rpc-Persist-Kunlun-Faassdk" HttpHeaderKeyEnv = "x-tt-env" HttpHeaderKeyUsePPE = "x-use-ppe" HttpHeaderKeyUseBOE = "x-use-boe" HTTPHeaderKeyAPaaSLane = "Rpc-Persist-Lane-C-Apaas-Lane" HTTPHeaderKeyFaaSLaneID = "X-Ae-Lane" HTTPHeaderKeyFaaSEnvID = "X-Ae-EnvID" HTTPHeaderKeyFaaSEnvType = "X-Ae-EnvType" HTTPHeaderKeyAuthType = "Rpc-Persist-AUTH-TYPE" AuthTypeKey = "AUTH_TYPE" GlobalAuthTypeKey = "GlobalAuthType" AuthTypeSystem = "system" AuthTypeUser = "user" AuthTypeMixUserSystem = "mix_user_system" // OQL 场景需要,传该值时只有 select 过权限,where、orderBy 和 groupBy 都不影响 ExecuteID = "x-serverless-execute-id" FunctionAPIID = "x-serverless-function-api-id" )
View Source
const ( HttpHeaderValueJson = "application/json" HttpHeaderValueBson = "application/bson" )
View Source
const ( MetaInfoFaaSSdkFuncMsgKey = "KUNLUN_FAASSDK" MetaInfoAPaaSLaneKey = "LANE_C_APAAS_LANE" )
View Source
const ( DebugTypeInvoke = 0 DebugTypeOnline = 1 DebugTypeLocal = 2 )
View Source
const ( APAAS_PERSIST_PREFIX = "rpc-persist-" PersistAPaaSKeySummarized = "rpc-persist-apaas-summarized" APAAS_PERSIST_FAAS_PREFIX = "x-apaas-persist-faas-" PersistFaaSKeySummarized = "x-apaas-persist-faas-summarized" PersistFaaSKeyFaaSType = "x-apaas-persist-faas-type" PersistFaaSKeyOpenAPIRoutingType = "x-apaas-persist-faas-openapi-routing-type" PersistFaaSKeyFromSDKName = "x-apaas-persist-faas-from-sdk-name" PersistFaaSKeyFromSDKVersion = "x-apaas-persist-faas-from-sdk-version" )
View Source
const ( OpenAPIRoutingTypeToLGW = "toLGW" OpenAPIRoutingTypeToInnerAPI = "toInnerAPI" )
View Source
const ( FaaSTypeFunction = "function" FaaSTypeMicroService = "microService" FaaSTypeOpenSDK = "openSDK" )
View Source
const ( APaaSLogPrefix = "apaas-log-prefix" APaaSLogSuffix = "apaas-log-suffix" )
View Source
const ( CtxKeyLogger = "__KLogger__" CtxKeyEnvBoe = "KEnvBoe" CtxKeyTenant = "KTenant" CtxKeyUser = "KUser" CtxKeyApp = "KApp" CtxKeyEvent = "KEvent" CtxKeyLogID = "K_LOGID" CtxKeyTriggerType = "KTriggerType" CtxKeyFunctionName = "KFunctionName" // functionAPIID CtxKeyFunctionAPIName = "KFunctionAPIName" // functionAPIName CtxKeySourceType = "KSourceType" CtxKeyFLoggerExtra = "KFunctionLabel" CtxKeyDebugType = "KDebugType" CtxKeyAPITimeoutMap = "KAPITimeoutMap" CtxKeyAPITimeoutMethod = "KAPITimeoutMethod" CtxKeyCredential = "KCredential" CtxKeyTriggerTaskID = "KTriggerTaskID" CtxKeyLoopMask = "KLoopMask" CtxKeyDistributedMask = "KDistributedMask" CtxKeyInnerAPIPSM = "KInnerAPIPSM" CtxKeyTTEnv = "KTTEnv" CtxKeyKEnv = "K_ENV" CtxKeyFaaSInfraDomain = "KFaaSInfraDomain" CtxKeyOpenapiDomain = "KOpenapiDomain" CtxKeyAGWDomain = "KAGWDomain" CtxUserContext = "KUserContext" CtxUserContextMap = "KUserContextMap" CtxKeyAPaaSLane = "K_APAAS_LANE" CtxKeyFunctionMetaConf = "KCtxKeyFunctionMetaConf" CtxKeyUnauthFieldMap = "KCtxKeyUnauthFieldMap" CtxKeyLaneID = "KUNLUN_LANE_ID" CtxKeyEnvID = "KUNLUN_ENV_ID" CtxKeyEnvType = "KUNLUN_ENV_TYPE" CtxKeySDKConf = "x-apaas-sdk-conf" CtxKeyRuntimeType = "KRuntimeType" )
View Source
const (
DefaultMeshDestReqTimeout = 60000
)
View Source
const (
FunctionMetaConfCacheTableKey = "function-meta-conf-cache-table"
)
Variables ¶
View Source
var APITimeoutMapDefault = map[string]int64{
"openapi_uploadAttachment": 50 * 1000,
"openapi_uploadAttachmentV2": 50 * 1000,
"openapi_downloadAttachment": 50 * 1000,
"openapi_downloadAttachmentV2": 50 * 1000,
"openapi_downloadAvatar": 30 * 1000,
"openapi_uploadAvatar": 30 * 1000,
"openapi_executeFlow": 25 * 1000,
"openapi_invokeFuncWithAuth": 16 * 60 * 1000,
"faasinfra_invokeFuncSync": 16 * 60 * 1000,
"faasinfra_invokeMicroserviceSync": 16 * 60 * 1000,
"faasinfra_requestFile": 30 * 1000,
}
APITimeoutMapDefault millSeconds
View Source
var ( // EnvConfMap 配置全是外网域名,实际消费不到,优先从 env 中消费 EnvConfMap = map[string]PlatformConf{ EnvTypeStaging: { OpenAPIDomain: "", InnerAPIDomain: "", FaaSInfraDomain: "", InnerAPIPSM: "", FaaSInfraPSM: "", BOE: "boe", }, EnvTypeLr: { OpenAPIDomain: "https://oapi-kunlun-staging.bytedance.com", InnerAPIDomain: "https://apaas-innerapi-lr.feishu-pre.cn", FaaSInfraDomain: "https://apaas-faasinfra-staging.bytedance.com", InnerAPIPSM: "", FaaSInfraPSM: "", }, EnvTypeGray: { OpenAPIDomain: "https://oapi-kunlun-gray.kundou.cn", InnerAPIDomain: "https://apaas-innerapi.feishu-pre.cn", FaaSInfraDomain: "https://apaas-faasinfra-gray.kundou.cn", InnerAPIPSM: "", FaaSInfraPSM: "", }, EnvTypeOnline: { OpenAPIDomain: "https://oapi-kunlun.kundou.cn", InnerAPIDomain: "https://apaas-innerapi.feishu.cn", FaaSInfraDomain: "https://apaas-faasinfra.kundou.cn", InnerAPIPSM: "", FaaSInfraPSM: "", }, } )
Functions ¶
This section is empty.
Types ¶
Click to show internal directories.
Click to hide internal directories.