config

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2019 License: Apache-2.0 Imports: 5 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// Microservice is a gateway.Microservice configuration for self-registration and service config.
	Microservice gateway.MicroserviceConfig `json:"microservice"`

	// Database holds the database configuration
	Database *commonconf.DBConfig `json:"database"`

	// GatewayURL is the URL of the gateway (proxy).
	GatewayURL string `json:"gatewayUrl"`

	// GatewayAdminURL is the administration URL of the API Gateway. Used for purposes of registration of a
	// microservice with the API gateway.
	GatewayAdminURL string `json:"gatewayAdminUrl"`

	// SystemKey holds the path to the system key which is private RSA key
	SystemKey string `json:"systemKey"`

	// ServiceKey holds the path to the service key
	ServiceKey string `json:"serviceKey"`

	// ServiceCert holds the path to the service cert
	ServiceCert string `json:"serviceCert"`

	// Services is a map of <service-name>:<service base URL>. For example,
	// "user-microservice": "http://kong.gateway:8001/user"
	Services map[string]string `json:"services"`

	// Client is a map of <client-name>:<url>
	// "redirect-from-login": "http://client-root-url"
	Client map[string]string `json:"client"`
}

Config holds the microservice full configuration.

func LoadConfig

func LoadConfig(confFile string) (*Config, error)

LoadConfig loads a Config from a configuration JSON file.

Jump to

Keyboard shortcuts

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