endpoints

package
v0.0.1-alpha.2 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2017 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EncodeDeleteResponse

func EncodeDeleteResponse(context context.Context, w http.ResponseWriter, response interface{}) error

func EncodeGetResponse

func EncodeGetResponse(context context.Context, w http.ResponseWriter, response interface{}) error

func EncodePostResponse

func EncodePostResponse(context context.Context, w http.ResponseWriter, response interface{}) error

func EncodePutResponse

func EncodePutResponse(context context.Context, w http.ResponseWriter, response interface{}) error

func GetRestfulRequest

func GetRestfulRequest(ctx context.Context) *restful.Request

func GetRestfulResponse

func GetRestfulResponse(ctx context.Context) *restful.Response

func MakeGoRestfulWrapper

func MakeGoRestfulWrapper(server *gokithttp.Server) restful.RouteFunction

func NameNamespaceDecodeRequestFunc

func NameNamespaceDecodeRequestFunc(ctx context.Context, r *http.Request) (interface{}, error)

func NewJsonDecodeRequestFunc

func NewJsonDecodeRequestFunc(payloadTypePtr interface{}) gokithttp.DecodeRequestFunc

func NewJsonPostDecodeRequestFunc

func NewJsonPostDecodeRequestFunc(payloadTypePtr interface{}) gokithttp.DecodeRequestFunc

func NewJsonPutDecodeRequestFunc

func NewJsonPutDecodeRequestFunc(payloadTypePtr interface{}) gokithttp.DecodeRequestFunc

Types

type HandlerBuilder

type HandlerBuilder interface {
	Build(context.Context) *kithttp.Server
	Post(interface{}) HandlerBuilder
	Put(interface{}) HandlerBuilder
	Get() HandlerBuilder
	Delete() HandlerBuilder
	Middleware([]endpoint.Middleware) HandlerBuilder
	Encoder(kithttp.EncodeResponseFunc) HandlerBuilder
	Decoder(kithttp.DecodeRequestFunc) HandlerBuilder
	Endpoint(endpoint.Endpoint) HandlerBuilder
}

func NewHandlerBuilder

func NewHandlerBuilder() HandlerBuilder

type Metadata

type Metadata struct {
	Name      string
	Namespace string
}

type PutObject

type PutObject struct {
	Metadata Metadata
	Payload  interface{}
}

Jump to

Keyboard shortcuts

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