config

package
v0.0.0-...-faaa4ac Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClickHouse

type ClickHouse struct {
	Host     string `yaml:"host"`
	Port     int    `yaml:"port"`
	Username string `yaml:"username"`
	Password string `yaml:"password"`
	Database string `yaml:"database"`
}

func (*ClickHouse) Options

func (c *ClickHouse) Options() *clickhouse.Options

type Config

type Config struct {
	Server     *Server     `yaml:"server"`
	Postgres   *Postgres   `yaml:"postgres"`
	Redis      *Redis      `yaml:"redis"`
	ClickHouse *ClickHouse `yaml:"clickhouse"`
	Jwt        *Jwt        `yaml:"jwt"`
	// contains filtered or unexported fields
}

func New

func New(filename string) *Config

type Grpc

type Grpc struct {
	Host         string `yaml:"host"`
	GrpcProtocol string `yaml:"grpc_protocol"`
	GrpcPort     int    `yaml:"grpc_port"`
}

type Http

type Http struct {
	Port int `yaml:"port"`
}

type Jwt

type Jwt struct {
	Secret string `yaml:"secret"`
}

type Postgres

type Postgres struct {
	Host     string `yaml:"host"`
	Port     int    `yaml:"port"`
	Username string `yaml:"username"`
	Password string `yaml:"password"`
	Database string `yaml:"database"`
}

func (*Postgres) GetDsn

func (p *Postgres) GetDsn() string

type Redis

type Redis struct {
	Host string `yaml:"host"`
}

func (*Redis) Options

func (r *Redis) Options() *redis.Options

type Server

type Server struct {
	Http *Http `yaml:"http"`
	Grpc *Grpc `yaml:"grpc"`
}

Jump to

Keyboard shortcuts

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