config

package module
v0.0.0-...-f4a07fe Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2024 License: MIT Imports: 3 Imported by: 1

README

config

Dépendance(s) extérieure(s) directe(s)


Copyright (c) 2024 Archivage Numérique

Documentation

Index

Constants

View Source
const (
	ErrKeyNotFound = datamap.ErrKeyNotFound
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	*datamap.DM
	// contains filtered or unexported fields
}

func New

func New(opts ...Option) *Config

func (*Config) Load

func (c *Config) Load() error

func (*Config) LoadEnv

func (c *Config) LoadEnv() error

func (*Config) LoadFiles

func (c *Config) LoadFiles() error

func (*Config) Receiver

func (c *Config) Receiver() any

func (*Config) RunLoaders

func (c *Config) RunLoaders() error

type Loader

type Loader func() (map[string]any, error)

type Option

type Option func(*Config)

func WithFile

func WithFile(name string) Option

func WithLoaders

func WithLoaders(loaders []Loader) Option

func WithPrefix

func WithPrefix(prefix string) Option

func WithReceiver

func WithReceiver(receiver any) Option

Jump to

Keyboard shortcuts

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