vhost

package
v0.0.0-...-ba02ff9 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2020 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

Functions

func MakeRouter

func MakeRouter(r *mux.Router, s Service, mw endpoint.Middleware)

Types

type Endpoints

type Endpoints struct {
	ListVhostsEndpoint  endpoint.Endpoint
	GetVhostEndpoint    endpoint.Endpoint
	CreateVhostEndpoint endpoint.Endpoint
	DeleteVhostEndpoint endpoint.Endpoint
}

func MakeEndpoint

func MakeEndpoint(s Service) Endpoints

type Service

type Service interface {
	ListVhosts(ctx context.Context) ([]types.Vhost, error)
	GetVhost(ctx context.Context, id uint) (types.Vhost, error)
	PostVhost(ctx context.Context, v types.Vhost) (types.Vhost, error)
	PutVhost(ctx context.Context, id uint, v types.Vhost) (types.Vhost, error)
	DeleteVhost(ctx context.Context, id uint) error
}

func NewService

func NewService(db *gorm.DB, vault vhosts.Vault) Service

Jump to

Keyboard shortcuts

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