config

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2026 License: MIT Imports: 5 Imported by: ? modules, 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

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