github.com/Jeffail/benthos/v3@v3.65.0/lib/cache/mongodb.go (about) 1 package cache 2 3 import ( 4 "github.com/Jeffail/benthos/v3/internal/impl/mongodb/client" 5 ) 6 7 // MongoDBConfig is a config struct for a mongo connection. 8 type MongoDBConfig struct { 9 client.Config `json:",inline" yaml:",inline"` 10 KeyField string `json:"key_field" yaml:"key_field"` 11 ValueField string `json:"value_field" yaml:"value_field"` 12 } 13 14 // NewMongoDBConfig returns a MongoDBConfig with default values. 15 func NewMongoDBConfig() MongoDBConfig { 16 return MongoDBConfig{ 17 Config: client.NewConfig(), 18 KeyField: "", 19 ValueField: "", 20 } 21 }