func (db *datastore) SetTeamSecret(sec *model.TeamSecret) error { var got = new(model.TeamSecret) var err = meddler.QueryRow(db, got, rebind(teamSecretNameQuery), sec.Key, sec.Name) if err == nil && got.ID != 0 { sec.ID = got.ID // update existing id } return meddler.Save(db, teamSecretTable, sec) }
func DeleteGlobalSecret(c context.Context, s *model.TeamSecret) error { s.Key = globalTeamName return DeleteTeamSecret(c, s) }
func SetGlobalSecret(c context.Context, s *model.TeamSecret) error { s.Key = globalTeamName return SetTeamSecret(c, s) }