uploadscfg

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2026 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Overview

Package uploadscfg carries the uploads configuration and hands its object storage half to a do injector.

It selects nothing. The backend choice — S3, GCS, R2, Backblaze B2, the filesystem, memory — lives in objectstorage.Config, which this package wraps and validates rather than restates. What it adds is the envelope the environment is parsed into and RegisterStorageConfig, which extracts the inner config so consumers depend on that rather than on this one.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterStorageConfig

func RegisterStorageConfig(i do.Injector)

RegisterStorageConfig registers an *objectstorage.Config with the injector, extracted from the parent *Config. Prerequisite: *Config must be registered in the injector before calling this.

Types

type Config

type Config struct {
	Storage objectstorage.Config `envPrefix:"STORAGE_" json:"storageConfig,omitzero" yaml:"storageConfig,omitempty"`
	Debug   bool                 `env:"DEBUG"          json:"debug,omitempty"        yaml:"debug,omitempty"`
	// contains filtered or unexported fields
}

Config contains settings for the uploads object storage.

func (*Config) ValidateWithContext

func (cfg *Config) ValidateWithContext(ctx context.Context) error

ValidateWithContext validates a Config struct.

Jump to

Keyboard shortcuts

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