Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // DevMode specifies whether the service is running in development mode. DevMode bool `mapstructure:"dev_mode" json:"dev_mode"` // DB represents the configuration settings for the database. DB db.Config `mapstructure:"db" json:"db"` // Server represents the configuration settings for the server. Server server.Config `mapstructure:"server" json:"server"` // Logger represents the configuration settings for the logger. Logger logger.Config `mapstructure:"logger" json:"logger"` // Mode specifies which services to run. // By default, it runs all services. Mode []string `mapstructure:"mode" json:"mode" default:"[\"all\"]"` // SDKConfig represents the configuration settings for the SDK. SDKConfig SDKConfig `mapstructure:"sdk_config" json:"sdk_config"` // Services represents the configuration settings for the services. Services map[string]serviceregistry.ServiceConfig `mapstructure:"services"` // Trace is for configuring open telemetry based tracing. Trace tracing.Config `mapstructure:"trace"` }
Config represents the configuration settings for the service.
func LoadConfig ¶
LoadConfig Load config with viper.
type Connection ¶ added in v0.4.30
type Connection struct { // Endpoint is the URL of the platform or service. Endpoint string `mapstructure:"endpoint" json:"endpoint"` // Plaintext specifies whether the SDK should use plaintext communication. Plaintext bool `mapstructure:"plaintext" json:"plaintext" default:"false" validate:"boolean"` // Insecure specifies whether the SDK should use insecure TLS communication. Insecure bool `mapstructure:"insecure" json:"insecure" default:"false" validate:"boolean"` }
type SDKConfig ¶ added in v0.4.18
type SDKConfig struct { // Connection to the Core Platform CorePlatformConnection Connection `mapstructure:"core" json:"core"` // Connection to an ERS if not in the core platform EntityResolutionConnection Connection `mapstructure:"entityresolution" json:"entityresolution"` // ClientID is the client ID used for client credentials grant. // It is required together with ClientSecret. ClientID string `mapstructure:"client_id" json:"client_id" validate:"required_with=ClientSecret"` // ClientSecret is the client secret used for client credentials grant. // It is required together with ClientID. ClientSecret string `mapstructure:"client_secret" json:"client_secret" validate:"required_with=ClientID"` }
SDKConfig represents the configuration for the SDK.
Click to show internal directories.
Click to hide internal directories.