config

package
v0.8.11 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2026 License: GPL-3.0 Imports: 4 Imported by: 1 module, 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.

Documentation

Index

Constants

View Source
const DefaultDBConnectionString = "sqlite3://schema_nest.sqlite"

Variables

This section is empty.

Functions

This section is empty.

Types

type ApiKey

type ApiKey struct {
	Identifier string   `toml:"identifier"`
	Key        string   `toml:"key"`
	Patterns   []string `toml:"patterns"`
	// contains filtered or unexported fields
}

func (*ApiKey) IsUsableForSchemaIdentifier

func (a *ApiKey) IsUsableForSchemaIdentifier(identifier string) bool

func (*ApiKey) Validate

func (a *ApiKey) Validate() error

type Config

type Config struct {
	EnableUploadAuthentication bool      `toml:"enable_upload_authentication"`
	APIKeys                    []*ApiKey `toml:"api_keys"`
	DBConnectionString         string    `toml:"database_dsn"`
	// contains filtered or unexported fields
}

func Default

func Default() *Config

func ParseFromFile

func ParseFromFile(configFile string, parser func(data string) (*Config, error)) (*Config, error)

func ParseFromToml

func ParseFromToml(tomlData string) (*Config, error)

func (*Config) LookupApiKey

func (c *Config) LookupApiKey(key string) (*ApiKey, bool)

func (*Config) Validate

func (c *Config) Validate() error

type Validatable

type Validatable interface {
	Validate() error
}

Jump to

Keyboard shortcuts

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