configuration

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const ConfigurationDir = "config/"

Variables

This section is empty.

Functions

func SaveConfiguration

func SaveConfiguration(configBytes []byte, environment string) error

Types

type Configuration

type Configuration struct {
	Namespace string `yaml:"namespace"`
	Name      string `yaml:"name"`
	Semver    string `yaml:"semver"`
	License   string `yaml:"license"`
	Copyright struct {
		Year   int    `yaml:"year"`
		Author string `yaml:"author"`
	} `yaml:"copyright"`
	Server struct {
		JWT      string `yaml:"jwt"`
		Port     int    `yaml:"port"`
		Frontend struct {
			Dir string `yaml:"dir"`
			Api string `yaml:"api"`
		} `yaml:"frontend"`
	} `yaml:"server"`
	Database struct {
		URL                    string `yaml:"url"`
		Sqlc                   string `yaml:"sqlc"`
		SqlcRepositoryLocation string `yaml:"repository"`
		QueriesLocation        string `yaml:"queries"`
		Migration              struct {
			Protocol    string `yaml:"protocol"`
			Destination string `yaml:"destination"`
		} `yaml:"migration"`
	} `yaml:"database"`
	Cache struct {
		URL string `yaml:"url"`
	} `yaml:"cache"`
	S3 struct {
		URL    string `yaml:"url"`
		Access string `yaml:"access"`
		Secret string `yaml:"secret"`
	} `yaml:"s3"`
}

func LoadConfiguration

func LoadConfiguration(environment string) (*Configuration, error)

func (*Configuration) GenerateConfigurationFile

func (configuration *Configuration) GenerateConfigurationFile(environment string) error

Jump to

Keyboard shortcuts

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