client

package
v0.0.0-...-84d5eb4 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateArrayPrismPath

func CreateArrayPrismPath() string

CreateArrayPrismPath computes a request path to the create action of array_prism.

func CreateHashPrismPath

func CreateHashPrismPath() string

CreateHashPrismPath computes a request path to the create action of hash_prism.

func CreatePrismPath

func CreatePrismPath() string

CreatePrismPath computes a request path to the create action of prism.

func ShowArrayPrismPath

func ShowArrayPrismPath() string

ShowArrayPrismPath computes a request path to the show action of array_prism.

func ShowHashPrismPath

func ShowHashPrismPath() string

ShowHashPrismPath computes a request path to the show action of hash_prism.

func ShowPrismPath

func ShowPrismPath() string

ShowPrismPath computes a request path to the show action of prism.

Types

type Client

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

Client is the types service client.

func New

func New(c goaclient.Doer) *Client

New instantiates the client.

func (*Client) CreateArrayPrism

func (c *Client) CreateArrayPrism(ctx context.Context, path string, payload *CreateArrayPrismPayload, contentType string) (*http.Response, error)

Action create accepts a payload with one array member of each primitive type

func (*Client) CreateHashPrism

func (c *Client) CreateHashPrism(ctx context.Context, path string, payload *CreateHashPrismPayload, contentType string) (*http.Response, error)

Action create acepts a payload with one hash member per primitive type, each using the type as value and String as key

func (*Client) CreatePrism

func (c *Client) CreatePrism(ctx context.Context, path string, payload *CreatePrismPayload, contentType string) (*http.Response, error)

Action create accepts a payload with one member for each primitive type

func (*Client) DecodeGoadesignExamplesArrayprism

func (c *Client) DecodeGoadesignExamplesArrayprism(resp *http.Response) (*GoadesignExamplesArrayprism, error)

DecodeGoadesignExamplesArrayprism decodes the GoadesignExamplesArrayprism instance encoded in resp body.

func (*Client) DecodeGoadesignExamplesHashprism

func (c *Client) DecodeGoadesignExamplesHashprism(resp *http.Response) (*GoadesignExamplesHashprism, error)

DecodeGoadesignExamplesHashprism decodes the GoadesignExamplesHashprism instance encoded in resp body.

func (*Client) DecodeGoadesignExamplesPrism

func (c *Client) DecodeGoadesignExamplesPrism(resp *http.Response) (*GoadesignExamplesPrism, error)

DecodeGoadesignExamplesPrism decodes the GoadesignExamplesPrism instance encoded in resp body.

func (*Client) NewCreateArrayPrismRequest

func (c *Client) NewCreateArrayPrismRequest(ctx context.Context, path string, payload *CreateArrayPrismPayload, contentType string) (*http.Request, error)

NewCreateArrayPrismRequest create the request corresponding to the create action endpoint of the array_prism resource.

func (*Client) NewCreateHashPrismRequest

func (c *Client) NewCreateHashPrismRequest(ctx context.Context, path string, payload *CreateHashPrismPayload, contentType string) (*http.Request, error)

NewCreateHashPrismRequest create the request corresponding to the create action endpoint of the hash_prism resource.

func (*Client) NewCreatePrismRequest

func (c *Client) NewCreatePrismRequest(ctx context.Context, path string, payload *CreatePrismPayload, contentType string) (*http.Request, error)

NewCreatePrismRequest create the request corresponding to the create action endpoint of the prism resource.

func (*Client) NewShowArrayPrismRequest

func (c *Client) NewShowArrayPrismRequest(ctx context.Context, path string, anyArray []interface{}, boolArray []bool, dateTimeArray []time.Time, intArray []int, numArray []float64, stringArray []string, uuidArray []uuid.UUID) (*http.Request, error)

NewShowArrayPrismRequest create the request corresponding to the show action endpoint of the array_prism resource.

func (*Client) NewShowHashPrismRequest

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

NewShowHashPrismRequest create the request corresponding to the show action endpoint of the hash_prism resource.

func (*Client) NewShowPrismRequest

func (c *Client) NewShowPrismRequest(ctx context.Context, path string, anyParam *interface{}, boolParam *bool, dateTimeParam *time.Time, intParam *int, numParam *float64, stringParam *string, uuidParam *uuid.UUID) (*http.Request, error)

NewShowPrismRequest create the request corresponding to the show action endpoint of the prism resource.

func (*Client) ShowArrayPrism

func (c *Client) ShowArrayPrism(ctx context.Context, path string, anyArray []interface{}, boolArray []bool, dateTimeArray []time.Time, intArray []int, numArray []float64, stringArray []string, uuidArray []uuid.UUID) (*http.Response, error)

Action accepts one queerystring array parameter for each primitive type.Description Array parameters are constructed using all the values given to the same querstring key. e.g:

GET /array?uint_param=1&int_param=2

func (*Client) ShowHashPrism

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

Action show returns a media type with one hash memmerb per primitive type, each using the primitive type as value and as a key

func (*Client) ShowPrism

func (c *Client) ShowPrism(ctx context.Context, path string, anyParam *interface{}, boolParam *bool, dateTimeParam *time.Time, intParam *int, numParam *float64, stringParam *string, uuidParam *uuid.UUID) (*http.Response, error)

Action show accepts one querystring param for each primitive type

type CreateArrayPrismPayload

type CreateArrayPrismPayload struct {
	// Any array member
	AnyArray []interface{} `form:"any_array,omitempty" json:"any_array,omitempty" yaml:"any_array,omitempty" xml:"any_array,omitempty"`
	// Boolean array member
	BoolArray []bool `form:"bool_array,omitempty" json:"bool_array,omitempty" yaml:"bool_array,omitempty" xml:"bool_array,omitempty"`
	// DateTime array member
	DateTimeArray []time.Time `` /* 130-byte string literal not displayed */
	// Integer array member
	IntArray []int `form:"int_array,omitempty" json:"int_array,omitempty" yaml:"int_array,omitempty" xml:"int_array,omitempty"`
	// Number array member
	NumArray []float64 `form:"num_array,omitempty" json:"num_array,omitempty" yaml:"num_array,omitempty" xml:"num_array,omitempty"`
	// String array member
	StringArray []string `form:"string_array,omitempty" json:"string_array,omitempty" yaml:"string_array,omitempty" xml:"string_array,omitempty"`
	// UUID array member
	UUIDArray []uuid.UUID `form:"uuid_array,omitempty" json:"uuid_array,omitempty" yaml:"uuid_array,omitempty" xml:"uuid_array,omitempty"`
}

CreateArrayPrismPayload is the array_prism create action payload.

type CreateHashPrismPayload

type CreateHashPrismPayload struct {
	// Hash with Any value member
	AnyValHash map[string]interface{} `form:"any_val_hash,omitempty" json:"any_val_hash,omitempty" yaml:"any_val_hash,omitempty" xml:"any_val_hash,omitempty"`
	// Hash with Boolean value member
	BoolValHash map[string]bool `form:"bool_val_hash,omitempty" json:"bool_val_hash,omitempty" yaml:"bool_val_hash,omitempty" xml:"bool_val_hash,omitempty"`
	// Hash with DateTime value member
	DataTimeValHash map[string]time.Time `` /* 142-byte string literal not displayed */
	// Hash with Integer value member
	IntValHash map[string]int `form:"int_val_hash,omitempty" json:"int_val_hash,omitempty" yaml:"int_val_hash,omitempty" xml:"int_val_hash,omitempty"`
	// Hash with Number value member
	NumValHash map[string]float64 `form:"num_val_hash,omitempty" json:"num_val_hash,omitempty" yaml:"num_val_hash,omitempty" xml:"num_val_hash,omitempty"`
	// Hash with String value member
	StringValHash map[string]string `` /* 130-byte string literal not displayed */
	// Hash with UUID value member
	UUIDValHash map[string]uuid.UUID `form:"uuid_val_hash,omitempty" json:"uuid_val_hash,omitempty" yaml:"uuid_val_hash,omitempty" xml:"uuid_val_hash,omitempty"`
}

CreateHashPrismPayload is the hash_prism create action payload.

type CreatePrismPayload

type CreatePrismPayload struct {
	// Any member
	AnyMember interface{} `form:"any_member,omitempty" json:"any_member,omitempty" yaml:"any_member,omitempty" xml:"any_member,omitempty"`
	// Boolean member
	BoolMember *bool `form:"bool_member,omitempty" json:"bool_member,omitempty" yaml:"bool_member,omitempty" xml:"bool_member,omitempty"`
	// DateTime member
	DateTimeMember *time.Time `` /* 134-byte string literal not displayed */
	// Integer member
	IntMember *int `form:"int_member,omitempty" json:"int_member,omitempty" yaml:"int_member,omitempty" xml:"int_member,omitempty"`
	// Number member
	NumMember *float64 `form:"num_member,omitempty" json:"num_member,omitempty" yaml:"num_member,omitempty" xml:"num_member,omitempty"`
	// String member
	StringMember *string `form:"string_member,omitempty" json:"string_member,omitempty" yaml:"string_member,omitempty" xml:"string_member,omitempty"`
	// UUID member
	UUIDMember *uuid.UUID `form:"uuid_member,omitempty" json:"uuid_member,omitempty" yaml:"uuid_member,omitempty" xml:"uuid_member,omitempty"`
}

CreatePrismPayload is the prism create action payload.

type GoadesignExamplesArrayprism

type GoadesignExamplesArrayprism struct {
	// Any attribute
	AnyAtt interface{} `form:"any_att,omitempty" json:"any_att,omitempty" yaml:"any_att,omitempty" xml:"any_att,omitempty"`
	// Boolean attribute
	BoolAtt *bool `form:"bool_att,omitempty" json:"bool_att,omitempty" yaml:"bool_att,omitempty" xml:"bool_att,omitempty"`
	// DateTime attribute
	DateTimeAtt *time.Time `form:"date_time_att,omitempty" json:"date_time_att,omitempty" yaml:"date_time_att,omitempty" xml:"date_time_att,omitempty"`
	// Integer attribute
	IntAtt *int `form:"int_att,omitempty" json:"int_att,omitempty" yaml:"int_att,omitempty" xml:"int_att,omitempty"`
	// Number attribute
	NumAtt *float64 `form:"num_att,omitempty" json:"num_att,omitempty" yaml:"num_att,omitempty" xml:"num_att,omitempty"`
	// String attribute
	StringAtt *string `form:"string_att,omitempty" json:"string_att,omitempty" yaml:"string_att,omitempty" xml:"string_att,omitempty"`
	// UUID attribute
	UUIDAtt *uuid.UUID `form:"uuid_att,omitempty" json:"uuid_att,omitempty" yaml:"uuid_att,omitempty" xml:"uuid_att,omitempty"`
}

ArrayPrismMedia is a media type with one attribute per primitive type (default view)

Identifier: application/vnd.goadesign.examples.arrayprism; view=default

type GoadesignExamplesHashprism

type GoadesignExamplesHashprism struct {
	// Hash with Any value member
	AnyValHash map[string]interface{} `form:"any_val_hash,omitempty" json:"any_val_hash,omitempty" yaml:"any_val_hash,omitempty" xml:"any_val_hash,omitempty"`
	// Hash with Boolean value member
	BoolValHash map[string]bool `form:"bool_val_hash,omitempty" json:"bool_val_hash,omitempty" yaml:"bool_val_hash,omitempty" xml:"bool_val_hash,omitempty"`
	// Hash with DateTime value member
	DateTimeValHash map[string]time.Time `` /* 142-byte string literal not displayed */
	// Hash with Integer value member
	IntValHash map[string]int `form:"int_val_hash,omitempty" json:"int_val_hash,omitempty" yaml:"int_val_hash,omitempty" xml:"int_val_hash,omitempty"`
	// Hash with Number value member
	NumValHash map[string]float64 `form:"num_val_hash,omitempty" json:"num_val_hash,omitempty" yaml:"num_val_hash,omitempty" xml:"num_val_hash,omitempty"`
	// Hash with String value member
	StringValHash map[string]string `` /* 130-byte string literal not displayed */
	// Hash with UUID value member
	UUIDValHash map[string]uuid.UUID `form:"uuid_val_hash,omitempty" json:"uuid_val_hash,omitempty" yaml:"uuid_val_hash,omitempty" xml:"uuid_val_hash,omitempty"`
}

HashPrismMedia is a media type with one hash member per primitive type: type as value, and string as key (default view)

Identifier: application/vnd.goadesign.examples.hashprism; view=default

type GoadesignExamplesPrism

type GoadesignExamplesPrism struct {
	// Any attribute
	AnyAtt interface{} `form:"any_att,omitempty" json:"any_att,omitempty" yaml:"any_att,omitempty" xml:"any_att,omitempty"`
	// Boolean attribute
	BoolAtt *bool `form:"bool_att,omitempty" json:"bool_att,omitempty" yaml:"bool_att,omitempty" xml:"bool_att,omitempty"`
	// DateTime attribute
	DateTimeAtt *time.Time `form:"date_time_att,omitempty" json:"date_time_att,omitempty" yaml:"date_time_att,omitempty" xml:"date_time_att,omitempty"`
	// Integer attribute
	IntAtt *int `form:"int_att,omitempty" json:"int_att,omitempty" yaml:"int_att,omitempty" xml:"int_att,omitempty"`
	// Number attribute
	NumAtt *float64 `form:"num_att,omitempty" json:"num_att,omitempty" yaml:"num_att,omitempty" xml:"num_att,omitempty"`
	// String attribute
	StringAtt *string `form:"string_att,omitempty" json:"string_att,omitempty" yaml:"string_att,omitempty" xml:"string_att,omitempty"`
	// UUID attribute
	UUIDAtt *uuid.UUID `form:"uuid_att,omitempty" json:"uuid_att,omitempty" yaml:"uuid_att,omitempty" xml:"uuid_att,omitempty"`
}

Prism media is a media type with ie attribute per primitive type (default view)

Identifier: application/vnd.goadesign.examples.prism; view=default

Jump to

Keyboard shortcuts

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