config

package
v0.0.0-...-f9144f1 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthConfig

type AuthConfig struct {
	PluginPath    string      `yaml:"plugin_path"`
	Configuration interface{} `yaml:"configuration"`
}

func (*AuthConfig) ConfigurationString

func (c *AuthConfig) ConfigurationString() (string, error)

type ClientConnectionConfig

type ClientConnectionConfig struct {
	Insecure               bool     `yaml:"insecure"`
	Discovery              bool     `yaml:"discovery" default:"true"`
	DialTimeoutSeconds     uint32   `yaml:"dial_timeout_seconds" default:"5"`
	OAuth2KeyFile          string   `yaml:"oauth2_key_file"`
	AllowedEndpointDomains []string `yaml:"allowed_endpoint_domains"`
	AllowInsecureEndpoint  bool     `yaml:"allow_insecure_endpoint"`
}

type Config

type Config struct {
	DBConnection        YDBConnectionConfig    `yaml:"db_connection"`
	ClientConnection    ClientConnectionConfig `yaml:"client_connection"`
	S3                  S3Config               `yaml:"s3"`
	OperationTtlSeconds int64                  `yaml:"operation_ttl_seconds"`
	Auth                AuthConfig             `yaml:"auth"`
	GRPCServer          GRPCServerConfig       `yaml:"grpc_server"`
	MetricsServer       MetricsServerConfig    `yaml:"metrics_server"`
}

func InitConfig

func InitConfig(ctx context.Context, confPath string) (Config, error)

func (Config) ToString

func (config Config) ToString() (string, error)

func (*Config) Validate

func (c *Config) Validate() error

type GRPCServerConfig

type GRPCServerConfig struct {
	BindAddress        string `yaml:"bind_address"`
	BindPort           uint16 `yaml:"bind_port" default:"2135"`
	TLSCertificatePath string `yaml:"tls_certificate_path"`
	TLSKeyPath         string `yaml:"tls_key_path"`
}

type MetricsServerConfig

type MetricsServerConfig struct {
	BindAddress        string `yaml:"bind_address"`
	BindPort           uint16 `yaml:"bind_port" default:"8080"`
	TLSCertificatePath string `yaml:"tls_certificate_path"`
	TLSKeyPath         string `yaml:"tls_key_path"`
}

type S3Config

type S3Config struct {
	Endpoint            string `yaml:"endpoint"`
	Region              string `yaml:"region"`
	Bucket              string `yaml:"bucket"`
	PathPrefix          string `yaml:"path_prefix"`
	AccessKeyIDPath     string `yaml:"access_key_id_path"`
	SecretAccessKeyPath string `yaml:"secret_access_key_path"`
	S3ForcePathStyle    bool   `yaml:"s3_force_path_style"`
	IsMock              bool
}

func (*S3Config) AccessKey

func (c *S3Config) AccessKey() (string, error)

func (*S3Config) SecretKey

func (c *S3Config) SecretKey() (string, error)

type YDBConnectionConfig

type YDBConnectionConfig struct {
	ConnectionString   string `yaml:"connection_string"`
	Insecure           bool   `yaml:"insecure"`
	Discovery          bool   `yaml:"discovery" default:"true"`
	DialTimeoutSeconds uint32 `yaml:"dial_timeout_seconds" default:"5"`
	OAuth2KeyFile      string `yaml:"oauth2_key_file"`
}

Jump to

Keyboard shortcuts

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