Documentation ¶
Overview ¶
Package mongodb
Index ¶
- Constants
- type Config
- type ErrNotConfigured
- type ErrNotSupported
- type MongoClient
- func (m MongoClient) Close(ctx context.Context) error
- func (m MongoClient) CreateMission(ctx context.Context, name string, description string, ...) error
- func (m MongoClient) GetValues(ctx context.Context, id string) ([]map[string]interface{}, error)
- func (m MongoClient) ListMissions(ctx context.Context) ([]map[string]string, error)
- func (m MongoClient) MissionInfo(context.Context, string) (map[string]interface{}, error)
- func (m MongoClient) Save(ctx context.Context, document map[string]interface{}) error
- func (m MongoClient) UpdateMission(context.Context, string, string) error
Constants ¶
View Source
const ( EnvMongoDBHost = "MONGODB_HOST" EnvMongoDBPort = "MONGODB_PORT" EnvMongoDB = "MONGODB_DATABASE" EnvMongoDBUsername = "MONGODB_USERNAME" EnvMongoDBPassword = "MONGODB_PASSWORD" )
Constants containing names of ENV variables
View Source
const ( ConnectionString = `mongodb://{{.Username}}:{{.Password}}@{{.Host}}:{{.Port}}` DefaultMongoDBDatabase = "sat-dev" DefaultMongoDBHost = "mongo" DefaultMongoDBPort = "27017" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ErrNotConfigured ¶ added in v0.1.0
type ErrNotConfigured struct {
What string
}
func (ErrNotConfigured) Error ¶ added in v0.1.0
func (err ErrNotConfigured) Error() string
func (ErrNotConfigured) Is ¶ added in v0.1.0
func (err ErrNotConfigured) Is(target error) bool
type ErrNotSupported ¶ added in v0.1.0
type ErrNotSupported struct {
Backend string
}
func (ErrNotSupported) Error ¶ added in v0.1.0
func (err ErrNotSupported) Error() string
type MongoClient ¶
MongoClient
func (MongoClient) CreateMission ¶ added in v0.1.0
func (MongoClient) ListMissions ¶ added in v0.1.0
func (MongoClient) MissionInfo ¶ added in v0.1.0
func (MongoClient) Save ¶
func (m MongoClient) Save(ctx context.Context, document map[string]interface{}) error
Save
func (MongoClient) UpdateMission ¶ added in v0.1.0
Click to show internal directories.
Click to hide internal directories.