cmd

package
v0.0.0-...-25571b7 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Start

func Start(config Config) error

Types

type Config

type Config struct {
	// Nuts holds the configuration for communicating with the Nuts API.
	Nuts nuts.Config `koanf:"nuts"`
	// Public holds the configuration for the public interface.
	Public InterfaceConfig `koanf:"public"`
	// CarePlanContributor holds the configuration for the CarePlanContributor.
	CarePlanContributor careplancontributor.Config `koanf:"careplancontributor"`
	// CarePlanService holds the configuration for the CarePlanService.
	CarePlanService careplanservice.Config `koanf:"careplanservice"`
	LogLevel        zerolog.Level          `koanf:"loglevel"`
}

func DefaultConfig

func DefaultConfig() Config

DefaultConfig returns sensible, but not complete, default configuration values.

func LoadConfig

func LoadConfig() (*Config, error)

LoadConfig loads the configuration from the environment.

func (Config) Validate

func (c Config) Validate() error

type InterfaceConfig

type InterfaceConfig struct {
	// Address holds the address to listen on.
	Address string `koanf:"address"`
	// URL holds the base URL of the interface.
	// Set it in case the service is behind a reverse proxy that maps it to a different URL than root (/).
	URL string `koanf:"url"`
}

InterfaceConfig holds the configuration for an HTTP interface.

func (InterfaceConfig) ParseURL

func (i InterfaceConfig) ParseURL() *url.URL

type Service

type Service interface {
	RegisterHandlers(mux *http.ServeMux)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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