client

package
v0.0.0-...-59a5801 Latest Latest
Warning

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

Go to latest
Published: May 13, 2019 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HealthHealthPath

func HealthHealthPath() string

HealthHealthPath computes a request path to the health action of health.

Types

type Client

type Client struct {
	*goaclient.Client
	Encoder *goa.HTTPEncoder
	Decoder *goa.HTTPDecoder
}

Client is the demo service client.

func New

func New(c goaclient.Doer) *Client

New instantiates the client.

func (*Client) DecodeJSON

func (c *Client) DecodeJSON(resp *http.Response) (*JSON, error)

DecodeJSON decodes the JSON instance encoded in resp body.

func (*Client) Download

func (c *Client) Download(ctx context.Context, dest string) (int64, error)

Download downloads index.html and writes it to the file dest. It returns the number of bytes downloaded in case of success.

func (*Client) DownloadImages

func (c *Client) DownloadImages(ctx context.Context, filename, dest string) (int64, error)

DownloadImages downloads /files with the given filename and writes it to the file dest. It returns the number of bytes downloaded in case of success.

func (*Client) DownloadStyles

func (c *Client) DownloadStyles(ctx context.Context, filename, dest string) (int64, error)

DownloadStyles downloads /files with the given filename and writes it to the file dest. It returns the number of bytes downloaded in case of success.

func (*Client) HealthHealth

func (c *Client) HealthHealth(ctx context.Context, path string) (*http.Response, error)

Perform health check.

func (*Client) NewHealthHealthRequest

func (c *Client) NewHealthHealthRequest(ctx context.Context, path string) (*http.Request, error)

NewHealthHealthRequest create the request corresponding to the health action endpoint of the health resource.

type JSON

type JSON struct {
	// status code
	Code int `form:"code" json:"code" yaml:"code" xml:"code"`
	// system status
	Status string `form:"status" json:"status" yaml:"status" xml:"status"`
}

Health Check (default view)

Identifier: application/json; view=default

func (*JSON) Validate

func (mt *JSON) Validate() (err error)

Validate validates the JSON media type instance.

Jump to

Keyboard shortcuts

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