func RetrieveAllAppIds(ctx appengine.Context) event.Event { if len(sharedAppIdItems) > 0 { res := new(event.RequestAppIDResponseEvent) res.AppIDs = make([]string, len(sharedAppIdItems)) for i := 0; i < len(sharedAppIdItems); i++ { res.AppIDs[i] = sharedAppIdItems[i].AppID } return res } resev := new(event.AdminResponseEvent) resev.ErrorCause = "No shared appid." return resev }
func RetrieveAppIds(ctx appengine.Context) event.Event { ctx.Infof("Shared items length :%d", len(sharedAppIdItems)) for len(sharedAppIdItems) > 0 { res := new(event.RequestAppIDResponseEvent) res.AppIDs = make([]string, 1) index := rand.Intn(len(sharedAppIdItems)) item := sharedAppIdItems[index] if !isValidSnovaSite(ctx, item.AppID) { unShareAppID(ctx, item.AppID, item.Email) continue } res.AppIDs[0] = item.AppID return res } resev := new(event.AdminResponseEvent) resev.ErrorCause = "No shared appid." return resev }