cfg

package
v0.0.0-...-6bcd878 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2023 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 Config

type Config struct {
	Env string
	Log struct {
		Level string
	}

	bootstrap.GrpcServerRunnerConfig `mapstructure:",squash" yaml:",inline"`

	MainDB storage.DBConfig `mapstructure:"main_db" yaml:"main_db"`

	JWT struct {
		Secret             string
		AuthTokenExpire    int64 `mapstructure:"auth_token_expire" yaml:"auth_token_expire"`
		RefreshTokenExpire int64 `mapstructure:"refresh_token_expire" yaml:"refresh_token_expire"`
	}

	HttpServer struct {
		Port int
	}

	Img2Vec struct {
		Addr string
	}

	Milvus struct {
		Addr           string
		VectorDim      int
		MetricType     entity.MetricType
		NProbe         int
		CollectionName string
	}

	ObjectDetector struct {
		Addr string
	}

	Redis struct {
		Addr string
	}

	S3 struct {
		Endpoint  string
		AccessKey string `mapstructure:"access_key" yaml:"access_key"`
		SecretKey string `mapstructure:"secret_key" yaml:"secret_key"`
		UseSSL    bool   `mapstructure:"use_ssl" yaml:"use_ssl"`
	}
}

func ParseConfig

func ParseConfig(path string) Config

ParseConfig parses config file specified by path into config struct and validates it.

func ParseDevConfig

func ParseDevConfig() Config

func (*Config) Validate

func (c *Config) Validate() error

Jump to

Keyboard shortcuts

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