config

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppConfig

type AppConfig struct {
	Name      string `config:"name"`       // Name is the name of the application
	BodyLimit string `config:"body_limit"` // BodyLimit is the body limit of the application
	Port      uint16 `config:"port"`       // Port is the port of the application
}

AppConfig represents the application configuration.

type Config

type Config interface {
	Unmarshal(key string, target any) error
}

type CorsConfig

type CorsConfig struct {
	Enabled      bool     `config:"enabled"`       // Enabled is whether to enable CORS.
	AllowOrigins []string `config:"allow_origins"` // AllowOrigins is the list of allowed origins.
}

CorsConfig is the configuration for the CORS middleware.

type DatasourceConfig

type DatasourceConfig struct {
	Type     constants.DbType `config:"type"`
	Path     string           `config:"path"`
	Host     string           `config:"host"`
	Port     uint16           `config:"port"`
	User     string           `config:"user"`
	Password string           `config:"password"`
	Database string           `config:"database"`
	Schema   string           `config:"schema"`
}

type MinIOConfig

type MinIOConfig struct {
	// Endpoint is the MinIO server endpoint (e.g., "localhost:9000")
	Endpoint string `config:"endpoint"`
	// AccessKey is the access key for authentication
	AccessKey string `config:"access_key"`
	// SecretKey is the secret key for authentication
	SecretKey string `config:"secret_key"`
	// UseSSL determines whether to use HTTPS
	UseSSL bool `config:"use_ssl"`
	// Region is the region name (optional)
	Region string `config:"region"`
	// Bucket is the default bucket for all storage operations
	Bucket string `config:"bucket"`
}

MinIOConfig contains configuration for MinIO storage provider.

type RedisConfig

type RedisConfig struct {
	Host     string `config:"host"`     // Host is the Redis server host
	Port     uint16 `config:"port"`     // Port is the Redis server port
	User     string `config:"user"`     // User for Redis authentication (optional)
	Password string `config:"password"` // Password for Redis authentication (optional)
	Database uint8  `config:"database"` // Database is the Redis database number (0-15)
	Network  string `config:"network"`  // Network type: "tcp", "unix" (default: "tcp")
}

RedisConfig represents configuration for Redis-based cache and storage.

type SecurityConfig

type SecurityConfig struct {
	TokenExpires time.Duration `config:"token_expires"` // Token expiration time
}

SecurityConfig contains security-related configuration.

type StorageConfig

type StorageConfig struct {
	// Provider specifies which storage provider to use
	Provider constants.StorageType `config:"provider"`

	// MinIO contains MinIO-specific configuration
	MinIO MinIOConfig `config:"minio"`
}

StorageConfig represents the configuration for storage providers.

Jump to

Keyboard shortcuts

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