endpoint

package
v0.0.0-...-62716b9 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateEndpoint

func CreateEndpoint(service service.User) endpoint.Endpoint

CreateEndpoint provides service.Create() as general endpoint which can be used with arbitrary transport layers.

Types

type CreateRequest

type CreateRequest struct {
	Username string `json:"username"`
	Email    string `json:"email"`
}

type CreateResponse

type CreateResponse struct {
	User *UserEntity `json:"user"`
	Err  error       `json:"-"`
}

func (CreateResponse) Failed

func (resp CreateResponse) Failed() error

Implement the Failer interface for all responses

type Set

type Set struct {
	CreateEndpoint endpoint.Endpoint
}

func Endpoints

func Endpoints(service service.user, duration metrics.Histogram, frequency metrics.Counter) Set

Jump to

Keyboard shortcuts

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