Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ElementKey = micro.ElementKey("MongodbComponent")
ElementKey is ElementKey for mongodb
Functions ¶
Types ¶
type Config ¶
type Config struct {
Address string `toml:"host"` // Server address
DB string `toml:"db"` // database name
User string `toml:"user"` // user name
Password string `toml:"password"` // password
Options string `toml:"options"` // config
}
Config database configuration
type MongoComponent ¶
type MongoComponent struct {
micro.EmptyComponent
// contains filtered or unexported fields
}
MongoComponent is Component for mongodb
func (*MongoComponent) Init ¶
func (c *MongoComponent) Init(server *micro.Server) error
Init the component
Click to show internal directories.
Click to hide internal directories.