config

package
v0.0.0-...-ce3a2b7 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2022 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_config_conf_proto protoreflect.FileDescriptor

Functions

func Inject

func Inject(container *dig.Container)

Types

type BootConfig

type BootConfig struct {
	Environment string    `protobuf:"bytes,1,opt,name=environment,proto3" json:"environment,omitempty"` //建议配置成:dev、product、local
	Service     *Service  `protobuf:"bytes,2,opt,name=service,proto3" json:"service,omitempty"`
	Server      *Server   `protobuf:"bytes,3,opt,name=server,proto3" json:"server,omitempty"`
	Database    *Database `protobuf:"bytes,4,opt,name=database,proto3" json:"database,omitempty"`
	Redis       *Redis    `protobuf:"bytes,5,opt,name=redis,proto3" json:"redis,omitempty"`
	Etcd        *Etcd     `protobuf:"bytes,6,opt,name=etcd,proto3" json:"etcd,omitempty"`
	Trace       *Trace    `protobuf:"bytes,7,opt,name=trace,proto3" json:"trace,omitempty"`
	Logger      *Logger   `protobuf:"bytes,8,opt,name=logger,proto3" json:"logger,omitempty"`
	// contains filtered or unexported fields
}

func (*BootConfig) Descriptor deprecated

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

Deprecated: Use BootConfig.ProtoReflect.Descriptor instead.

func (*BootConfig) GetDatabase

func (x *BootConfig) GetDatabase() *Database

func (*BootConfig) GetEnvironment

func (x *BootConfig) GetEnvironment() string

func (*BootConfig) GetEtcd

func (x *BootConfig) GetEtcd() *Etcd

func (*BootConfig) GetLogger

func (x *BootConfig) GetLogger() *Logger

func (*BootConfig) GetRedis

func (x *BootConfig) GetRedis() *Redis

func (*BootConfig) GetServer

func (x *BootConfig) GetServer() *Server

func (*BootConfig) GetService

func (x *BootConfig) GetService() *Service

func (*BootConfig) GetTrace

func (x *BootConfig) GetTrace() *Trace

func (*BootConfig) ProtoMessage

func (*BootConfig) ProtoMessage()

func (*BootConfig) ProtoReflect

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

func (*BootConfig) Reset

func (x *BootConfig) Reset()

func (*BootConfig) String

func (x *BootConfig) String() string

type Database

type Database struct {
	Dsn string `protobuf:"bytes,1,opt,name=dsn,proto3" json:"dsn,omitempty"`
	// contains filtered or unexported fields
}

func (*Database) Descriptor deprecated

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

Deprecated: Use Database.ProtoReflect.Descriptor instead.

func (*Database) GetDsn

func (x *Database) GetDsn() string

func (*Database) ProtoMessage

func (*Database) ProtoMessage()

func (*Database) ProtoReflect

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

func (*Database) Reset

func (x *Database) Reset()

func (*Database) String

func (x *Database) String() string

type Etcd

type Etcd struct {
	Endpoints []string `protobuf:"bytes,1,rep,name=endpoints,proto3" json:"endpoints,omitempty"`
	// contains filtered or unexported fields
}

func (*Etcd) Descriptor deprecated

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

Deprecated: Use Etcd.ProtoReflect.Descriptor instead.

func (*Etcd) GetEndpoints

func (x *Etcd) GetEndpoints() []string

func (*Etcd) ProtoMessage

func (*Etcd) ProtoMessage()

func (*Etcd) ProtoReflect

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

func (*Etcd) Reset

func (x *Etcd) Reset()

func (*Etcd) String

func (x *Etcd) String() string

type Logger

type Logger struct {
	Platform string `protobuf:"bytes,1,opt,name=platform,proto3" json:"platform,omitempty"`
	Setting  string `protobuf:"bytes,2,opt,name=setting,proto3" json:"setting,omitempty"`
	// contains filtered or unexported fields
}

func (*Logger) Descriptor deprecated

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

Deprecated: Use Logger.ProtoReflect.Descriptor instead.

func (*Logger) GetPlatform

func (x *Logger) GetPlatform() string

func (*Logger) GetSetting

func (x *Logger) GetSetting() string

func (*Logger) ProtoMessage

func (*Logger) ProtoMessage()

func (*Logger) ProtoReflect

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

func (*Logger) Reset

func (x *Logger) Reset()

func (*Logger) String

func (x *Logger) String() string

type Redis

type Redis 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"`
	ReadTimeout  *durationpb.Duration `protobuf:"bytes,3,opt,name=read_timeout,json=readTimeout,proto3" json:"read_timeout,omitempty"`
	WriteTimeout *durationpb.Duration `protobuf:"bytes,4,opt,name=write_timeout,json=writeTimeout,proto3" json:"write_timeout,omitempty"`
	// contains filtered or unexported fields
}

func (*Redis) Descriptor deprecated

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

Deprecated: Use Redis.ProtoReflect.Descriptor instead.

func (*Redis) GetAddr

func (x *Redis) GetAddr() string

func (*Redis) GetNetwork

func (x *Redis) GetNetwork() string

func (*Redis) GetReadTimeout

func (x *Redis) GetReadTimeout() *durationpb.Duration

func (*Redis) GetWriteTimeout

func (x *Redis) GetWriteTimeout() *durationpb.Duration

func (*Redis) ProtoMessage

func (*Redis) ProtoMessage()

func (*Redis) ProtoReflect

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

func (*Redis) Reset

func (x *Redis) Reset()

func (*Redis) String

func (x *Redis) String() string

type Server

type Server struct {
	Http *Server_HTTP `protobuf:"bytes,1,opt,name=http,proto3" json:"http,omitempty"`
	Grpc *Server_GRPC `protobuf:"bytes,2,opt,name=grpc,proto3" json:"grpc,omitempty"`
	// contains filtered or unexported fields
}

func (*Server) Descriptor deprecated

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

Deprecated: Use Server.ProtoReflect.Descriptor instead.

func (*Server) GetGrpc

func (x *Server) GetGrpc() *Server_GRPC

func (*Server) GetHttp

func (x *Server) GetHttp() *Server_HTTP

func (*Server) ProtoMessage

func (*Server) ProtoMessage()

func (*Server) ProtoReflect

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

func (*Server) Reset

func (x *Server) Reset()

func (*Server) String

func (x *Server) String() string

type Server_GRPC

type Server_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 (*Server_GRPC) Descriptor deprecated

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

Deprecated: Use Server_GRPC.ProtoReflect.Descriptor instead.

func (*Server_GRPC) GetAddr

func (x *Server_GRPC) GetAddr() string

func (*Server_GRPC) GetNetwork

func (x *Server_GRPC) GetNetwork() string

func (*Server_GRPC) GetTimeout

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

func (*Server_GRPC) ProtoMessage

func (*Server_GRPC) ProtoMessage()

func (*Server_GRPC) ProtoReflect

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

func (*Server_GRPC) Reset

func (x *Server_GRPC) Reset()

func (*Server_GRPC) String

func (x *Server_GRPC) String() string

type Server_HTTP

type Server_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 (*Server_HTTP) Descriptor deprecated

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

Deprecated: Use Server_HTTP.ProtoReflect.Descriptor instead.

func (*Server_HTTP) GetAddr

func (x *Server_HTTP) GetAddr() string

func (*Server_HTTP) GetNetwork

func (x *Server_HTTP) GetNetwork() string

func (*Server_HTTP) GetTimeout

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

func (*Server_HTTP) ProtoMessage

func (*Server_HTTP) ProtoMessage()

func (*Server_HTTP) ProtoReflect

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

func (*Server_HTTP) Reset

func (x *Server_HTTP) Reset()

func (*Server_HTTP) String

func (x *Server_HTTP) String() string

type Service

type Service struct {
	Name    string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"`
	Id      string `protobuf:"bytes,3,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*Service) Descriptor deprecated

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

Deprecated: Use Service.ProtoReflect.Descriptor instead.

func (*Service) GetId

func (x *Service) GetId() string

func (*Service) GetName

func (x *Service) GetName() string

func (*Service) GetVersion

func (x *Service) GetVersion() string

func (*Service) ProtoMessage

func (*Service) ProtoMessage()

func (*Service) ProtoReflect

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

func (*Service) Reset

func (x *Service) Reset()

func (*Service) String

func (x *Service) String() string

type Trace

type Trace struct {
	Endpoint string `protobuf:"bytes,1,opt,name=endpoint,proto3" json:"endpoint,omitempty"`
	// contains filtered or unexported fields
}

func (*Trace) Descriptor deprecated

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

Deprecated: Use Trace.ProtoReflect.Descriptor instead.

func (*Trace) GetEndpoint

func (x *Trace) GetEndpoint() string

func (*Trace) ProtoMessage

func (*Trace) ProtoMessage()

func (*Trace) ProtoReflect

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

func (*Trace) Reset

func (x *Trace) Reset()

func (*Trace) String

func (x *Trace) String() string

Jump to

Keyboard shortcuts

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