Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CORSConfig ¶
type CORSConfig struct {
AllowedOrigins []string `mapstructure:"allowed_origins"`
AllowedMethods []string `mapstructure:"allowed_methods"`
AllowedHeaders []string `mapstructure:"allowed_headers"`
MaxAge int `mapstructure:"max_age" default:"300"`
AllowCredentials bool `mapstructure:"allow_credentials" default:"false"`
}
func (*CORSConfig) Validate ¶
func (c *CORSConfig) Validate() error
type GRPCService ¶
type GRPCService interface {
GRPCAddr() string
}
type HTTPDefaults ¶
type HTTPService ¶
type HTTPService interface {
HTTPAddr() string
}
type RuntimeConfig ¶
type RuntimeConfig[T ServiceConfig] struct { Platform config Service T }
func Load ¶
func Load[T ServiceConfig](serviceName string) (*RuntimeConfig[T], error)
func (*RuntimeConfig[T]) GetDatabaseConfig ¶
func (r *RuntimeConfig[T]) GetDatabaseConfig() platformConfig.DatabaseConfig
func (*RuntimeConfig[T]) Validate ¶
func (r *RuntimeConfig[T]) Validate() error
type ServiceConfig ¶
type ServiceConfig interface {
Validate() error
}
ServiceConfig interface all service configs must implement
Click to show internal directories.
Click to hide internal directories.