i18n

package
v1.2.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 3, 2023 License: Apache-2.0 Imports: 8 Imported by: 20

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ConfigGlobalConnectionTimeout = ffc("config.global.connectionTimeout", "The maximum amount of time that a connection is allowed to remain with no data transmitted", TimeDurationType)
	ConfigGlobalRequestTimeout    = ffc("config.global.requestTimeout", "The maximum amount of time that a request is allowed to remain open", TimeDurationType)

	ConfigGlobalRetryEnabled      = ffc("config.global.retry.enabled", "Enables retries", BooleanType)
	ConfigGlobalRetryFactor       = ffc("config.global.retry.factor", "The retry backoff factor", FloatType)
	ConfigGlobalRetryInitDelay    = ffc("config.global.retry.initDelay", "The initial retry delay", TimeDurationType)
	ConfigGlobalRetryInitialDelay = ffc("config.global.retry.initialDelay", "The initial retry delay", TimeDurationType)
	ConfigGlobalRetryMaxDelay     = ffc("config.global.retry.maxDelay", "The maximum retry delay", TimeDurationType)
	ConfigGlobalRetryMaxAttempts  = ffc("config.global.retry.maxAttempts", "The maximum number attempts", IntType)
	ConfigGlobalRetryCount        = ffc("config.global.retry.count", "The maximum number of times to retry", IntType)
	ConfigGlobalInitWaitTime      = ffc("config.global.retry.initWaitTime", "The initial retry delay", TimeDurationType)
	ConfigGlobalMaxWaitTime       = ffc("config.global.retry.maxWaitTime", "The maximum retry delay", TimeDurationType)

	ConfigGlobalUsername = ffc("config.global.auth.username", "Username", StringType)
	ConfigGlobalPassword = ffc("config.global.auth.password", "Password", StringType)
	ConfigGlobalProxyURL = ffc("config.global.proxy.url", "Optional HTTP proxy server to connect through", StringType)

	ConfigGlobalSize = ffc("config.global.cache.size", "The size of the cache", ByteSizeType)
	ConfigGlobalTTL  = ffc("config.global.cache.ttl", "The time to live (TTL) for the cache", TimeDurationType)

	ConfigGlobalWsHeartbeatInterval      = ffc("config.global.ws.heartbeatInterval", "The amount of time to wait between heartbeat signals on the WebSocket connection", TimeDurationType)
	ConfigGlobalWsInitialConnectAttempts = ffc("config.global.ws.initialConnectAttempts", "The number of attempts FireFly will make to connect to the WebSocket when starting up, before failing", IntType)
	ConfigGlobalWsPath                   = ffc("config.global.ws.path", "The WebSocket sever URL to which FireFly should connect", "WebSocket URL "+StringType)
	ConfigGlobalWsReadBufferSize         = ffc("config.global.ws.readBufferSize", "The size in bytes of the read buffer for the WebSocket connection", ByteSizeType)
	ConfigGlobalWsWriteBufferSize        = ffc("config.global.ws.writeBufferSize", "The size in bytes of the write buffer for the WebSocket connection", ByteSizeType)

	ConfigGlobalTLSCaFile           = ffc("config.global.tls.caFile", "The path to the CA file for TLS on this API", StringType)
	ConfigGlobalTLSCertFile         = ffc("config.global.tls.certFile", "The path to the certificate file for TLS on this API", StringType)
	ConfigGlobalTLSClientAuth       = ffc("config.global.tls.clientAuth", "Enables or disables client auth for TLS on this API", StringType)
	ConfigGlobalTLSEnabled          = ffc("config.global.tls.enabled", "Enables or disables TLS on this API", BooleanType)
	ConfigGlobalTLSKeyFile          = ffc("config.global.tls.keyFile", "The path to the private key file for TLS on this API", StringType)
	ConfigGlobalTLSHandshakeTimeout = ffc("config.global.tlsHandshakeTimeout", "The maximum amount of time to wait for a successful TLS handshake", TimeDurationType)

	ConfigGlobalBodyTemplate              = ffc("config.global.bodyTemplate", "The body go template string to use when making HTTP requests", GoTemplateType)
	ConfigGlobalCustomClient              = ffc("config.global.customClient", "Used for testing purposes only", IgnoredType)
	ConfigGlobalExpectContinueTimeout     = ffc("config.global.expectContinueTimeout", "See [ExpectContinueTimeout in the Go docs](https://pkg.go.dev/net/http#Transport)", TimeDurationType)
	ConfigGlobalHeaders                   = ffc("config.global.headers", "Adds custom headers to HTTP requests", MapStringStringType)
	ConfigGlobalIdleTimeout               = ffc("config.global.idleTimeout", "The max duration to hold a HTTP keepalive connection between calls", TimeDurationType)
	ConfigGlobalMaxIdleConns              = ffc("config.global.maxIdleConns", "The max number of idle connections to hold pooled", IntType)
	ConfigGlobalMethod                    = ffc("config.global.method", "The HTTP method to use when making requests to the Address Resolver", StringType)
	ConfigGlobalAuthType                  = ffc("config.global.auth.type", "The auth plugin to use for server side authentication of requests", StringType)
	ConfigGlobalPassthroughHeadersEnabled = ffc("config.global.passthroughHeadersEnabled", "Enable passing through the set of allowed HTTP request headers", BooleanType)

	ConfigLang                  = ffc("config.lang", "Default language for translation (API calls may support language override using headers)", StringType)
	ConfigLogCompress           = ffc("config.log.compress", "Determines if the rotated log files should be compressed using gzip", BooleanType)
	ConfigLogFilename           = ffc("config.log.filename", "Filename is the file to write logs to.  Backup log files will be retained in the same directory", StringType)
	ConfigLogFilesize           = ffc("config.log.filesize", "MaxSize is the maximum size the log file before it gets rotated", ByteSizeType)
	ConfigLogForceColor         = ffc("config.log.forceColor", "Force color to be enabled, even when a non-TTY output is detected", BooleanType)
	ConfigLogLevel              = ffc("config.log.level", "The log level - error, warn, info, debug, trace", StringType)
	ConfigLogMaxAge             = ffc("config.log.maxAge", "The maximum time to retain old log files based on the timestamp encoded in their filename.", TimeDurationType)
	ConfigLogMaxBackups         = ffc("config.log.maxBackups", "Maximum number of old log files to retain", IntType)
	ConfigLogNoColor            = ffc("config.log.noColor", "Force color to be disabled, event when TTY output is detected", BooleanType)
	ConfigLogTimeFormat         = ffc("config.log.timeFormat", "Custom time format for logs", TimeFormatType)
	ConfigLogUtc                = ffc("config.log.utc", "Use UTC timestamps for logs", BooleanType)
	ConfigLogIncludeCodeInfo    = ffc("config.log.includeCodeInfo", "Enables the report caller for including the calling file and line number, and the calling function. If using text logs, it uses the logrus text format rather than the default prefix format.", BooleanType)
	ConfigLogJSONEnabled        = ffc("config.log.json.enabled", "Enables JSON formatted logs rather than text. All log color settings are ignored when enabled.", BooleanType)
	ConfigLogJSONTimestampField = ffc("config.log.json.fields.timestamp", "Configures the JSON key containing the timestamp of the log", StringType)
	ConfigLogJSONLevelField     = ffc("config.log.json.fields.level", "Configures the JSON key containing the log level", StringType)
	ConfigLogJSONMessageField   = ffc("config.log.json.fields.message", "Configures the JSON key containing the log message", StringType)
	ConfigLogJSONFuncField      = ffc("config.log.json.fields.func", "Configures the JSON key containing the calling function", StringType)
	ConfigLogJSONFileField      = ffc("config.log.json.fields.file", "configures the JSON key containing the calling file", StringType)
	ConfigCorsCredentials       = ffc("config.cors.credentials", "CORS setting to control whether a browser allows credentials to be sent to this API", BooleanType)

	ConfigCorsDebug   = ffc("config.global.cors.debug", "Whether debug is enabled for the CORS implementation", BooleanType)
	ConfigCorsEnabled = ffc("config.global.cors.enabled", "Whether CORS is enabled", BooleanType)
	ConfigCorsHeaders = ffc("config.global.cors.headers", "CORS setting to control the allowed headers", ArrayStringType)
	ConfigCorsMaxAge  = ffc("config.global.cors.maxAge", "The maximum age a browser should rely on CORS checks", TimeDurationType)
	ConfigCorsMethods = ffc("config.global.cors.methods", " CORS setting to control the allowed methods", ArrayStringType)
	ConfigCorsOrigins = ffc("config.global.cors.origins", "CORS setting to control the allowed origins", ArrayStringType)

	ConfigGlobalAuthBasicPasswordFile = ffc("config.global.basic.passwordfile", "The path to a .htpasswd file to use for authenticating requests. Passwords should be hashed with bcrypt.", StringType)

	ConfigGlobalDebugEnabled = ffc("config.debug.enabled", "Whether the debug HTTP endpoint is enabled", BooleanType)

	ConfigGlobalPort            = ffc("config.port", "Listener port", IntType)
	ConfigGlobalAddress         = ffc("config.address", "Listener address", IntType)
	ConfigGlobalPublicURL       = ffc("config.publicURL", "Externally available URL for the HTTP endpoint", StringType)
	ConfigGlobalReadTimeout     = ffc("config.readTimeout", "HTTP server read timeout", TimeDurationType)
	ConfigGlobalWriteTimeout    = ffc("config.writeTimeout", "HTTP server write timeout", TimeDurationType)
	ConfigGlobalShutdownTimeout = ffc("config.shutdownTimeout", "HTTP server shutdown timeout", TimeDurationType)
)
View Source
var (
	MsgConfigFailed                                = ffe("FF00101", "Failed to read config", 500)
	MsgBigIntTooLarge                              = ffe("FF00103", "Byte length of serialized integer is too large %d (max=%d)")
	MsgBigIntParseFailed                           = ffe("FF00104", "Failed to parse JSON value '%s' into BigInt")
	MsgTypeRestoreFailed                           = ffe("FF00105", "Failed to restore type '%T' into '%T'")
	MsgInvalidHex                                  = ffe("FF00106", "Invalid hex supplied", 400)
	MsgInvalidWrongLenB32                          = ffe("FF00107", "Byte length must be 32 (64 hex characters)", 400)
	MsgUnknownValidatorType                        = ffe("FF00108", "Unknown validator type: '%s'", 400)
	MsgDataValueIsNull                             = ffe("FF00109", "Data value is null", 400)
	MsgBlobMismatchSealingData                     = ffe("FF00110", "Blob mismatch when sealing data")
	MsgUnknownFieldValue                           = ffe("FF00111", "Unknown %s '%v'", 400)
	MsgMissingRequiredField                        = ffe("FF00112", "Field '%s' is required", 400)
	MsgDataInvalidHash                             = ffe("FF00113", "Invalid data: hashes do not match Hash=%s Expected=%s", 400)
	MsgNilID                                       = ffe("FF00114", "ID is nil")
	MsgGroupMustHaveMembers                        = ffe("FF00115", "Group must have at least one member", 400)
	MsgEmptyMemberIdentity                         = ffe("FF00116", "Identity is blank in member %d")
	MsgEmptyMemberNode                             = ffe("FF00117", "Node is blank in member %d")
	MsgDuplicateMember                             = ffe("FF00118", "Member %d is a duplicate org+node combination: %s", 400)
	MsgGroupInvalidHash                            = ffe("FF00119", "Invalid group: hashes do not match Hash=%s Expected=%s", 400)
	MsgInvalidDIDForType                           = ffe("FF00120", "Invalid FireFly DID '%s' for type='%s' namespace='%s' name='%s'", 400)
	MsgCustomIdentitySystemNS                      = ffe("FF00121", "Custom identities cannot be defined in the '%s' namespace", 400)
	MsgSystemIdentityCustomNS                      = ffe("FF00122", "System identities must be defined in the '%s' namespace", 400)
	MsgNilParentIdentity                           = ffe("FF00124", "Identity of type '%s' must have a valid parent", 400)
	MsgNilOrNullObject                             = ffe("FF00125", "Object is null")
	MsgUnknownIdentityType                         = ffe("FF00126", "Unknown identity type: %s", 400)
	MsgJSONObjectParseFailed                       = ffe("FF00127", "Failed to parse '%s' as JSON")
	MsgNilDataReferenceSealFail                    = ffe("FF00128", "Invalid message: nil data reference at index %d", 400)
	MsgDupDataReferenceSealFail                    = ffe("FF00129", "Invalid message: duplicate data reference at index %d", 400)
	MsgInvalidTXTypeForMessage                     = ffe("FF00130", "Invalid transaction type for sending a message: %s", 400)
	MsgVerifyFailedNilHashes                       = ffe("FF00131", "Invalid message: nil hashes", 400)
	MsgVerifyFailedInvalidHashes                   = ffe("FF00132", "Invalid message: hashes do not match Hash=%s Expected=%s DataHash=%s DataHashExpected=%s", 400)
	MsgDuplicateArrayEntry                         = ffe("FF00133", "Duplicate %s at index %d: '%s'", 400)
	MsgTooManyItems                                = ffe("FF00134", "Maximum number of %s items is %d (supplied=%d)", 400)
	MsgFieldTooLong                                = ffe("FF00135", "Field '%s' maximum length is %d", 400)
	MsgTimeParseFail                               = ffe("FF00136", "Cannot parse time as RFC3339, Unix, or UnixNano: '%s'", 400)
	MsgDurationParseFail                           = ffe("FF00137", "Unable to parse '%s' as duration string, or millisecond number", 400)
	MsgInvalidUUID                                 = ffe("FF00138", "Invalid UUID supplied", 400)
	MsgSafeCharsOnly                               = ffe("FF00139", "Field '%s' must include only alphanumerics (a-zA-Z0-9), dot (.), dash (-) and underscore (_)", 400)
	MsgInvalidName                                 = ffe("FF00140", "Field '%s' must be 1-64 characters, including alphanumerics (a-zA-Z0-9), dot (.), dash (-) and underscore (_), and must start/end in an alphanumeric", 400)
	MsgNoUUID                                      = ffe("FF00141", "Field '%s' must not be a UUID", 400)
	MsgInvalidFilterField                          = ffe("FF00142", "Unknown filter '%s'", 400)
	MsgInvalidValueForFilterField                  = ffe("FF00143", "Unable to parse value for filter '%s'", 400)
	MsgFieldMatchNoNull                            = ffe("FF00144", "Comparison operator for field '%s' cannot accept a null value", 400)
	MsgFieldTypeNoStringMatching                   = ffe("FF00145", "Field '%s' of type '%s' does not support partial or case-insensitive string matching", 400)
	MsgWSSendTimedOut                              = ffe("FF00146", "Websocket send timed out")
	MsgWSClosing                                   = ffe("FF00147", "Websocket closing")
	MsgWSConnectFailed                             = ffe("FF00148", "Websocket connect failed")
	MsgInvalidURL                                  = ffe("FF00149", "Invalid URL: '%s'")
	MsgWSHeartbeatTimeout                          = ffe("FF00150", "Websocket heartbeat timed out after %.2fms", 500)
	MsgAPIServerStartFailed                        = ffe("FF00151", "Unable to start listener on %s")
	MsgInvalidCAFile                               = ffe("FF00152", "Invalid CA certificates file")
	MsgTLSConfigFailed                             = ffe("FF00153", "Failed to initialize TLS configuration")
	MsgContextCanceled                             = ffe("FF00154", "Context canceled")
	MsgConnectorFailInvoke                         = ffe("FF00155", "Connector request failed. requestId=%s failed to call connector API")
	MsgConnectorInvalidContentType                 = ffe("FF00156", "Connector request failed. requestId=%s invalid response content type: %s")
	MsgConnectorError                              = ffe("FF00157", "Connector request failed. requestId=%s reason=%s error: %s")
	MsgFieldDescriptionMissing                     = ffe("FF00158", "Field description missing for '%s' on route '%s'")
	MsgRouteDescriptionMissing                     = ffe("FF00159", "API route description missing for route '%s'")
	MsgFFStructTagMissing                          = ffe("FF00160", "ffstruct tag is missing for '%s' on route '%s'")
	MsgMultiPartFormReadError                      = ffe("FF00161", "Error reading multi-part form input", 400)
	MsgInvalidContentType                          = ffe("FF00162", "Invalid content type '%s'", 415)
	MsgFieldsAfterFile                             = ffe("FF00163", "Additional form field sent after file in multi-part form (ignored): '%s'", 400)
	Msg404NoResult                                 = ffe("FF00164", "No result found", 404)
	MsgResponseMarshalError                        = ffe("FF00165", "Failed to serialize response data", 400)
	MsgRequestTimeout                              = ffe("FF00166", "The request with id '%s' timed out after %.2fms", 408)
	Msg404NotFound                                 = ffe("FF00167", "Not found", 404)
	MsgUnknownAuthPlugin                           = ffe("FF00168", "Unknown auth plugin: '%s'")
	MsgUnauthorized                                = ffe("FF00169", "Unauthorized", 401)
	MsgForbidden                                   = ffe("FF00170", "Forbidden", 403)
	MsgInvalidEnum                                 = ffe("FF00171", "'%s' is not a valid enum type", 400)
	MsgInvalidEnumValue                            = ffe("FF00172", "'%s' is not a valid enum value for enum type '%s'. Valid options are: %v", 400)
	MsgDBInitFailed                                = ffe("FF00173", "Database initialization failed")
	MsgDBQueryBuildFailed                          = ffe("FF00174", "Database query builder failed")
	MsgDBBeginFailed                               = ffe("FF00175", "Database begin transaction failed")
	MsgDBQueryFailed                               = ffe("FF00176", "Database query failed")
	MsgDBInsertFailed                              = ffe("FF00177", "Database insert failed")
	MsgDBUpdateFailed                              = ffe("FF00178", "Database update failed")
	MsgDBDeleteFailed                              = ffe("FF00179", "Database delete failed")
	MsgDBCommitFailed                              = ffe("FF00180", "Database commit failed")
	MsgDBMissingJoin                               = ffe("FF00181", "Database missing expected join entry in table '%s' for id '%s'")
	MsgDBReadErr                                   = ffe("FF00182", "Database resultset read error from table '%s'")
	MsgMissingConfig                               = ffe("FF00183", "Missing configuration '%s' for %s")
	MsgDBMigrationFailed                           = ffe("FF00184", "Database migration failed")
	MsgDBNoSequence                                = ffe("FF00185", "Failed to retrieve sequence for insert row %d (could mean duplicate insert)", 500)
	MsgDBMultiRowConfigError                       = ffe("FF00186", "Database invalid configuration - using multi-row insert on DB plugin that does not support query syntax for input")
	MsgDBLockFailed                                = ffe("FF00187", "Database lock failed")
	MsgHashMismatch                                = ffe("FF00188", "Hash mismatch")
	MsgIDMismatch                                  = ffe("FF00189", "ID mismatch")
	MsgUnsupportedSQLOpInFilter                    = ffe("FF00190", "No SQL mapping implemented for filter operator '%s'", 400)
	MsgMaxFilterSkip                               = ffe("FF00191", "You have reached the maximum pagination limit for this query (%d)", 400)
	MsgMaxFilterLimit                              = ffe("FF00192", "Your query exceeds the maximum filter limit (%d)", 400)
	MsgQueryOpUnsupportedMod                       = ffe("FF00193", "Operation '%s' on '%s' does not support modifiers", 400)
	MsgFailedToStartListener                       = ffe("FF00194", "Failed to start filesystem listener: %s")
	MsgMetricsInvalidSubsystemName                 = ffe("FF00195", "Subsystem name can only contain lowercase letters and underscore: %s")
	MsgMetricsDuplicateSubsystemName               = ffe("FF00196", "Subsystem with name '%s' already exist")
	MsgMetricsInvalidName                          = ffe("FF00197", "Metric name can only contain lowercase letters and underscore: %s")
	MsgMetricsHelpTextMissing                      = ffe("FF00198", "Metric help text must be provided")
	MsgMetricsDuplicateName                        = ffe("FF00199", "Metric with name '%s' already exist")
	MsgMetricsEmptyRegistry                        = ffe("FF00200", "Metrics registry has no subsystem registered")
	MsgMetricsSubsystemHTTPInstrumentationNotFound = ffe("FF00201", "No HTTP metrics instrumentation found for subsystem %s")
	MsgMetricsInvalidLabel                         = ffe("FF00202", "Label with name '%s' is invalid due to clashing with system prefix '%s'")
	MsgInvalidNamespaceUUID                        = ffe("FF00203", "Expected 'namespace:' prefix on ID '%s'", 400)
	MsgInvalidOutputOption                         = ffe("FF00204", "Invalid output option '%s'")
	MsgDBNoRowsAffected                            = ffe("FF00205", "Specified resource not found for update", 404)
	MsgInvalidKeyPairFiles                         = ffe("FF00206", "Invalid certifcate and key pair files")
)
View Source
var (
	APISuccessResponse      = ffm("api.success", "Success")
	APIRequestTimeoutDesc   = ffm("api.requestTimeout", "Server-side request timeout (milliseconds, or set a custom suffix like 10s)")
	APIFilterParamDesc      = ffm("api.filterParam", "Data filter field. Prefixes supported: > >= < <= @ ^ ! !@ !^")
	APIFilterSortDesc       = ffm("api.filterSort", "Sort field. For multi-field sort use comma separated values (or multiple query values) with '-' prefix for descending")
	APIFilterAscendingDesc  = ffm("api.filterAscending", "Ascending sort order (overrides all fields in a multi-field sort)")
	APIFilterDescendingDesc = ffm("api.filterDescending", "Descending sort order (overrides all fields in a multi-field sort)")
	APIFilterSkipDesc       = ffm("api.filterSkip", "The number of records to skip (max: %d). Unsuitable for bulk operations")
	APIFilterLimitDesc      = ffm("api.filterLimit", "The maximum number of records to return (max: %d)")
	APIFilterCountDesc      = ffm("api.filterCount", "Return a total count as well as items (adds extra database processing)")
)
View Source
var ArrayStringType = "`[]string`"
View Source
var BooleanType = "`boolean`"
View Source
var ByteSizeType = "[`BytesSize`](https://pkg.go.dev/github.com/docker/go-units#BytesSize)"
View Source
var FloatType = "`float32`"
View Source
var GoTemplateType = "[Go Template](https://pkg.go.dev/text/template) `string`"
View Source
var IgnoredType = "IGNORE"
View Source
var IntType = "`int`"
View Source
var MapStringStringType = "`map[string]string`"
View Source
var StringType = "`string`"
View Source
var TimeDurationType = "[`time.Duration`](https://pkg.go.dev/time#Duration)"
View Source
var TimeFormatType = "[Time format](https://pkg.go.dev/time#pkg-constants) `string`"

Functions

func Expand

func Expand(ctx context.Context, key MessageKey, inserts ...interface{}) string

Expand for use in docs and logging - returns a translated message, translated the language of the context If a translation is not found for the language of the context, the default language text will be returned instead

func ExpandWithCode

func ExpandWithCode(ctx context.Context, key MessageKey, inserts ...interface{}) string

ExpandWithCode for use in error scenarios - returns a translated message with a "MSG012345:" prefix, translated the language of the context

func GetFieldType

func GetFieldType(code string) (string, bool)

func GetStatusHint

func GetStatusHint(code string) (int, bool)

func NewError

func NewError(ctx context.Context, msg ErrorMessageKey, inserts ...interface{}) error

NewError creates a new error

func RegisterPrefix added in v1.2.2

func RegisterPrefix(prefix, description string)

RegisterPrefix allows components to register a message prefix that is not known to the core Hyperledger FireFly codebase. The firefly-common repo does not provide the clash-protection for these prefixes - so if you're writing a new component within the FF OSS community then you should instead submit a PR to update the registeredPrefixes constant.

If you're writing a proprietary extension, or just using the Microservice framework for your own purposes, then you can register your own prefix with this function dynamically.

It must conform to being two upper case characters, then two numbers. You cannot use the `FF` prefix characters, as they are reserved for FireFly components

func SetLang

func SetLang(lang string)

func WithLang

func WithLang(ctx context.Context, lang language.Tag) context.Context

WithLang sets the language on the context

func WrapError

func WrapError(ctx context.Context, err error, msg ErrorMessageKey, inserts ...interface{}) error

WrapError wraps an error

Types

type ConfigMessageKey

type ConfigMessageKey MessageKey

ConfigMessageKey is a special lookup string conforming to FireFly's rules for configuration descriptions and types

func FFC

func FFC(language language.Tag, key, translation, fieldType string) ConfigMessageKey

FFC is the translation helper to define a configuration key description and type

type ErrorMessageKey

type ErrorMessageKey MessageKey

ErrorMessageKey is a special lookup string conforming to FireFly's rules for error message registration

func FFE

func FFE(language language.Tag, key, translation string, statusHint ...int) ErrorMessageKey

FFE is the translation helper to register an error message

type MessageKey

type MessageKey string

MessageKey is the lookup string for any translation

func FFM

func FFM(language language.Tag, key, translation string) MessageKey

FFM is the translation helper to define a new message (not used in translation files)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL