config

package
v0.0.0-...-e8fae58 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package config load settings from external files or environment variables and manage their values.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrInvalidRegion is an error that occurs when the region is invalid.
	ErrInvalidRegion = errors.New("invalid region")
	// ErrInvalidBucket is an error that occurs when the bucket is invalid.
	ErrInvalidBucket = errors.New("invalid bucket")
)

Functions

This section is empty.

Types

type S3

type S3 struct {
	// Bucket is the name of the S3 bucket. The default value is "emigre".
	Bucket model.Bucket `env:"EMIGRE_S3_BUCKET" envDefault:"emigre"`
	// Region is the name of the AWS region. The default value is "ap-northeast-1".
	Region model.Region `env:"EMIGRE_S3_REGION" envDefault:"ap-northeast-1"`
}

S3 is a struct that contains the settings for the S3 storage.

func NewS3

func NewS3() (*S3, error)

NewS3 returns a new S3 struct.

Jump to

Keyboard shortcuts

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