config

package
v0.7.80 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2026 License: GPL-3.0 Imports: 4 Imported by: 0

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