runtime

package
v0.0.0-...-6f2be1c Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2019 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultClient = &Client{
	Client: http.DefaultClient,
}
View Source
var DefaultQueryEncoder = schema.NewEncoder()

Functions

func Delete

func Delete(ctx context.Context, u string, request, response interface{}) error

func Get

func Get(ctx context.Context, u string, request, response interface{}) error

func NewRequest

func NewRequest(method, url string, request interface{}) (*http.Request, error)

func Patch

func Patch(ctx context.Context, u string, request, response interface{}) error

func Post

func Post(ctx context.Context, u string, request, response interface{}) error

Types

type Client

type Client struct {
	Client       *http.Client
	DumpRequest  func(req *http.Request)
	DumpResponse func(resp *http.Response)
}

func (*Client) Delete

func (c *Client) Delete(ctx context.Context, u string, request, response interface{}) error

func (*Client) Do

func (c *Client) Do(ctx context.Context, req *http.Request, response interface{}) error

func (*Client) Get

func (c *Client) Get(ctx context.Context, u string, request, response interface{}) error

func (*Client) Patch

func (c *Client) Patch(ctx context.Context, u string, request, response interface{}) error

func (*Client) Post

func (c *Client) Post(ctx context.Context, u string, request, response interface{}) error

type Status

type Status struct {
	spb.Status
	ErrorMessage string `json:"error,omitempty"`
}

Jump to

Keyboard shortcuts

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