config

package
v0.9.18 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Port       int           `json:"port"`
	URL        string        `json:"url"`
	SlugLength int           `json:"slug_length"`
	BufferSize int64         `json:"buffer_size"`
	DefaultTTL time.Duration `json:"default_ttl"`
	S3Bucket   string        `json:"s3_bucket"`
	S3Prefix   string        `json:"s3_prefix"`
	// DataDir is the filesystem directory used by the server mode to store
	// paste content and metadata. It defaults to ./data and can be overridden
	// via the NCLIP_DATA_DIR environment variable or CLI flag.
	DataDir string `json:"data_dir"`
	// UploadAuth enables API key authentication on upload endpoints
	UploadAuth bool `json:"upload_auth"`
	// APIKeys is a comma-separated list of valid API keys
	APIKeys       string `json:"api_keys"`
	Version       string `json:"version"`
	BuildTime     string `json:"build_time"`
	CommitHash    string `json:"commit_hash"`
	MaxRenderSize int64  `json:"max_render_size"`
}

Config holds all configuration for the nclip service

func LoadConfig

func LoadConfig() *Config

LoadConfig loads configuration from environment variables and CLI flags

Jump to

Keyboard shortcuts

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