Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var RegExFilePath = "/etc/common/ParameterValidator.json"
RegExFilePath ... path to read RegEx in production
Functions ¶
func GetDomainFieldName ¶
GetDomainFieldName returns the mapped domain field name of a given rpc field
func RPCParameterValidator ¶
func RPCParameterValidator(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error)
RPCParameterValidator is an example of unary server interceptor
Types ¶
type ValidationConfiguration ¶
type ValidationConfiguration struct { RegExp string MinLength int MaxLength int ErrDescription string }
ValidationConfiguration ... regEx structure
func GetValidationConfiguration ¶
func GetValidationConfiguration(key string) *ValidationConfiguration
GetValidationConfiguration returns the validation configuration for a given field
Click to show internal directories.
Click to hide internal directories.