config

package
v0.0.0-...-d68acc2 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2021 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppConfig

type AppConfig struct {
	Port string
}

AppConfig struct

func ConfigureApp

func ConfigureApp() *AppConfig

ConfigureApp func

type Config

type Config struct {
	APP *AppConfig
	JWT *JWTConfig
	DB  *gorm.DB
}

func New

func New() (*Config, error)

type JWTConfig

type JWTConfig struct {
	Secret string
}

JWTConfig struct

func ConfigureJWT

func ConfigureJWT() (config *JWTConfig)

ConfigureJWT func

type ValidationError

type ValidationError struct {
	Namespace string `json:"namespace,omitempty"`
	Field     string `json:"field,omitempty"`
	Error     string `json:"error,omitempty"`
}

ValidationError represent error from validator

type Validator

type Validator struct {
	// contains filtered or unexported fields
}

Validator struct

func NewValidator

func NewValidator() *Validator

NewValidator create an instance of Validator Struct

func (*Validator) FormatErrors

func (v *Validator) FormatErrors(errs validator.ValidationErrors) []ValidationError

FormatErrors generate list of error

func (*Validator) ValidateStruct

func (v *Validator) ValidateStruct(input interface{}) []ValidationError

ValidateStruct func

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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