Version: v0.2.0 Latest Latest

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

Go to latest
Published: Dec 25, 2015 License: Apache-2.0 Imports: 3 Imported by: 0




This section is empty.


This section is empty.


This section is empty.


type AuthInfoWriter

type AuthInfoWriter interface {
	AuthenticateRequest(Request, strfmt.Registry) error

An AuthInfoWriter implementor knows how to write authentication info to a request

type AuthInfoWriterFunc

type AuthInfoWriterFunc func(Request, strfmt.Registry) error

AuthInfoWriterFunc converts a function to a request writer interface

func (AuthInfoWriterFunc) AuthenticateRequest

func (fn AuthInfoWriterFunc) AuthenticateRequest(req Request, reg strfmt.Registry) error

AuthenticateRequest adds authentication data to the request

type Operation

type Operation struct {
	ID       string
	AuthInfo AuthInfoWriter
	Params   RequestWriter
	Reader   ResponseReader

Operation represents the context for a swagger operation to be submitted to the transport

type Request

type Request interface {
	SetHeaderParam(string, ...string) error

	SetQueryParam(string, ...string) error

	SetFormParam(string, ...string) error

	SetPathParam(string, string) error

	SetFileParam(string, string) error

	SetBodyParam(interface{}) error

Request is an interface for things that know how to add information to a swagger client request

type RequestWriter

type RequestWriter interface {
	WriteToRequest(Request, strfmt.Registry) error

RequestWriter is an interface for things that know how to write to a request

type RequestWriterFunc

type RequestWriterFunc func(Request, strfmt.Registry) error

RequestWriterFunc converts a function to a request writer interface

func (RequestWriterFunc) WriteToRequest

func (fn RequestWriterFunc) WriteToRequest(req Request, reg strfmt.Registry) error

WriteToRequest adds data to the request

type Response

type Response interface {
	Code() int
	Message() string
	GetHeader(string) string
	Body() io.ReadCloser

A Response represents a client response This bridges between responses obtained from different transports

type ResponseReader

type ResponseReader interface {
	ReadResponse(Response, httpkit.Consumer) (interface{}, error)

A ResponseReader is an interface for things want to read a response. An application of this is to create structs from response values

type ResponseReaderFunc

type ResponseReaderFunc func(Response, httpkit.Consumer) (interface{}, error)

A ResponseReaderFunc turns a function into a ResponseReader interface implementation

func (ResponseReaderFunc) ReadResponse

func (read ResponseReaderFunc) ReadResponse(resp Response, consumer httpkit.Consumer) (interface{}, error)

ReadResponse reads the response

type Transport

type Transport interface {
	//Submit(string, RequestWriter, ResponseReader, AuthInfoWriter) (interface{}, error)
	Submit(*Operation) (interface{}, error)

A Transport implementor knows how to submit Request objects to some destination

Jump to

Keyboard shortcuts

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