Documentation
¶
Index ¶
- Constants
- Variables
- func GenerateRandomCode(seed string, length int) string
- func GenerateUUIDv4() string
- func GetLanguageWithContext() string
- func TranslateByIDWithContext(ctx context.Context, msgID string) string
- func TranslateByTemplateWithContext(ctx context.Context, msgID string, template map[string]interface{}) string
- func ValidateWithContext(ctx context.Context, i interface{}) map[string]string
- type ErrorBag
Constants ¶
View Source
const ( RequestIDKey = "requestid" ValidatorKey = "validator" LocalizerKey = "localizer" TokenizerKey = "tokenizer" TokenClaimKey = "tokenClaim" NewrelicContextKey = "newRelicContext" )
View Source
const ( NotFoundErrCode = "404" ValidationErrCode = "509" UnexpectedErrCode = "500" BodyParserErrCode = "400" NotFoundMsg = "Not found!" UnexpectedMsg = "An unexpected error has occurred." ValidationMsg = "The given data was invalid." BodyParserMsg = "The given values could not be parsed." )
View Source
const (
AuthorizationHeaderKey = "Authorization"
)
HTTP Header
View Source
const (
BearerAuthType = "Bearer"
)
Variables ¶
View Source
var ( TranslateByTemplateWithContextFunc = TranslateByTemplateWithContext TranslateByIDWithContextFunc = TranslateByIDWithContext )
View Source
var (
GenerateUUIDv4Func = GenerateUUIDv4
)
Functions ¶
func GenerateRandomCode ¶
func GenerateUUIDv4 ¶
func GenerateUUIDv4() string
func GetLanguageWithContext ¶
func GetLanguageWithContext() string
Types ¶
Click to show internal directories.
Click to hide internal directories.