config

package
v5.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2023 License: CC0-1.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	URL                string `yaml:"url"`
	MaxOpenConnections int    `yaml:"max_open_connections"`
	MaxIdleConnections int    `yaml:"max_idle_connections"`
	PartitionSize      int64  `yaml:"partition_size"`
	PartitionBatchSize int64  `yaml:"partition_batch"`
	SSLModeEnable      string `yaml:"ssl_mode_enable"`
	SSLRootCert        string `yaml:"ssl_root_cert"`
	SSLCert            string `yaml:"ssl_cert"`
	SSLKey             string `yaml:"ssl_key"`
}

func DefaultDatabaseConfig

func DefaultDatabaseConfig() Config

DefaultDatabaseConfig returns the default instance of Config

func NewDatabaseConfig

func NewDatabaseConfig(
	url, sslModeEnable, sslRootCert, sslCert, sslKey string,
	maxOpenConnections int, maxIdleConnections int,
	partitionSize int64, batchSize int64,
) Config

func (*Config) GetHost

func (c *Config) GetHost() string

func (*Config) GetPassword

func (c *Config) GetPassword() string

func (*Config) GetPort

func (c *Config) GetPort() string

func (*Config) GetSSLMode

func (c *Config) GetSSLMode() string

func (*Config) GetSchema

func (c *Config) GetSchema() string

func (*Config) GetUser

func (c *Config) GetUser() string

Jump to

Keyboard shortcuts

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