config

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFiber

func NewFiber(cfg *Config) *fiber.App

func NewPostgres

func NewPostgres(cfg *Config) *sqlx.DB

Types

type Config

type Config struct {
}

func NewConfig

func NewConfig() *Config

func (*Config) Get

func (c *Config) Get(key, def string) string

func (*Config) GetBool added in v0.0.3

func (c *Config) GetBool(key string, def bool) bool

func (*Config) GetInt

func (c *Config) GetInt(key string, def int) int

type Validator

type Validator struct {
	Validator *validator.Validate
}

func NewValidator

func NewValidator() *Validator

func (*Validator) Message

func (v *Validator) Message(err []exception.ValidationError) string

func (*Validator) Validate

func (v *Validator) Validate(data any) []exception.ValidationError

Jump to

Keyboard shortcuts

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