client

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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 Imports List endpoint. restoreBody controls whether the response body should be restored after having been read.

func ListImportsPath

func ListImportsPath() string

ListImportsPath returns the URL path to the Imports service List HTTP endpoint.

func NewListImportOK

func NewListImportOK(body []*ImportResponse) []*imports.Import

NewListImportOK builds a "Imports" service "List" endpoint result from a HTTP "OK" response.

func ValidateImportResponse

func ValidateImportResponse(body *ImportResponse) (err error)

ValidateImportResponse runs the validations defined on ImportResponse

Types

type Client

type Client struct {
	// List Doer is the HTTP client used to make requests to the List endpoint.
	ListDoer 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 Imports 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 Imports service servers.

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 "Imports" service "List" endpoint

func (*Client) List

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

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

type ImportResponse

type ImportResponse struct {
	// Unique ID for the import
	ID *int `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"`
	// Subscription ID, associating this import to a specific subscription
	SubscriptionID *string `form:"subscription_id,omitempty" json:"subscription_id,omitempty" xml:"subscription_id,omitempty"`
	// Postgres table schema
	Schema *string `form:"schema,omitempty" json:"schema,omitempty" xml:"schema,omitempty"`
	// Postgres table name
	TableName *string `form:"table_name,omitempty" json:"table_name,omitempty" xml:"table_name,omitempty"`
	// Import was completed at this time
	CompletedAt *string `form:"completed_at,omitempty" json:"completed_at,omitempty" xml:"completed_at,omitempty"`
	// Import was created at this time
	CreatedAt *string `form:"created_at,omitempty" json:"created_at,omitempty" xml:"created_at,omitempty"`
	// Import was last updated at this time
	UpdatedAt *string `form:"updated_at,omitempty" json:"updated_at,omitempty" xml:"updated_at,omitempty"`
	// Import was expired at this time
	ExpiredAt *string `form:"expired_at,omitempty" json:"expired_at,omitempty" xml:"expired_at,omitempty"`
	// Last import error
	Error *string `form:"error,omitempty" json:"error,omitempty" xml:"error,omitempty"`
	// Count of error attempts
	ErrorCount *int `form:"error_count,omitempty" json:"error_count,omitempty" xml:"error_count,omitempty"`
	// Timestamp of last error, only reset on error
	LastErrorAt *string `form:"last_error_at,omitempty" json:"last_error_at,omitempty" xml:"last_error_at,omitempty"`
	// Count of rows processed
	RowsProcessedTotal *int64 `form:"rows_processed_total,omitempty" json:"rows_processed_total,omitempty" xml:"rows_processed_total,omitempty"`
}

ImportResponse is used to define fields on response body types.

type ListResponseBody

type ListResponseBody []*ImportResponse

ListResponseBody is the type of the "Imports" service "List" endpoint HTTP response body.

Jump to

Keyboard shortcuts

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