Documentation ¶
Index ¶
- Variables
- func Connect(c *Conf) (*mongo.Client, error)
- func MustConnect(c *Conf) *mongo.Client
- type Conf
- func (*Conf) Descriptor() ([]byte, []int)deprecated
- func (x *Conf) GetDb() string
- func (x *Conf) GetDriver() string
- func (x *Conf) GetLogLevel() int32
- func (x *Conf) GetSource() string
- func (x *Conf) GetTimeout() *durationpb.Duration
- func (*Conf) ProtoMessage()
- func (x *Conf) ProtoReflect() protoreflect.Message
- func (x *Conf) Reset()
- func (x *Conf) String() string
- func (m *Conf) Validate() error
- type ConfValidationError
Constants ¶
This section is empty.
Variables ¶
View Source
var File_store_mongox_conf_proto protoreflect.FileDescriptor
Functions ¶
func MustConnect ¶
Types ¶
type Conf ¶
type Conf struct { Driver string `protobuf:"bytes,1,opt,name=driver,proto3" json:"driver,omitempty"` Source string `protobuf:"bytes,2,opt,name=source,proto3" json:"source,omitempty"` LogLevel int32 `protobuf:"varint,3,opt,name=logLevel,proto3" json:"logLevel,omitempty"` Db string `protobuf:"bytes,4,opt,name=db,proto3" json:"db,omitempty"` Timeout *durationpb.Duration `protobuf:"bytes,5,opt,name=timeout,proto3" json:"timeout,omitempty"` // contains filtered or unexported fields }
func (*Conf) Descriptor
deprecated
func (*Conf) GetLogLevel ¶
func (*Conf) GetTimeout ¶
func (x *Conf) GetTimeout() *durationpb.Duration
func (*Conf) ProtoMessage ¶
func (*Conf) ProtoMessage()
func (*Conf) ProtoReflect ¶
func (x *Conf) ProtoReflect() protoreflect.Message
type ConfValidationError ¶
type ConfValidationError struct {
// contains filtered or unexported fields
}
ConfValidationError is the validation error returned by Conf.Validate if the designated constraints aren't met.
func (ConfValidationError) Cause ¶
func (e ConfValidationError) Cause() error
Cause function returns cause value.
func (ConfValidationError) Error ¶
func (e ConfValidationError) Error() string
Error satisfies the builtin error interface
func (ConfValidationError) ErrorName ¶
func (e ConfValidationError) ErrorName() string
ErrorName returns error name.
func (ConfValidationError) Field ¶
func (e ConfValidationError) Field() string
Field function returns field value.
func (ConfValidationError) Key ¶
func (e ConfValidationError) Key() bool
Key function returns key value.
func (ConfValidationError) Reason ¶
func (e ConfValidationError) Reason() string
Reason function returns reason value.
Click to show internal directories.
Click to hide internal directories.