configuration

package module
v0.0.0-...-69e9e06 Latest Latest
Warning

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

Go to latest
Published: May 18, 2026 License: BSD-3-Clause Imports: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README ΒΆ

Configuration

Github template for new libraries

Static Badge

GoDoc GitHub stars Go Report Card codecov

Versions

Stable Version GitHub Release GitHub Release

Also available in other languages

Go Implementation PHP Implementation JavaScript Implementation

Introduction

This is template repository for new libraries

Important

  • Edit go.mod and rename to your package module
  • Uncomment .github/workflows/tests.yml

Contributing

Read Contributing

Contributors

JanGalek actions-user

Join our Discord Community! πŸŽ‰

Discord

Click above to join our community on Discord!

Documentation ΒΆ

Index ΒΆ

Constants ΒΆ

This section is empty.

Variables ΒΆ

This section is empty.

Functions ΒΆ

This section is empty.

Types ΒΆ

type Config ΒΆ

type Config struct {
	Parameters map[string]any     `yaml:"parameters"`
	Renderer   Renderer           `yaml:"renderer"`
	Router     Router             `yaml:"router"`
	Cache      cache.Cache        `yaml:"cache"`
	Diago      Diago              `yaml:"diago"`
	Gorm       GormDatabaseConfig `yaml:"gorm"`
	Custom     helper.Custom
}

func DefaultConfig ΒΆ

func DefaultConfig() *Config

func LoadConfig ΒΆ

func LoadConfig(path string) (*Config, error)

func (*Config) UnmarshalYAML ΒΆ

func (c *Config) UnmarshalYAML(value *yaml.Node) error

type ConfigInterface ΒΆ

type ConfigInterface interface {
	UnmarshalYAML(value *yaml.Node) error
}

type Diago ΒΆ

type Diago struct {
	Enabled bool `yaml:"enabled"`
}

type GormDatabaseConfig ΒΆ

type GormDatabaseConfig struct {
	Driver          string        `mapstructure:"driver"`
	Host            string        `mapstructure:"host"`
	Port            int           `mapstructure:"port"`
	User            string        `mapstructure:"user"`
	Password        string        `mapstructure:"password"`
	DBName          string        `mapstructure:"dbname"`
	SSLMode         string        `mapstructure:"sslmode"`
	TimeZone        string        `mapstructure:"timezone"`
	MaxIdleConns    int           `mapstructure:"max_idle_conns"`
	MaxOpenConns    int           `mapstructure:"max_open_conns"`
	ConnMaxLifetime time.Duration `mapstructure:"conn_max_lifetime"`
	Debug           bool          `mapstructure:"debug"`
}

func (GormDatabaseConfig) ToGormConfig ΒΆ

func (db GormDatabaseConfig) ToGormConfig() *gorm.Config

ToGormConfig vyexportuje data do struktury z balíčku gouef/gorm

type Renderer ΒΆ

type Renderer struct {
	Dir    string   `yaml:"dir"`
	Layout []string `yaml:"layout"`
	Custom helper.Custom
}

func (*Renderer) UnmarshalYAML ΒΆ

func (c *Renderer) UnmarshalYAML(value *yaml.Node) error

type Router ΒΆ

type Router struct {
	Statics []RouterStatic `yaml:"statics"`
	Proxy   RouterProxy    `yaml:"proxy"`
	Custom  helper.Custom
}

func (*Router) UnmarshalYAML ΒΆ

func (r *Router) UnmarshalYAML(value *yaml.Node) error

type RouterProxy ΒΆ

type RouterProxy struct {
	Trust  []string `yaml:"trust"`
	Custom helper.Custom
}

type RouterStatic ΒΆ

type RouterStatic struct {
	Path   string `yaml:"path"`
	Root   string `yaml:"root"`
	Custom helper.Custom
}

Directories ΒΆ

Path Synopsis

Jump to

Keyboard shortcuts

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