Documentation ¶
Index ¶
- Constants
- func AppName(name string) utils.OptionFunc[useOption]
- func BsonOptions(bsonOptions *options.BSONOptions) utils.OptionFunc[useOption]
- func Construct(ctx context.Context, confs map[string]*Conf, opts ...utils.OptionExtender) func()
- func ReadConcern(readConcern *readconcern.ReadConcern) utils.OptionFunc[useOption]
- func ReadPreference(readPreference *readpref.ReadPref) utils.OptionFunc[useOption]
- func Registry(registry *bsoncodec.Registry) utils.OptionFunc[useOption]
- func WriteConcern(writeConcern *writeconcern.WriteConcern) utils.OptionFunc[useOption]
- type Conf
- type Mongo
Constants ¶
View Source
const (
ErrDuplicatedName utils.Error = "duplicated mongo name"
)
Variables ¶
This section is empty.
Functions ¶
func AppName ¶
func AppName(name string) utils.OptionFunc[useOption]
func BsonOptions ¶
func BsonOptions(bsonOptions *options.BSONOptions) utils.OptionFunc[useOption]
func ReadConcern ¶
func ReadConcern(readConcern *readconcern.ReadConcern) utils.OptionFunc[useOption]
func ReadPreference ¶
func ReadPreference(readPreference *readpref.ReadPref) utils.OptionFunc[useOption]
func WriteConcern ¶
func WriteConcern(writeConcern *writeconcern.WriteConcern) utils.OptionFunc[useOption]
Types ¶
type Conf ¶
type Conf struct { mongo.Option `yaml:",inline" json:",inline" toml:",inline"` EnableLogger bool `yaml:"enable_logger" json:"enable_logger" toml:"enable_logger" default:"false"` LoggerConfig struct { Logger string `yaml:"logger" json:"logger" toml:"logger" default:"github.com/wfusion/gofusion/log/customlogger.mongoLogger"` LogInstance string `yaml:"log_instance" json:"log_instance" toml:"log_instance" default:"default"` LoggableCommands []string `` /* 151-byte string literal not displayed */ } `yaml:"logger_config" json:"logger_config" toml:"logger_config"` }
Conf nolint: revive // struct tag too long issue
Click to show internal directories.
Click to hide internal directories.