config

package
v1.0.0-...-34f284f Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

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

func NewConfig

func NewConfig(envPath string) *Config

func (*Config) Add

func (conf *Config) Add(name string, configuration map[string]any)

Add config to application.

func (*Config) Env

func (conf *Config) Env(envName string, defaultValue ...any) any

Env Get config from env.

func (*Config) Get

func (conf *Config) Get(path string, defaultValue ...any) any

Get config from application.

func (*Config) GetBool

func (conf *Config) GetBool(path string, defaultValue ...any) bool

GetBool Get bool type config from application.

func (*Config) GetDuration

func (conf *Config) GetDuration(path string) time.Duration

func (*Config) GetInt

func (conf *Config) GetInt(path string, defaultValue ...any) int

GetInt Get int type config from application.

func (*Config) GetMap

func (conf *Config) GetMap(path string) map[string]any

func (*Config) GetString

func (conf *Config) GetString(path string, defaultValue ...any) string

GetString Get string type config from application.

func (*Config) GetTime

func (conf *Config) GetTime(path string) time.Time

type ServiceProvider

type ServiceProvider struct {
}

func (*ServiceProvider) Boot

func (config *ServiceProvider) Boot()

func (*ServiceProvider) Register

func (config *ServiceProvider) Register()

Jump to

Keyboard shortcuts

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