config

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultListen       = ":7777"
	DefaultUIListen     = ":7778"
	DefaultTimeout      = 30 * time.Second
	DefaultLogLevel     = "info"
	DefaultLimit        = 100
	DefaultMaxLimit     = 1000
	DefaultMaxBodyBytes = int64(10 << 20) // 10 MiB
)

Variables

View Source
var ErrNoConfigFound = errors.New("no config file found")

Functions

func Detect

func Detect(dir string) (string, error)

Types

type Config

type Config struct {
	Driver         database.Driver
	DSN            string
	Listen         string
	ReadOnly       bool
	AllowedSchemas []string
	AllowedTables  []string
	Timeout        time.Duration
	UI             UIConfig
	CORSOrigins    []string
	AuthTokenEnv   string
	AuthToken      string // Resolved at runtime from AuthTokenEnv by the cli; empty disables bearer auth.
	LogLevel       string
	DefaultLimit   int
	MaxLimit       int
	MaxBodyBytes   int64
}

func Load

func Load(path string) (Config, error)

type UIConfig

type UIConfig struct {
	Enabled bool
	Listen  string
}

Jump to

Keyboard shortcuts

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