// SaveServiceConfig saves service config into database. func SaveServiceConfig(serviceId string, conf apis.BinaryMarshaller) error { db := db.DatabaseInstance() data, _ := conf.Marshal() err := db.StoreData(cfgKey(serviceId), data) if err != nil { log.Error("Failed to save config: %s", err.Error()) return mpqerr.ServerError("Can not save service data: " + serviceId) } return nil }
// SaveServiceDescription saves service config into database. func SaveServiceDescription(desc *ServiceDescription) error { db := db.DatabaseInstance() data, _ := desc.Marshal() return db.StoreData(descKey(desc.ServiceId), data) }