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 ¶
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 }
Click to show internal directories.
Click to hide internal directories.