config

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AttachmentConfig

type AttachmentConfig struct {
	Enabled      bool     `mapstructure:"enabled"`
	MaxSize      int64    `mapstructure:"max_size"`
	AllowedTypes []string `mapstructure:"allowed_types"`
}

type Config

type Config struct {
	Host       string           `mapstructure:"host"`
	Port       int              `mapstructure:"port"`
	RemoteURL  string           `mapstructure:"remote_url"`
	AuthToken  string           `mapstructure:"auth_token"`
	ClientType string           `mapstructure:"client_type"`
	Attachment AttachmentConfig `mapstructure:"attachment"`
}

func Load

func Load() (*Config, error)

func (*Config) Validate

func (c *Config) Validate() error

Validate checks if the configuration has all required fields for API operations

type ValidationError

type ValidationError struct {
	Field   string
	Message string
}

func (*ValidationError) Error

func (e *ValidationError) Error() string

Jump to

Keyboard shortcuts

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