config

package
v0.8.3 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2025 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BackendTypeJSON   backendType = "json"
	BackendTypeBadger backendType = "badger"
)

Variables

This section is empty.

Functions

func Load

func Load(filename string)

Load loads the config from the given file

func LoadStorageBackends

func LoadStorageBackends(c storageConf) (
	subordinateStorage storage.SubordinateStorageBackend,
	trustMarkedEntitiesStorage storage.TrustMarkedEntitiesStorageBackend, err error,
)

LoadStorageBackends loads and returns the storage backends for the passed Config

Types

type Config

type Config struct {
	Server     lighthouse.ServerConf `yaml:"server"`
	Logging    loggingConf           `yaml:"logging"`
	Storage    storageConf           `yaml:"storage"`
	Caching    cachingConf           `yaml:"cache"`
	Signing    signingConf           `yaml:"signing"`
	Endpoints  Endpoints             `yaml:"endpoints"`
	Federation federationConf        `yaml:"federation_data"`
}

Config holds configuration for the entity

func Get

func Get() Config

Get returns the Config

func (*Config) Validate

func (c *Config) Validate() error

Validate checks all fields of Config that implement configValidator (pointer receivers)

type Endpoints

type Endpoints struct {
	FetchEndpoint                      fetchEndpointConf       `yaml:"fetch"`
	ListEndpoint                       lighthouse.EndpointConf `yaml:"list"`
	ResolveEndpoint                    resolveEndpointConf     `yaml:"resolve"`
	TrustMarkStatusEndpoint            lighthouse.EndpointConf `yaml:"trust_mark_status"`
	TrustMarkedEntitiesListingEndpoint lighthouse.EndpointConf `yaml:"trust_mark_list"`
	TrustMarkEndpoint                  trustMarkEndpointConf   `yaml:"trust_mark"`
	HistoricalKeysEndpoint             lighthouse.EndpointConf `yaml:"historical_keys"`

	EnrollmentEndpoint        checkedEndpointConf     `yaml:"enroll"`
	EnrollmentRequestEndpoint lighthouse.EndpointConf `yaml:"enroll_request"`
	TrustMarkRequestEndpoint  lighthouse.EndpointConf `yaml:"trust_mark_request"`
	EntityCollectionEndpoint  collectionEndpointConf  `yaml:"entity_collection"`
}

Endpoints holds configuration for the different possible endpoints

type LoggerConf

type LoggerConf struct {
	Dir    string `yaml:"dir"`
	StdErr bool   `yaml:"stderr"`
}

LoggerConf holds configuration related to logging

Jump to

Keyboard shortcuts

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