Documentation
¶
Index ¶
- Constants
- func PurgeDB(db datastore.DatabaseClient)
- func SeedAPIKey(db datastore.DatabaseClient, role auth.Role, uid, name, keyType string) (*datastore.APIKey, string, error)
- func SeedApplication(db datastore.DatabaseClient, g *datastore.Group, uid, title string, ...) (*datastore.Application, error)
- func SeedConfiguration(db datastore.DatabaseClient) (*datastore.Configuration, error)
- func SeedDefaultGroup(db datastore.DatabaseClient, orgID string) (*datastore.Group, error)
- func SeedDefaultOrganisation(db datastore.DatabaseClient, user *datastore.User) (*datastore.Organisation, error)
- func SeedDefaultUser(db datastore.DatabaseClient) (*datastore.User, error)
- func SeedEndpoint(db datastore.DatabaseClient, app *datastore.Application, groupID string) (*datastore.Endpoint, error)
- func SeedEvent(db datastore.DatabaseClient, app *datastore.Application, groupID string, ...) (*datastore.Event, error)
- func SeedEventDelivery(db datastore.DatabaseClient, app *datastore.Application, ...) (*datastore.EventDelivery, error)
- func SeedGroup(db datastore.DatabaseClient, uid, name, orgID string, ...) (*datastore.Group, error)
- func SeedMultipleApplications(db datastore.DatabaseClient, g *datastore.Group, count int) error
- func SeedMultipleEndpoints(db datastore.DatabaseClient, app *datastore.Application, groupID string, ...) ([]datastore.Endpoint, error)
- func SeedMultipleOrganisations(db datastore.DatabaseClient, ownerID string, num int) ([]*datastore.Organisation, error)
- func SeedOrganisation(db datastore.DatabaseClient, uid, ownerID, name string) (*datastore.Organisation, error)
- func SeedOrganisationInvite(db datastore.DatabaseClient, org *datastore.Organisation, email string, ...) (*datastore.OrganisationInvite, error)
- func SeedOrganisationMember(db datastore.DatabaseClient, org *datastore.Organisation, user *datastore.User, ...) (*datastore.OrganisationMember, error)
- func SeedSource(db datastore.DatabaseClient, g *datastore.Group, uid string) (*datastore.Source, error)
- func SeedSubscription(db datastore.DatabaseClient, app *datastore.Application, g *datastore.Group, ...) (*datastore.Subscription, error)
- func SeedUser(db datastore.DatabaseClient, email, password string) (*datastore.User, error)
Constants ¶
View Source
const DefaultUserPassword = "password"
Variables ¶
This section is empty.
Functions ¶
func PurgeDB ¶
func PurgeDB(db datastore.DatabaseClient)
PurgeDB is run after every test run and it's used to truncate the DB to have a clean slate in the next run.
func SeedAPIKey ¶
func SeedAPIKey(db datastore.DatabaseClient, role auth.Role, uid, name, keyType string) (*datastore.APIKey, string, error)
SeedAPIKey creates random api key for integration tests.
func SeedApplication ¶
func SeedApplication(db datastore.DatabaseClient, g *datastore.Group, uid, title string, disabled bool) (*datastore.Application, error)
SeedApplication is create random application for integration tests.
func SeedConfiguration ¶
func SeedConfiguration(db datastore.DatabaseClient) (*datastore.Configuration, error)
func SeedDefaultGroup ¶
seed default group
func SeedDefaultOrganisation ¶
func SeedDefaultOrganisation(db datastore.DatabaseClient, user *datastore.User) (*datastore.Organisation, error)
seed default organisation
func SeedDefaultUser ¶
func SeedDefaultUser(db datastore.DatabaseClient) (*datastore.User, error)
seed default user
func SeedEndpoint ¶
func SeedEndpoint(db datastore.DatabaseClient, app *datastore.Application, groupID string) (*datastore.Endpoint, error)
func SeedEvent ¶
func SeedEvent(db datastore.DatabaseClient, app *datastore.Application, groupID string, uid, eventType string, data []byte) (*datastore.Event, error)
SeedEvent creates a random event for integration tests.
func SeedEventDelivery ¶
func SeedEventDelivery(db datastore.DatabaseClient, app *datastore.Application, event *datastore.Event, endpoint *datastore.Endpoint, groupID string, uid string, status datastore.EventDeliveryStatus, subcription *datastore.Subscription) (*datastore.EventDelivery, error)
SeedEventDelivery creates a random event delivery for integration tests.
func SeedGroup ¶
func SeedGroup(db datastore.DatabaseClient, uid, name, orgID string, groupType datastore.GroupType, cfg *datastore.GroupConfig) (*datastore.Group, error)
seed default group
func SeedMultipleEndpoints ¶
func SeedMultipleEndpoints(db datastore.DatabaseClient, app *datastore.Application, groupID string, events []string, count int) ([]datastore.Endpoint, error)
func SeedMultipleOrganisations ¶
func SeedMultipleOrganisations(db datastore.DatabaseClient, ownerID string, num int) ([]*datastore.Organisation, error)
SeedMultipleOrganisations is creates random Organisations for integration tests.
func SeedOrganisation ¶
func SeedOrganisation(db datastore.DatabaseClient, uid, ownerID, name string) (*datastore.Organisation, error)
SeedOrganisation is create random Organisation for integration tests.
func SeedOrganisationInvite ¶
func SeedOrganisationInvite(db datastore.DatabaseClient, org *datastore.Organisation, email string, role *auth.Role, expiry primitive.DateTime, status datastore.InviteStatus) (*datastore.OrganisationInvite, error)
seed organisation invite
func SeedOrganisationMember ¶
func SeedOrganisationMember(db datastore.DatabaseClient, org *datastore.Organisation, user *datastore.User, role *auth.Role) (*datastore.OrganisationMember, error)
seed organisation member
func SeedSource ¶
func SeedSubscription ¶
func SeedSubscription(db datastore.DatabaseClient, app *datastore.Application, g *datastore.Group, uid string, groupType datastore.GroupType, source *datastore.Source, endpoint *datastore.Endpoint, retryConfig *datastore.RetryConfiguration, alertConfig *datastore.AlertConfiguration, filterConfig *datastore.FilterConfiguration, status datastore.SubscriptionStatus, ) (*datastore.Subscription, error)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.