Documentation ¶
Index ¶
- func GivenExistingDomain(ctx context.Context, t *testing.T, service AdminAPI, domain string)
- func GivenExistingPURL(ctx context.Context, t *testing.T, service AdminAPI, purl *PURL)
- func GivenSomeUser(_ context.Context, t *testing.T, userService *app.UserService) *models.UserKey
- type API
- type AdminAPI
- type PURL
- type ResolveAPI
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GivenExistingDomain ¶
GivenExistingDomain ensures that a Domain is known to the application.
This currently is a no-op since domains can't explicitly be created.
func GivenExistingPURL ¶
GivenExistingPURL ensures that a PURL is known to the application.
This is done by simply creating it.
func GivenSomeUser ¶ added in v0.7.0
GivenSomeUser creates a user and returns the key for it.
Types ¶
type AdminAPI ¶
type AdminAPI interface { CreateDomain(ctx context.Context, name string) error // SavePURL creates a new or updates an existing purl. // // If no error occurred the returned string is the path (without host) of the created PURL. SavePURL(ctx context.Context, purl *PURL) (string, error) }
AdminAPI defines admin features of the application.
Click to show internal directories.
Click to hide internal directories.