conf

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2023 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Conf

type Conf interface {
	Load() (*Settings, error)
}

type Cron

type Cron struct {
	MaxTimes     int `yaml:"maxTimes"`
	TimeInterval int `yaml:"timeInterval"`
}

type DB

type DB struct {
	Driver  string           `yaml:"driver"`
	Mysql   gormx.Settings   `yaml:"mysql"`
	Mongodb mongodb.Settings `yaml:"mongodb"`
}

DB Config

func (*DB) Init

func (db *DB) Init()

type Mode

type Mode string
const (
	File Mode = "file"
	Etcd Mode = "etcd"
	Env  Mode = "env"
)

type Notify

type Notify struct {
	Lark     lark.NotifyConfig     `yaml:"lark"`
	Tg       telegram.NotifyConfig `yaml:"tg"`
	Dingtalk dingtalk.NotifyConfig `yaml:"dingtalk"`
}

Notify Config

func (*Notify) Senders

func (n *Notify) Senders() (sender []notify.Sender)

type RegistrySettings

type RegistrySettings struct {
	Etcd   etcdx.Conf   `yaml:"etcd"`
	Consul consulx.Conf `yaml:"consul"`
}

type Server

type Server struct {
	Http httpsrv.Http `yaml:"http"`
	Grpc grpcsrv.Grpc `yaml:"grpc"`
}

type Settings

type Settings struct {
	Server              `yaml:"server"`
	DB                  DB               `yaml:"db"`
	Timeout             int64            `yaml:"timeout"`
	AutomaticExecution2 bool             `yaml:"automaticExecution2"`
	Tracing             Tracing          `yaml:"tracing"`
	Registry            RegistrySettings `yaml:"registry"`
	Cron                Cron             `yaml:"cron"`
	Notify              Notify           `yaml:"notify"`
}

func (*Settings) GetRegistry

func (s *Settings) GetRegistry() (registry.Registry, error)

func (*Settings) Init

func (s *Settings) Init()

func (*Settings) SetRegistry

func (s *Settings) SetRegistry() bool

type Tracing

type Tracing struct {
	JaegerUri string `yaml:"jaegerUrl"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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