Documentation ¶
Index ¶
Constants ¶
View Source
const ( ExecuteSuccess Code = 200000 ParseException = 400001 InvalidRatelimitKey = 400101 InvalidServiceName = 400102 InvalidNamespace = 400103 InvalidTotalLimit = 400104 InvalidUsedLimit = 400105 InvalidTimestamp = 400106 NotFoundLimiter = 404001 CreateLimiterError = 500001 AcquireQuotaError = 500002 )
Variables ¶
View Source
var Code2Info = map[Code]*wrappers.StringValue{ ExecuteSuccess: {Value: "execute success"}, ParseException: {Value: "parse request body exception"}, InvalidRatelimitKey: {Value: "invalid ratelimiting key"}, InvalidServiceName: {Value: "invalid service name"}, InvalidNamespace: {Value: "invalid namespace"}, InvalidTotalLimit: {Value: "invalid total limit"}, InvalidUsedLimit: {Value: "invalid used limit"}, InvalidTimestamp: {Value: "invalid timestamp"}, NotFoundLimiter: {Value: "not found the key limiter, initialize firstly"}, CreateLimiterError: {Value: "create ratelimiter error"}, AcquireQuotaError: {Value: "acquire quota error"}, }
Code2Info code -> info
View Source
var WrapperCode = map[Code]*wrappers.UInt32Value{ ExecuteSuccess: {Value: uint32(ExecuteSuccess)}, ParseException: {Value: uint32(ParseException)}, InvalidRatelimitKey: {Value: uint32(InvalidRatelimitKey)}, InvalidServiceName: {Value: uint32(InvalidServiceName)}, InvalidNamespace: {Value: uint32(InvalidNamespace)}, InvalidTotalLimit: {Value: uint32(InvalidTotalLimit)}, InvalidUsedLimit: {Value: uint32(InvalidUsedLimit)}, InvalidTimestamp: {Value: uint32(InvalidTimestamp)}, NotFoundLimiter: {Value: uint32(NotFoundLimiter)}, CreateLimiterError: {Value: uint32(CreateLimiterError)}, AcquireQuotaError: {Value: uint32(AcquireQuotaError)}, }
WrapperCode code -> apiCode
Functions ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.