app

package
v0.1.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotFound   = errors.New("not found")
	ErrBadRequest = errors.New("bad request")
)

Functions

This section is empty.

Types

type DomainMap

type DomainMap map[string]PurlMap

type PurlMap

type PurlMap map[string]string

func (PurlMap) CreatePurl

func (m PurlMap) CreatePurl(name string, target string)

func (PurlMap) ResolvePURL

func (m PurlMap) ResolvePURL(name string) (string, error)

type Service

type Service struct {
	// contains filtered or unexported fields
}

Service is an in-memory implementation of this application's features.

It meant as short-term type used until an actual persistence layer is required.

func NewService added in v0.6.0

func NewService() *Service

func (*Service) CreateDomain

func (s *Service) CreateDomain(domain string) error

func (*Service) Resolve

func (s *Service) Resolve(domain, name string) (string, error)

func (*Service) SavePURL

func (s *Service) SavePURL(domain, name, target string) error

Jump to

Keyboard shortcuts

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