Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateConfig ¶
func CreateConfig(ctx context.Context, config *ServerConfig, mongodbOperator mongodb.MongoOperator) error
CreateConfig creates a new server config with unique key
func UpdateConfig ¶
func UpdateConfig(ctx context.Context, key string, value interface{}, mongodbOperator mongodb.MongoOperator) error
UpdateConfig updates the required server config
Types ¶
type ServerConfig ¶
type ServerConfig struct { Key string `bson:"key"` Value interface{} `bson:"value"` }
ServerConfig stores any server specific configuration in the db
func GetConfig ¶
func GetConfig(ctx context.Context, key string, mongodbOperator mongodb.MongoOperator) (*ServerConfig, error)
GetConfig returns the requested server config
Click to show internal directories.
Click to hide internal directories.