Versions in this module Expand all Collapse all v1 v1.0.1 Aug 15, 2024 Changes in this version + var AccessLog *logrus.Logger + var DEFAULT_PAGE_SIZE int64 = 15 + var DEFAULT_TOTAL_NUM int64 = 0 + var ErrorLog = logrus.StandardLogger() + func AccessLogWrap(log *logrus.Logger) transport.ServiceOption + func AccessWrap(log *logrus.Logger) gin.HandlerFunc + func AsyncRuntimeError(runtimeId, humanLog, primevalLog string) + func InitLogger() + func LogFileRotate(logger *logrus.Logger, logPath string, maxAge time.Duration, ...) + func MakeAuditInfo(reqCtx context.Context, scopeInfo ScopeInfo, name apistructs.TemplateName, ...) *apistructs.Audit + func NewPage() *pb.Page + func NewPage2(PageSize int64, CurPage int64) *pb.Page + func NewPage3(PageSize int64, CurPage int64, TotalNum int64) *pb.Page + type Annotation string + const AnnotationAffinityCanaryBehavior + const AnnotationAppRoot + const AnnotationAuthCacheDuration + const AnnotationAuthCacheKey + const AnnotationAuthKeepAlive + const AnnotationAuthKeepaliveRequests + const AnnotationAuthKeepaliveTimeout + const AnnotationAuthProxySetHeaders + const AnnotationAuthRealm + const AnnotationAuthSecret + const AnnotationAuthSecretType + const AnnotationAuthSnippet + const AnnotationAuthTLSErrorPage + const AnnotationAuthTLSMatchCN + const AnnotationAuthTLSPassCertificateToUpstream + const AnnotationAuthTLSSecret + const AnnotationAuthTLSVerifyClient + const AnnotationAuthTLSVerifyDepth + const AnnotationAuthType + const AnnotationAuthURL + const AnnotationBackendProtocol + const AnnotationCORSAllowCredentials + const AnnotationCORSAllowHeaders + const AnnotationCORSAllowMethods + const AnnotationCORSAllowOrigin + const AnnotationCORSExposeHeaders + const AnnotationCORSMaxAge + const AnnotationCanary + const AnnotationCanaryByCookie + const AnnotationCanaryByHeader + const AnnotationCanaryByHeaderPattern + const AnnotationCanaryByHeaderValue + const AnnotationCanaryWeight + const AnnotationCanaryWeightTotal + const AnnotationClientBodyBufferSize + const AnnotationConfigurationSnippet + const AnnotationConnectionProxyHeader + const AnnotationCookieAffinity + const AnnotationCookieAffinityMode + const AnnotationEnableAccessLog + const AnnotationEnableCORS + const AnnotationEnableGlobalAuth + const AnnotationEnableInfluxDB + const AnnotationEnableModsecurity + const AnnotationEnableOpentracing + const AnnotationEnableOwaspCoreRules + const AnnotationEnableRewriteLog + const AnnotationFallbackCustomHttpErrors + const AnnotationFallbackDefaultBackend + const AnnotationForceSSLRedirect + const AnnotationFromToWWWRedirect + const AnnotationGlobalRateLimit + const AnnotationGlobalRateLimitIgnoredCIDRs + const AnnotationGlobalRateLimitKey + const AnnotationGlobalRateLimitWindow + const AnnotationHttp2PushPreload + const AnnotationInfluxDBHost + const AnnotationInfluxDBMeasurement + const AnnotationInfluxDBPort + const AnnotationInfluxDBServerName + const AnnotationLimitConnections + const AnnotationLimitRPS + const AnnotationLoadBalance + const AnnotationLoadBalanceUpstreamHashBy + const AnnotationMirrorHost + const AnnotationMirrorRequestBody + const AnnotationMirrorTarget + const AnnotationModsecuritySnippet + const AnnotationModsecurityTransactionId + const AnnotationOpentracingTrustIncomingSpan + const AnnotationPermanentRedirect + const AnnotationPermanentRedirectCode + const AnnotationPreserveTrailingSlash + const AnnotationProxyBodySize + const AnnotationProxyBufferSize + const AnnotationProxyBuffering + const AnnotationProxyBuffersNumber + const AnnotationProxyConnectTimeout + const AnnotationProxyCookieDomain + const AnnotationProxyCookiePath + const AnnotationProxyHttpVersion + const AnnotationProxyMaxTempFileSize + const AnnotationProxyNextUpstream + const AnnotationProxyNextUpstreamRetries + const AnnotationProxyNextUpstreamTimeOut + const AnnotationProxyReadTimeout + const AnnotationProxyRedirectFrom + const AnnotationProxyRedirectTo + const AnnotationProxyRequestBuffering + const AnnotationProxySSLCiphers + const AnnotationProxySSLName + const AnnotationProxySSLProtocols + const AnnotationProxySSLSecret + const AnnotationProxySSLServerName + const AnnotationProxySSLVerify + const AnnotationProxySSLVerifyDepth + const AnnotationProxySendTimeout + const AnnotationRewriteRewriteTarget + const AnnotationRewriteUpstreamVHost + const AnnotationSSLCiphers + const AnnotationSSLPassthrough + const AnnotationSSLPreferServerCiphers + const AnnotationSSLRedirect + const AnnotationSatisfy + const AnnotationServerAlias + const AnnotationServerSnippet + const AnnotationServiceUpstream + const AnnotationSessionCookieChangeOnFailure + const AnnotationSessionCookieConditionalSameSiteNone + const AnnotationSessionCookieDomain + const AnnotationSessionCookieExpires + const AnnotationSessionCookieMaxAge + const AnnotationSessionCookieName + const AnnotationSessionCookiePath + const AnnotationSessionCookieSameSite + const AnnotationStreamSnippet + const AnnotationTemporalRedirect + const AnnotationUseRegex + const AnnotationWhiteListSourceRange + const AnnotationXForwardPrefix + func (in Annotation) String() string + type ErrInfo struct + Code string + EnMsg string + Msg string + type LineHook struct + Field string + Formatter func(file, function string, line int) string + Skip int + func NewLineHook(levels ...logrus.Level) *LineHook + func (hook *LineHook) Fire(entry *logrus.Entry) error + func (hook *LineHook) Levels() []logrus.Level + type NewPageQuery struct + List interface{} + Total int64 + func NewPages(list interface{}, total int64) NewPageQuery + func (query NewPageQuery) ToPbPage() *pb.NewPageResult + type Page pb.Page + func (page *Page) GetCurPage() int64 + func (page *Page) GetEndIndex() int64 + func (page *Page) GetPageSize() int64 + func (page *Page) GetStartIndex() int64 + func (page *Page) GetTotalNum() int64 + func (page *Page) GetTotalPageNum() int64 + func (page *Page) SetCurPage(num int64) + func (page *Page) SetPageSize(size int64) + func (page *Page) SetTotalNum(num int64) + type PageQuery struct + Page *pb.Page + Result interface{} + func GetPageQuery(page *Page, list interface{}) PageQuery + func (query PageQuery) Convert() NewPageQuery + func (query PageQuery) ToPbPage() *pb.PageResult + type ScopeInfo struct + AppId string + ProjectId string + RuntimeName string + ServiceName string + Workspace string + type StandardResult struct + Data interface{} + Err *ErrInfo + Success bool + func NewStandardResult(succ ...bool) *StandardResult + func (result *StandardResult) SetErrorInfo(errInfo *ErrInfo) *StandardResult + func (result *StandardResult) SetReturnCode(returnCode StandaredReturnCode) *StandardResult + func (result *StandardResult) SetSuccessAndData(data interface{}) *StandardResult + func (result *StandardResult) SwitchLang(c *gin.Context) *StandardResult + type StandaredReturnCode interface + GetCode func() string + GetMessage func() string