config

package
v0.0.0-...-fb5fdcc Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_internal_config_config_proto protoreflect.FileDescriptor

Functions

func GetApp

func GetApp(c *Config) *app.Config

func GetDb

func GetDb(c *Config) *db.Config

func GetFileSystem

func GetFileSystem(c *Config) *filesystem.Config

func GetLogger

func GetLogger(c *Config) *log.Config

func GetRedis

func GetRedis(c *Config) *redis.Config

func NewKratos

func NewKratos(config string) (kconfig.Config, error)

Types

type Config

type Config struct {
	App        *app.Config        `protobuf:"bytes,1,opt,name=app,proto3" json:"app,omitempty"`
	Filesystem *filesystem.Config `protobuf:"bytes,2,opt,name=filesystem,proto3" json:"filesystem,omitempty"`
	Http       *Http              `protobuf:"bytes,10,opt,name=http,proto3" json:"http,omitempty"`
	Grpc       *Grpc              `protobuf:"bytes,11,opt,name=grpc,proto3" json:"grpc,omitempty"`
	Cron       *Cron              `protobuf:"bytes,12,opt,name=cron,proto3" json:"cron,omitempty"`
	Logger     *log.Config        `protobuf:"bytes,13,opt,name=logger,proto3" json:"logger,omitempty"`
	Redis      *redis.Config      `protobuf:"bytes,14,opt,name=redis,proto3" json:"redis,omitempty"`
	Db         *database.Config   `protobuf:"bytes,15,opt,name=db,proto3" json:"db,omitempty"`
	// contains filtered or unexported fields
}

func New

func New(c kconfig.Config) (*Config, error)

func NewByString

func NewByString(s string) (*Config, error)

func (*Config) Descriptor deprecated

func (*Config) Descriptor() ([]byte, []int)

Deprecated: Use Config.ProtoReflect.Descriptor instead.

func (*Config) GetApp

func (x *Config) GetApp() *app.Config

func (*Config) GetCron

func (x *Config) GetCron() *Cron

func (*Config) GetDb

func (x *Config) GetDb() *database.Config

func (*Config) GetFilesystem

func (x *Config) GetFilesystem() *filesystem.Config

func (*Config) GetGrpc

func (x *Config) GetGrpc() *Grpc

func (*Config) GetHttp

func (x *Config) GetHttp() *Http

func (*Config) GetLogger

func (x *Config) GetLogger() *log.Config

func (*Config) GetRedis

func (x *Config) GetRedis() *redis.Config

func (*Config) ProtoMessage

func (*Config) ProtoMessage()

func (*Config) ProtoReflect

func (x *Config) ProtoReflect() protoreflect.Message

func (*Config) Reset

func (x *Config) Reset()

func (*Config) String

func (x *Config) String() string

type Cron

type Cron struct {
	// contains filtered or unexported fields
}

func GetCron

func GetCron(c *Config) *Cron

func (*Cron) Descriptor deprecated

func (*Cron) Descriptor() ([]byte, []int)

Deprecated: Use Cron.ProtoReflect.Descriptor instead.

func (*Cron) ProtoMessage

func (*Cron) ProtoMessage()

func (*Cron) ProtoReflect

func (x *Cron) ProtoReflect() protoreflect.Message

func (*Cron) Reset

func (x *Cron) Reset()

func (*Cron) String

func (x *Cron) String() string

type Grpc

type Grpc struct {
	Network string               `protobuf:"bytes,1,opt,name=network,proto3" json:"network,omitempty"`
	Addr    string               `protobuf:"bytes,2,opt,name=addr,proto3" json:"addr,omitempty"`
	Timeout *durationpb.Duration `protobuf:"bytes,3,opt,name=timeout,proto3" json:"timeout,omitempty"`
	// contains filtered or unexported fields
}

func GetGrpc

func GetGrpc(c *Config) *Grpc

func (*Grpc) Descriptor deprecated

func (*Grpc) Descriptor() ([]byte, []int)

Deprecated: Use Grpc.ProtoReflect.Descriptor instead.

func (*Grpc) GetAddr

func (x *Grpc) GetAddr() string

func (*Grpc) GetNetwork

func (x *Grpc) GetNetwork() string

func (*Grpc) GetTimeout

func (x *Grpc) GetTimeout() *durationpb.Duration

func (*Grpc) ProtoMessage

func (*Grpc) ProtoMessage()

func (*Grpc) ProtoReflect

func (x *Grpc) ProtoReflect() protoreflect.Message

func (*Grpc) Reset

func (x *Grpc) Reset()

func (*Grpc) String

func (x *Grpc) String() string

type Http

type Http struct {
	Network string               `protobuf:"bytes,1,opt,name=network,proto3" json:"network,omitempty"`
	Addr    string               `protobuf:"bytes,2,opt,name=addr,proto3" json:"addr,omitempty"`
	Timeout *durationpb.Duration `protobuf:"bytes,3,opt,name=timeout,proto3" json:"timeout,omitempty"`
	// contains filtered or unexported fields
}

func GetHttp

func GetHttp(c *Config) *Http

func (*Http) Descriptor deprecated

func (*Http) Descriptor() ([]byte, []int)

Deprecated: Use Http.ProtoReflect.Descriptor instead.

func (*Http) GetAddr

func (x *Http) GetAddr() string

func (*Http) GetNetwork

func (x *Http) GetNetwork() string

func (*Http) GetTimeout

func (x *Http) GetTimeout() *durationpb.Duration

func (*Http) ProtoMessage

func (*Http) ProtoMessage()

func (*Http) ProtoReflect

func (x *Http) ProtoReflect() protoreflect.Message

func (*Http) Reset

func (x *Http) Reset()

func (*Http) String

func (x *Http) String() string

Jump to

Keyboard shortcuts

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