cosmium/internal/repositories/triggers.go
2024-02-11 01:44:20 +02:00

16 lines
408 B
Go

package repositories
var triggers = []Trigger{}
func GetAllTriggers(databaseId string, collectionId string) ([]Trigger, RepositoryStatus) {
filteredTriggers := make([]Trigger, 0)
for _, coll := range triggers {
if coll.internals.databaseId == databaseId && coll.internals.collectionId == collectionId {
filteredTriggers = append(filteredTriggers, coll)
}
}
return filteredTriggers, StatusOk
}