cosmium/internal/repositories/triggers.go

18 lines
573 B
Go
Raw Normal View History

package repositories
import repositorymodels "github.com/pikami/cosmium/internal/repository_models"
var triggers = []repositorymodels.Trigger{}
func GetAllTriggers(databaseId string, collectionId string) ([]repositorymodels.Trigger, repositorymodels.RepositoryStatus) {
filteredTriggers := make([]repositorymodels.Trigger, 0)
for _, coll := range triggers {
if coll.Internals.DatabaseId == databaseId && coll.Internals.CollectionId == collectionId {
2024-02-10 23:44:20 +00:00
filteredTriggers = append(filteredTriggers, coll)
}
}
return filteredTriggers, repositorymodels.StatusOk
}