dsl

package
v0.2.0-alpha.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 18, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GivenExistingDomain

func GivenExistingDomain(t *testing.T, service AdminAPI, domain string)

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

func GivenExistingPURL(t *testing.T, service AdminAPI, purl *PURL)

GivenExistingPURL ensures that a PURL is known to the application.

This is done by simply creating it.

Types

type API

type API interface {
	AdminAPI
	ResolveAPI
}

API aggregates all apis.

type AdminAPI

type AdminAPI interface {
	CreateDomain(name string) error

	// SavePURL creates a new or updates an existing purl.
	SavePURL(purl *PURL) error
}

AdminAPI defines admin features of the application.

type PURL

type PURL struct {
	Domain string
	Name   string
	Target *url.URL
}

func NewPURL

func NewPURL(domain string, name string, target *url.URL) *PURL

type ResolveAPI

type ResolveAPI interface {
	// ResolvePURL resolves the PURL identified by domain and name, returning
	// the target of the resolved PURL.
	ResolvePURL(domain string, name string) (*url.URL, error)
}

ResolveAPI defines features for PURL resolution.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL