Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { Name string Verbose bool Server ConfigServer MongoDB ConfigMongo }
Config is a structure holding all configuration data
type ConfigMongo ¶
type ConfigMongo struct { Scheme string IP string Port string Database ConfigMongoData Timeout ConfigMongoTimeout }
ConfigMongo is a structure holding configuration for MongoDB
type ConfigMongoData ¶
ConfigMongoData is a structure holding configuration for MongoDB database
type ConfigMongoTimeout ¶
ConfigMongoTimeout is a structure holding configuration for MongoDB timeouts
type ConfigServer ¶
type ConfigServer struct { IP string Port string TypeDB string Timeout ConfigServerTimeout }
ConfigServer is a structure holding configuration for server
type ConfigServerTimeout ¶
ConfigServerTimeout is a structure holding configuration for server timeouts
type ValidationError ¶
type ValidationError struct {
validator.FieldError
}
ValidationError wraps validator FieldError to control exposed format
func (ValidationError) Error ¶
func (vError ValidationError) Error() string
Error returns the error string
type ValidationErrors ¶
type ValidationErrors []ValidationError
ValidationErrors is a collection of ValidationError objects
func (ValidationErrors) Errors ¶
func (vErrors ValidationErrors) Errors() []string
Errors returns all error in a string (slice) format
type Validator ¶
type Validator struct {
// contains filtered or unexported fields
}
Validator contains validate rules
func NewValidator ¶
func NewValidator() *Validator
NewValidator is a factory method to create a new Validator type
func (*Validator) Validate ¶
func (v *Validator) Validate(i interface{}) ValidationErrors
Validate is a Validator method used to inspect inputted interface