configs

package
v0.0.0-...-a136232 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const CTXKEY ctxkey = "ackstream.configs"

Variables

This section is empty.

Functions

func NewProvider

func NewProvider(dirs ...string) (*viper.Viper, error)

func WithContext

func WithContext(ctx context.Context, cfg *Configs) context.Context

Types

type Configs

type Configs struct {
	Debug          bool
	Version        string `json:"version" mapstructure:"ACKSTREAM_VERSION"`
	BucketTemplate string `json:"bucket_template" mapstructure:"ACKSTREAM_BUCKET_TEMPLATE"`

	XStream  *xstream.Configs  `json:"xstream"`
	XStorage *xstorage.Configs `json:"xstorage"`
	XRPC     *xrpc.Configs     `json:"xrpc"`
}

func FromContext

func FromContext(ctx context.Context) *Configs

func New

func New(provider *viper.Viper, sets []string) (*Configs, error)

Jump to

Keyboard shortcuts

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