client

package
v0.0.0-...-83043b2 Latest Latest
Warning

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

Go to latest
Published: May 16, 2019 License: GPL-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddIndexesPath

func AddIndexesPath() string

AddIndexesPath returns the URL path to the indexes service add HTTP endpoint.

func BuildAddPayload

func BuildAddPayload(indexesAddBody string) (*indexes.IndexPayload, error)

BuildAddPayload builds the payload for the indexes add endpoint from CLI flags.

func BuildRemovePayload

func BuildRemovePayload(indexesRemoveBody string) (*indexes.IndexPayload, error)

BuildRemovePayload builds the payload for the indexes remove endpoint from CLI flags.

func DecodeAddResponse

func DecodeAddResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (interface{}, error)

DecodeAddResponse returns a decoder for responses returned by the indexes add endpoint. restoreBody controls whether the response body should be restored after having been read. DecodeAddResponse may return the following errors:

  • "invalid_url" (type *goa.ServiceError): http.StatusBadRequest
  • error: internal error

func DecodeListResponse

func DecodeListResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (interface{}, error)

DecodeListResponse returns a decoder for responses returned by the indexes list endpoint. restoreBody controls whether the response body should be restored after having been read. DecodeListResponse may return the following errors:

  • "invalid_url" (type *goa.ServiceError): http.StatusBadRequest
  • error: internal error

func DecodeRemoveResponse

func DecodeRemoveResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (interface{}, error)

DecodeRemoveResponse returns a decoder for responses returned by the indexes remove endpoint. restoreBody controls whether the response body should be restored after having been read. DecodeRemoveResponse may return the following errors:

  • "invalid_url" (type *goa.ServiceError): http.StatusBadRequest
  • error: internal error

func EncodeAddRequest

func EncodeAddRequest(encoder func(*http.Request) goahttp.Encoder) func(*http.Request, interface{}) error

EncodeAddRequest returns an encoder for requests sent to the indexes add server.

func EncodeRemoveRequest

func EncodeRemoveRequest(encoder func(*http.Request) goahttp.Encoder) func(*http.Request, interface{}) error

EncodeRemoveRequest returns an encoder for requests sent to the indexes remove server.

func ListIndexesPath

func ListIndexesPath() string

ListIndexesPath returns the URL path to the indexes service list HTTP endpoint.

func NewAddInvalidURL

func NewAddInvalidURL(body *AddInvalidURLResponseBody) *goa.ServiceError

NewAddInvalidURL builds a indexes service add endpoint invalid_url error.

func NewAddOperationOK

func NewAddOperationOK(body *AddResponseBody) *indexesviews.OperationView

NewAddOperationOK builds a "indexes" service "add" endpoint result from a HTTP "OK" response.

func NewListInvalidURL

func NewListInvalidURL(body *ListInvalidURLResponseBody) *goa.ServiceError

NewListInvalidURL builds a indexes service list endpoint invalid_url error.

func NewRemoveInvalidURL

func NewRemoveInvalidURL(body *RemoveInvalidURLResponseBody) *goa.ServiceError

NewRemoveInvalidURL builds a indexes service remove endpoint invalid_url error.

func NewRemoveOperationOK

func NewRemoveOperationOK(body *RemoveResponseBody) *indexesviews.OperationView

NewRemoveOperationOK builds a "indexes" service "remove" endpoint result from a HTTP "OK" response.

func RemoveIndexesPath

func RemoveIndexesPath() string

RemoveIndexesPath returns the URL path to the indexes service remove HTTP endpoint.

func ValidateAddInvalidURLResponseBody

func ValidateAddInvalidURLResponseBody(body *AddInvalidURLResponseBody) (err error)

ValidateAddInvalidURLResponseBody runs the validations defined on add_invalid_url_response_body

func ValidateListInvalidURLResponseBody

func ValidateListInvalidURLResponseBody(body *ListInvalidURLResponseBody) (err error)

ValidateListInvalidURLResponseBody runs the validations defined on list_invalid_url_response_body

func ValidateRemoveInvalidURLResponseBody

func ValidateRemoveInvalidURLResponseBody(body *RemoveInvalidURLResponseBody) (err error)

ValidateRemoveInvalidURLResponseBody runs the validations defined on remove_invalid_url_response_body

Types

type AddInvalidURLResponseBody

type AddInvalidURLResponseBody struct {
	// Name is the name of this class of errors.
	Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"`
	// ID is a unique identifier for this particular occurrence of the problem.
	ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"`
	// Message is a human-readable explanation specific to this occurrence of the
	// problem.
	Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"`
	// Is the error temporary?
	Temporary *bool `form:"temporary,omitempty" json:"temporary,omitempty" xml:"temporary,omitempty"`
	// Is the error a timeout?
	Timeout *bool `form:"timeout,omitempty" json:"timeout,omitempty" xml:"timeout,omitempty"`
	// Is the error a server-side fault?
	Fault *bool `form:"fault,omitempty" json:"fault,omitempty" xml:"fault,omitempty"`
}

AddInvalidURLResponseBody is the type of the "indexes" service "add" endpoint HTTP response body for the "invalid_url" error.

type AddRequestBody

type AddRequestBody struct {
	// The url of the index file
	URL string `form:"url" json:"url" xml:"url"`
}

AddRequestBody is the type of the "indexes" service "add" endpoint HTTP request body.

func NewAddRequestBody

func NewAddRequestBody(p *indexes.IndexPayload) *AddRequestBody

NewAddRequestBody builds the HTTP request body from the payload of the "add" endpoint of the "indexes" service.

type AddResponseBody

type AddResponseBody struct {
	// The status of the operation
	Status *string `form:"status,omitempty" json:"status,omitempty" xml:"status,omitempty"`
}

AddResponseBody is the type of the "indexes" service "add" endpoint HTTP response body.

type Client

type Client struct {
	// List Doer is the HTTP client used to make requests to the list endpoint.
	ListDoer goahttp.Doer

	// Add Doer is the HTTP client used to make requests to the add endpoint.
	AddDoer goahttp.Doer

	// Remove Doer is the HTTP client used to make requests to the remove endpoint.
	RemoveDoer goahttp.Doer

	// RestoreResponseBody controls whether the response bodies are reset after
	// decoding so they can be read again.
	RestoreResponseBody bool
	// contains filtered or unexported fields
}

Client lists the indexes service endpoint HTTP clients.

func NewClient

func NewClient(
	scheme string,
	host string,
	doer goahttp.Doer,
	enc func(*http.Request) goahttp.Encoder,
	dec func(*http.Response) goahttp.Decoder,
	restoreBody bool,
) *Client

NewClient instantiates HTTP clients for all the indexes service servers.

func (*Client) Add

func (c *Client) Add() goa.Endpoint

Add returns an endpoint that makes HTTP requests to the indexes service add server.

func (*Client) BuildAddRequest

func (c *Client) BuildAddRequest(ctx context.Context, v interface{}) (*http.Request, error)

BuildAddRequest instantiates a HTTP request object with method and path set to call the "indexes" service "add" endpoint

func (*Client) BuildListRequest

func (c *Client) BuildListRequest(ctx context.Context, v interface{}) (*http.Request, error)

BuildListRequest instantiates a HTTP request object with method and path set to call the "indexes" service "list" endpoint

func (*Client) BuildRemoveRequest

func (c *Client) BuildRemoveRequest(ctx context.Context, v interface{}) (*http.Request, error)

BuildRemoveRequest instantiates a HTTP request object with method and path set to call the "indexes" service "remove" endpoint

func (*Client) List

func (c *Client) List() goa.Endpoint

List returns an endpoint that makes HTTP requests to the indexes service list server.

func (*Client) Remove

func (c *Client) Remove() goa.Endpoint

Remove returns an endpoint that makes HTTP requests to the indexes service remove server.

type ListInvalidURLResponseBody

type ListInvalidURLResponseBody struct {
	// Name is the name of this class of errors.
	Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"`
	// ID is a unique identifier for this particular occurrence of the problem.
	ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"`
	// Message is a human-readable explanation specific to this occurrence of the
	// problem.
	Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"`
	// Is the error temporary?
	Temporary *bool `form:"temporary,omitempty" json:"temporary,omitempty" xml:"temporary,omitempty"`
	// Is the error a timeout?
	Timeout *bool `form:"timeout,omitempty" json:"timeout,omitempty" xml:"timeout,omitempty"`
	// Is the error a server-side fault?
	Fault *bool `form:"fault,omitempty" json:"fault,omitempty" xml:"fault,omitempty"`
}

ListInvalidURLResponseBody is the type of the "indexes" service "list" endpoint HTTP response body for the "invalid_url" error.

type RemoveInvalidURLResponseBody

type RemoveInvalidURLResponseBody struct {
	// Name is the name of this class of errors.
	Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"`
	// ID is a unique identifier for this particular occurrence of the problem.
	ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"`
	// Message is a human-readable explanation specific to this occurrence of the
	// problem.
	Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"`
	// Is the error temporary?
	Temporary *bool `form:"temporary,omitempty" json:"temporary,omitempty" xml:"temporary,omitempty"`
	// Is the error a timeout?
	Timeout *bool `form:"timeout,omitempty" json:"timeout,omitempty" xml:"timeout,omitempty"`
	// Is the error a server-side fault?
	Fault *bool `form:"fault,omitempty" json:"fault,omitempty" xml:"fault,omitempty"`
}

RemoveInvalidURLResponseBody is the type of the "indexes" service "remove" endpoint HTTP response body for the "invalid_url" error.

type RemoveRequestBody

type RemoveRequestBody struct {
	// The url of the index file
	URL string `form:"url" json:"url" xml:"url"`
}

RemoveRequestBody is the type of the "indexes" service "remove" endpoint HTTP request body.

func NewRemoveRequestBody

func NewRemoveRequestBody(p *indexes.IndexPayload) *RemoveRequestBody

NewRemoveRequestBody builds the HTTP request body from the payload of the "remove" endpoint of the "indexes" service.

type RemoveResponseBody

type RemoveResponseBody struct {
	// The status of the operation
	Status *string `form:"status,omitempty" json:"status,omitempty" xml:"status,omitempty"`
}

RemoveResponseBody is the type of the "indexes" service "remove" endpoint HTTP response body.

Jump to

Keyboard shortcuts

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