Documentation ¶
Index ¶
- Variables
- type Level
- type Log
- func (*Log) Descriptor() ([]byte, []int)deprecated
- func (x *Log) GetEnableConsole() bool
- func (x *Log) GetLevel() Level
- func (x *Log) GetLogPath() string
- func (*Log) ProtoMessage()
- func (x *Log) ProtoReflect() protoreflect.Message
- func (x *Log) Reset()
- func (x *Log) String() string
- func (m *Log) Validate() error
- func (m *Log) ValidateAll() error
- type LogMultiError
- type LogValidationError
- type MQ
- func (*MQ) Descriptor() ([]byte, []int)deprecated
- func (x *MQ) GetAddr() []string
- func (x *MQ) GetMaxRetry() int32
- func (*MQ) ProtoMessage()
- func (x *MQ) ProtoReflect() protoreflect.Message
- func (x *MQ) Reset()
- func (x *MQ) String() string
- func (m *MQ) Validate() error
- func (m *MQ) ValidateAll() error
- type MQMultiError
- type MQValidationError
- type MySQL
- func (*MySQL) Descriptor() ([]byte, []int)deprecated
- func (x *MySQL) GetAddr() string
- func (x *MySQL) GetDb() string
- func (x *MySQL) GetIdleTimeout() *durationpb.Duration
- func (x *MySQL) GetMaxIdleConns() int32
- func (x *MySQL) GetMaxOpenConns() int32
- func (x *MySQL) GetOpenTimeout() *durationpb.Duration
- func (x *MySQL) GetPassword() string
- func (x *MySQL) GetUser() string
- func (*MySQL) ProtoMessage()
- func (x *MySQL) ProtoReflect() protoreflect.Message
- func (x *MySQL) Reset()
- func (x *MySQL) String() string
- func (m *MySQL) Validate() error
- func (m *MySQL) ValidateAll() error
- type MySQLMultiError
- type MySQLValidationError
- type Redis
- func (*Redis) Descriptor() ([]byte, []int)deprecated
- func (x *Redis) GetAddr() string
- func (x *Redis) GetDialTimeout() *durationpb.Duration
- func (x *Redis) GetIdleTimeout() *durationpb.Duration
- func (x *Redis) GetMaxConns() int32
- func (x *Redis) GetMinIdleConns() int32
- func (x *Redis) GetPassword() string
- func (*Redis) ProtoMessage()
- func (x *Redis) ProtoReflect() protoreflect.Message
- func (x *Redis) Reset()
- func (x *Redis) String() string
- func (m *Redis) Validate() error
- func (m *Redis) ValidateAll() error
- type RedisMultiError
- type RedisValidationError
- type Server
- func (*Server) Descriptor() ([]byte, []int)deprecated
- func (x *Server) GetPort() int32
- func (x *Server) GetScheme() string
- func (x *Server) GetTimeout() *durationpb.Duration
- func (*Server) ProtoMessage()
- func (x *Server) ProtoReflect() protoreflect.Message
- func (x *Server) Reset()
- func (x *Server) String() string
- func (m *Server) Validate() error
- func (m *Server) ValidateAll() error
- type ServerMultiError
- type ServerValidationError
- type Service
- func (*Service) Descriptor() ([]byte, []int)deprecated
- func (x *Service) GetGatewayService() string
- func (x *Service) GetGrpc() *Server
- func (x *Service) GetHttp() *Server
- func (x *Service) GetLog() *Log
- func (x *Service) GetMetadata() map[string]string
- func (x *Service) GetMq() *MQ
- func (x *Service) GetMsgService() string
- func (x *Service) GetMsgWorker() string
- func (x *Service) GetMysql() *MySQL
- func (x *Service) GetName() string
- func (x *Service) GetPushService() string
- func (x *Service) GetRedis() *Redis
- func (x *Service) GetStoreWorker() string
- func (x *Service) GetUserService() string
- func (x *Service) GetVersion() string
- func (*Service) ProtoMessage()
- func (x *Service) ProtoReflect() protoreflect.Message
- func (x *Service) Reset()
- func (x *Service) String() string
- func (m *Service) Validate() error
- func (m *Service) ValidateAll() error
- type ServiceMultiError
- type ServiceValidationError
Constants ¶
This section is empty.
Variables ¶
var ( Level_name = map[int32]string{ 0: "DEBUG", 1: "INFO", 2: "WARNING", 3: "ERROR", 4: "FATAL", } Level_value = map[string]int32{ "DEBUG": 0, "INFO": 1, "WARNING": 2, "ERROR": 3, "FATAL": 4, } )
Enum value maps for Level.
var File_config_v1_config_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type Level ¶
type Level int32
func (Level) Descriptor ¶
func (Level) Descriptor() protoreflect.EnumDescriptor
func (Level) EnumDescriptor
deprecated
func (Level) Number ¶
func (x Level) Number() protoreflect.EnumNumber
func (Level) Type ¶
func (Level) Type() protoreflect.EnumType
type Log ¶
type Log struct { LogPath *string `protobuf:"bytes,1,opt,name=log_path,json=logPath,proto3,oneof" json:"log_path,omitempty"` Level Level `protobuf:"varint,2,opt,name=level,proto3,enum=api.config.v1.Level" json:"level,omitempty"` EnableConsole bool `protobuf:"varint,3,opt,name=enable_console,json=enableConsole,proto3" json:"enable_console,omitempty"` // contains filtered or unexported fields }
func (*Log) Descriptor
deprecated
func (*Log) GetEnableConsole ¶
func (*Log) GetLogPath ¶
func (*Log) ProtoMessage ¶
func (*Log) ProtoMessage()
func (*Log) ProtoReflect ¶
func (x *Log) ProtoReflect() protoreflect.Message
func (*Log) Validate ¶
Validate checks the field values on Log with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*Log) ValidateAll ¶
ValidateAll checks the field values on Log with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in LogMultiError, or nil if none found.
type LogMultiError ¶
type LogMultiError []error
LogMultiError is an error wrapping multiple validation errors returned by Log.ValidateAll() if the designated constraints aren't met.
func (LogMultiError) AllErrors ¶
func (m LogMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (LogMultiError) Error ¶
func (m LogMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type LogValidationError ¶
type LogValidationError struct {
// contains filtered or unexported fields
}
LogValidationError is the validation error returned by Log.Validate if the designated constraints aren't met.
func (LogValidationError) Cause ¶
func (e LogValidationError) Cause() error
Cause function returns cause value.
func (LogValidationError) Error ¶
func (e LogValidationError) Error() string
Error satisfies the builtin error interface
func (LogValidationError) ErrorName ¶
func (e LogValidationError) ErrorName() string
ErrorName returns error name.
func (LogValidationError) Field ¶
func (e LogValidationError) Field() string
Field function returns field value.
func (LogValidationError) Key ¶
func (e LogValidationError) Key() bool
Key function returns key value.
func (LogValidationError) Reason ¶
func (e LogValidationError) Reason() string
Reason function returns reason value.
type MQ ¶
type MQ struct { Addr []string `protobuf:"bytes,1,rep,name=addr,proto3" json:"addr,omitempty"` MaxRetry int32 `protobuf:"varint,2,opt,name=max_retry,json=maxRetry,proto3" json:"max_retry,omitempty"` // contains filtered or unexported fields }
func (*MQ) Descriptor
deprecated
func (*MQ) GetMaxRetry ¶
func (*MQ) ProtoMessage ¶
func (*MQ) ProtoMessage()
func (*MQ) ProtoReflect ¶
func (x *MQ) ProtoReflect() protoreflect.Message
func (*MQ) Validate ¶
Validate checks the field values on MQ with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*MQ) ValidateAll ¶
ValidateAll checks the field values on MQ with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in MQMultiError, or nil if none found.
type MQMultiError ¶
type MQMultiError []error
MQMultiError is an error wrapping multiple validation errors returned by MQ.ValidateAll() if the designated constraints aren't met.
func (MQMultiError) AllErrors ¶
func (m MQMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (MQMultiError) Error ¶
func (m MQMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type MQValidationError ¶
type MQValidationError struct {
// contains filtered or unexported fields
}
MQValidationError is the validation error returned by MQ.Validate if the designated constraints aren't met.
func (MQValidationError) Cause ¶
func (e MQValidationError) Cause() error
Cause function returns cause value.
func (MQValidationError) Error ¶
func (e MQValidationError) Error() string
Error satisfies the builtin error interface
func (MQValidationError) ErrorName ¶
func (e MQValidationError) ErrorName() string
ErrorName returns error name.
func (MQValidationError) Field ¶
func (e MQValidationError) Field() string
Field function returns field value.
func (MQValidationError) Key ¶
func (e MQValidationError) Key() bool
Key function returns key value.
func (MQValidationError) Reason ¶
func (e MQValidationError) Reason() string
Reason function returns reason value.
type MySQL ¶
type MySQL struct { Addr string `protobuf:"bytes,1,opt,name=addr,proto3" json:"addr,omitempty"` User string `protobuf:"bytes,2,opt,name=user,proto3" json:"user,omitempty"` Password string `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"` Db string `protobuf:"bytes,4,opt,name=db,proto3" json:"db,omitempty"` MaxIdleConns int32 `protobuf:"varint,5,opt,name=max_idle_conns,json=maxIdleConns,proto3" json:"max_idle_conns,omitempty"` MaxOpenConns int32 `protobuf:"varint,6,opt,name=max_open_conns,json=maxOpenConns,proto3" json:"max_open_conns,omitempty"` // range: [10ms,10s] IdleTimeout *durationpb.Duration `protobuf:"bytes,7,opt,name=idle_timeout,json=idleTimeout,proto3" json:"idle_timeout,omitempty"` // range: [10ms,10s] OpenTimeout *durationpb.Duration `protobuf:"bytes,8,opt,name=open_timeout,json=openTimeout,proto3" json:"open_timeout,omitempty"` // contains filtered or unexported fields }
func (*MySQL) Descriptor
deprecated
func (*MySQL) GetIdleTimeout ¶
func (x *MySQL) GetIdleTimeout() *durationpb.Duration
func (*MySQL) GetMaxIdleConns ¶
func (*MySQL) GetMaxOpenConns ¶
func (*MySQL) GetOpenTimeout ¶
func (x *MySQL) GetOpenTimeout() *durationpb.Duration
func (*MySQL) GetPassword ¶
func (*MySQL) ProtoMessage ¶
func (*MySQL) ProtoMessage()
func (*MySQL) ProtoReflect ¶
func (x *MySQL) ProtoReflect() protoreflect.Message
func (*MySQL) Validate ¶
Validate checks the field values on MySQL with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*MySQL) ValidateAll ¶
ValidateAll checks the field values on MySQL with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in MySQLMultiError, or nil if none found.
type MySQLMultiError ¶
type MySQLMultiError []error
MySQLMultiError is an error wrapping multiple validation errors returned by MySQL.ValidateAll() if the designated constraints aren't met.
func (MySQLMultiError) AllErrors ¶
func (m MySQLMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (MySQLMultiError) Error ¶
func (m MySQLMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type MySQLValidationError ¶
type MySQLValidationError struct {
// contains filtered or unexported fields
}
MySQLValidationError is the validation error returned by MySQL.Validate if the designated constraints aren't met.
func (MySQLValidationError) Cause ¶
func (e MySQLValidationError) Cause() error
Cause function returns cause value.
func (MySQLValidationError) Error ¶
func (e MySQLValidationError) Error() string
Error satisfies the builtin error interface
func (MySQLValidationError) ErrorName ¶
func (e MySQLValidationError) ErrorName() string
ErrorName returns error name.
func (MySQLValidationError) Field ¶
func (e MySQLValidationError) Field() string
Field function returns field value.
func (MySQLValidationError) Key ¶
func (e MySQLValidationError) Key() bool
Key function returns key value.
func (MySQLValidationError) Reason ¶
func (e MySQLValidationError) Reason() string
Reason function returns reason value.
type Redis ¶
type Redis struct { Addr string `protobuf:"bytes,1,opt,name=addr,proto3" json:"addr,omitempty"` Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` MaxConns int32 `protobuf:"varint,3,opt,name=max_conns,json=maxConns,proto3" json:"max_conns,omitempty"` MinIdleConns int32 `protobuf:"varint,4,opt,name=min_idle_conns,json=minIdleConns,proto3" json:"min_idle_conns,omitempty"` // range: [10ms,10s] DialTimeout *durationpb.Duration `protobuf:"bytes,5,opt,name=dial_timeout,json=dialTimeout,proto3" json:"dial_timeout,omitempty"` // range: [10ms,10s] IdleTimeout *durationpb.Duration `protobuf:"bytes,6,opt,name=idle_timeout,json=idleTimeout,proto3" json:"idle_timeout,omitempty"` // contains filtered or unexported fields }
func (*Redis) Descriptor
deprecated
func (*Redis) GetDialTimeout ¶
func (x *Redis) GetDialTimeout() *durationpb.Duration
func (*Redis) GetIdleTimeout ¶
func (x *Redis) GetIdleTimeout() *durationpb.Duration
func (*Redis) GetMaxConns ¶
func (*Redis) GetMinIdleConns ¶
func (*Redis) GetPassword ¶
func (*Redis) ProtoMessage ¶
func (*Redis) ProtoMessage()
func (*Redis) ProtoReflect ¶
func (x *Redis) ProtoReflect() protoreflect.Message
func (*Redis) Validate ¶
Validate checks the field values on Redis with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*Redis) ValidateAll ¶
ValidateAll checks the field values on Redis with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in RedisMultiError, or nil if none found.
type RedisMultiError ¶
type RedisMultiError []error
RedisMultiError is an error wrapping multiple validation errors returned by Redis.ValidateAll() if the designated constraints aren't met.
func (RedisMultiError) AllErrors ¶
func (m RedisMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (RedisMultiError) Error ¶
func (m RedisMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type RedisValidationError ¶
type RedisValidationError struct {
// contains filtered or unexported fields
}
RedisValidationError is the validation error returned by Redis.Validate if the designated constraints aren't met.
func (RedisValidationError) Cause ¶
func (e RedisValidationError) Cause() error
Cause function returns cause value.
func (RedisValidationError) Error ¶
func (e RedisValidationError) Error() string
Error satisfies the builtin error interface
func (RedisValidationError) ErrorName ¶
func (e RedisValidationError) ErrorName() string
ErrorName returns error name.
func (RedisValidationError) Field ¶
func (e RedisValidationError) Field() string
Field function returns field value.
func (RedisValidationError) Key ¶
func (e RedisValidationError) Key() bool
Key function returns key value.
func (RedisValidationError) Reason ¶
func (e RedisValidationError) Reason() string
Reason function returns reason value.
type Server ¶
type Server struct { Scheme string `protobuf:"bytes,1,opt,name=scheme,proto3" json:"scheme,omitempty"` Port int32 `protobuf:"varint,2,opt,name=port,proto3" json:"port,omitempty"` // range:[10ms, 10s] Timeout *durationpb.Duration `protobuf:"bytes,3,opt,name=timeout,proto3" json:"timeout,omitempty"` // contains filtered or unexported fields }
func (*Server) Descriptor
deprecated
func (*Server) GetTimeout ¶
func (x *Server) GetTimeout() *durationpb.Duration
func (*Server) ProtoMessage ¶
func (*Server) ProtoMessage()
func (*Server) ProtoReflect ¶
func (x *Server) ProtoReflect() protoreflect.Message
func (*Server) Validate ¶
Validate checks the field values on Server with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*Server) ValidateAll ¶
ValidateAll checks the field values on Server with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in ServerMultiError, or nil if none found.
type ServerMultiError ¶
type ServerMultiError []error
ServerMultiError is an error wrapping multiple validation errors returned by Server.ValidateAll() if the designated constraints aren't met.
func (ServerMultiError) AllErrors ¶
func (m ServerMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ServerMultiError) Error ¶
func (m ServerMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ServerValidationError ¶
type ServerValidationError struct {
// contains filtered or unexported fields
}
ServerValidationError is the validation error returned by Server.Validate if the designated constraints aren't met.
func (ServerValidationError) Cause ¶
func (e ServerValidationError) Cause() error
Cause function returns cause value.
func (ServerValidationError) Error ¶
func (e ServerValidationError) Error() string
Error satisfies the builtin error interface
func (ServerValidationError) ErrorName ¶
func (e ServerValidationError) ErrorName() string
ErrorName returns error name.
func (ServerValidationError) Field ¶
func (e ServerValidationError) Field() string
Field function returns field value.
func (ServerValidationError) Key ¶
func (e ServerValidationError) Key() bool
Key function returns key value.
func (ServerValidationError) Reason ¶
func (e ServerValidationError) Reason() string
Reason function returns reason value.
type Service ¶
type Service struct { // name has three parts: // 1. constant value: "goim" // 2. service type: ["service", "worker", "admin"] // 3. service name: any string // parts joined by "." // example: "goim.service.chat" Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // version must match like "vx.y.z" Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` Http *Server `protobuf:"bytes,3,opt,name=http,proto3,oneof" json:"http,omitempty"` Grpc *Server `protobuf:"bytes,4,opt,name=grpc,proto3,oneof" json:"grpc,omitempty"` Log *Log `protobuf:"bytes,5,opt,name=log,proto3" json:"log,omitempty"` Metadata map[string]string `` /* 157-byte string literal not displayed */ Redis *Redis `protobuf:"bytes,7,opt,name=redis,proto3" json:"redis,omitempty"` Mq *MQ `protobuf:"bytes,8,opt,name=mq,proto3" json:"mq,omitempty"` Mysql *MySQL `protobuf:"bytes,9,opt,name=mysql,proto3" json:"mysql,omitempty"` // services name GatewayService string `protobuf:"bytes,10,opt,name=gatewayService,proto3" json:"gatewayService,omitempty"` UserService string `protobuf:"bytes,11,opt,name=userService,proto3" json:"userService,omitempty"` PushService string `protobuf:"bytes,12,opt,name=pushService,proto3" json:"pushService,omitempty"` StoreWorker string `protobuf:"bytes,13,opt,name=storeWorker,proto3" json:"storeWorker,omitempty"` MsgService string `protobuf:"bytes,14,opt,name=msgService,proto3" json:"msgService,omitempty"` MsgWorker string `protobuf:"bytes,15,opt,name=msgWorker,proto3" json:"msgWorker,omitempty"` // contains filtered or unexported fields }
func (*Service) Descriptor
deprecated
func (*Service) GetGatewayService ¶
func (*Service) GetMetadata ¶
func (*Service) GetMsgService ¶
func (*Service) GetMsgWorker ¶ added in v0.0.2
func (*Service) GetPushService ¶
func (*Service) GetStoreWorker ¶ added in v0.0.2
func (*Service) GetUserService ¶
func (*Service) GetVersion ¶
func (*Service) ProtoMessage ¶
func (*Service) ProtoMessage()
func (*Service) ProtoReflect ¶
func (x *Service) ProtoReflect() protoreflect.Message
func (*Service) Validate ¶
Validate checks the field values on Service with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*Service) ValidateAll ¶
ValidateAll checks the field values on Service with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in ServiceMultiError, or nil if none found.
type ServiceMultiError ¶
type ServiceMultiError []error
ServiceMultiError is an error wrapping multiple validation errors returned by Service.ValidateAll() if the designated constraints aren't met.
func (ServiceMultiError) AllErrors ¶
func (m ServiceMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ServiceMultiError) Error ¶
func (m ServiceMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ServiceValidationError ¶
type ServiceValidationError struct {
// contains filtered or unexported fields
}
ServiceValidationError is the validation error returned by Service.Validate if the designated constraints aren't met.
func (ServiceValidationError) Cause ¶
func (e ServiceValidationError) Cause() error
Cause function returns cause value.
func (ServiceValidationError) Error ¶
func (e ServiceValidationError) Error() string
Error satisfies the builtin error interface
func (ServiceValidationError) ErrorName ¶
func (e ServiceValidationError) ErrorName() string
ErrorName returns error name.
func (ServiceValidationError) Field ¶
func (e ServiceValidationError) Field() string
Field function returns field value.
func (ServiceValidationError) Key ¶
func (e ServiceValidationError) Key() bool
Key function returns key value.
func (ServiceValidationError) Reason ¶
func (e ServiceValidationError) Reason() string
Reason function returns reason value.