Exemplo n.º 1
0
// GetSessions lists all sessions from DynamoDB
//  @return sessions []models.Session
func GetSessions() (sessions Sessions, count int64, err error) {
	records, count, err := aws.DynamoRecords(sessionTable)
	if err != nil {
		return sessions, 0, err
	}
	return toSessions(records), count, nil
}
Exemplo n.º 2
0
// GetCronResults lists all cron results from DynamoDB
//  @return results models.CronResult
func GetCronResults() (result []CronResult, count int64, err error) {
	records, count, err := aws.DynamoRecords(cronTable)
	if err != nil {
		return result, 0, nil
	}
	return toCronResults(records), count, nil
}