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." // App Errors FailedToGetAppMsg = "failed to get app information." FailedToGetClusterDetailsMsg = "failed to get cluster details." FailedToGetClusterMsg = "failed to get cluster information." FailedToUpdateClusterMsg = "failed to update cluster information." FailedToGetClusterListMsg = "failed to get cluster list." FailedToGetKubeconfigMsg = "failed to get kubeconfig." FailedToDecodeKubeconfigMsg = "failed to decode kubeconfig." FailedToAddNodeMsg = "failed to add node." FailedToGetInstancesMsg = "failed to get instances." FailedToGetNodeGroupsMsg = "failed to get node groups." FailedToGetClusterFlavorMsg = "failed to get cluster flavor." FailedToDeleteNodeGroupMsg = "failed to delete node group." )
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.