github.com/goadesign/goa/examples/chatter/gen/http/chatter/client
client
import "github.com/goadesign/goa/examples/chatter/gen/http/chatter/client"
Overview
Index
- func BuildEchoerPayload(chatterEchoerToken string) (*chattersvc.EchoerPayload, error)
- func BuildHistoryPayload(chatterHistoryView string, chatterHistoryToken string) (*chattersvc.HistoryPayload, error)
- func BuildListenerPayload(chatterListenerToken string) (*chattersvc.ListenerPayload, error)
- func BuildLoginPayload(chatterLoginUser string, chatterLoginPassword string) (*chattersvc.LoginPayload, error)
- func BuildSummaryPayload(chatterSummaryToken string) (*chattersvc.SummaryPayload, error)
- func DecodeEchoerResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (interface{}, error)
- func DecodeHistoryResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (interface{}, error)
- func DecodeListenerResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (interface{}, error)
- func DecodeLoginResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (interface{}, error)
- func DecodeSummaryResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (interface{}, error)
- func EchoerChatterPath() string
- func EncodeEchoerRequest(encoder func(*http.Request) goahttp.Encoder) func(*http.Request, interface{}) error
- func EncodeHistoryRequest(encoder func(*http.Request) goahttp.Encoder) func(*http.Request, interface{}) error
- func EncodeListenerRequest(encoder func(*http.Request) goahttp.Encoder) func(*http.Request, interface{}) error
- func EncodeLoginRequest(encoder func(*http.Request) goahttp.Encoder) func(*http.Request, interface{}) error
- func EncodeSummaryRequest(encoder func(*http.Request) goahttp.Encoder) func(*http.Request, interface{}) error
- func HistoryChatterPath() string
- func ListenerChatterPath() string
- func LoginChatterPath() string
- func NewEchoerInvalidScopes(body EchoerInvalidScopesResponseBody) chattersvc.InvalidScopes
- func NewEchoerUnauthorized(body EchoerUnauthorizedResponseBody) chattersvc.Unauthorized
- func NewHistoryChatSummaryOK(body *HistoryResponseBody) *chattersvcviews.ChatSummaryView
- func NewHistoryInvalidScopes(body HistoryInvalidScopesResponseBody) chattersvc.InvalidScopes
- func NewHistoryUnauthorized(body HistoryUnauthorizedResponseBody) chattersvc.Unauthorized
- func NewListenerInvalidScopes(body ListenerInvalidScopesResponseBody) chattersvc.InvalidScopes
- func NewListenerUnauthorized(body ListenerUnauthorizedResponseBody) chattersvc.Unauthorized
- func NewLoginUnauthorized(body LoginUnauthorizedResponseBody) chattersvc.Unauthorized
- func NewSummaryChatSummaryCollectionOK(body SummaryResponseBody) chattersvcviews.ChatSummaryCollectionView
- func NewSummaryInvalidScopes(body SummaryInvalidScopesResponseBody) chattersvc.InvalidScopes
- func NewSummaryUnauthorized(body SummaryUnauthorizedResponseBody) chattersvc.Unauthorized
- func SummaryChatterPath() string
- type ChatSummaryResponseBody
- type Client
- func NewClient(scheme string, host string, doer goahttp.Doer, enc func(*http.Request) goahttp.Encoder, dec func(*http.Response) goahttp.Decoder, restoreBody bool, dialer goahttp.Dialer, connConfigFn goahttp.ConnConfigureFunc) *Client
- func (c *Client) BuildEchoerRequest(ctx context.Context, v interface{}) (*http.Request, error)
- func (c *Client) BuildHistoryRequest(ctx context.Context, v interface{}) (*http.Request, error)
- func (c *Client) BuildListenerRequest(ctx context.Context, v interface{}) (*http.Request, error)
- func (c *Client) BuildLoginRequest(ctx context.Context, v interface{}) (*http.Request, error)
- func (c *Client) BuildSummaryRequest(ctx context.Context, v interface{}) (*http.Request, error)
- func (c *Client) Echoer() goa.Endpoint
- func (c *Client) History() goa.Endpoint
- func (c *Client) Listener() goa.Endpoint
- func (c *Client) Login() goa.Endpoint
- func (c *Client) Summary() goa.Endpoint
- type EchoerInvalidScopesResponseBody
- type EchoerUnauthorizedResponseBody
- type HistoryInvalidScopesResponseBody
- type HistoryResponseBody
- type HistoryUnauthorizedResponseBody
- type ListenerInvalidScopesResponseBody
- type ListenerUnauthorizedResponseBody
- type LoginUnauthorizedResponseBody
- type SummaryInvalidScopesResponseBody
- type SummaryResponseBody
- type SummaryUnauthorizedResponseBody
Package files
cli.go client.go encode_decode.go paths.go types.go
func BuildEchoerPayload
func BuildEchoerPayload(chatterEchoerToken string) (*chattersvc.EchoerPayload, error)
BuildEchoerPayload builds the payload for the chatter echoer endpoint from CLI flags.
func BuildHistoryPayload
func BuildHistoryPayload(chatterHistoryView string, chatterHistoryToken string) (*chattersvc.HistoryPayload, error)
BuildHistoryPayload builds the payload for the chatter history endpoint from CLI flags.
func BuildListenerPayload
func BuildListenerPayload(chatterListenerToken string) (*chattersvc.ListenerPayload, error)
BuildListenerPayload builds the payload for the chatter listener endpoint from CLI flags.
func BuildLoginPayload
func BuildLoginPayload(chatterLoginUser string, chatterLoginPassword string) (*chattersvc.LoginPayload, error)
BuildLoginPayload builds the payload for the chatter login endpoint from CLI flags.
func BuildSummaryPayload
func BuildSummaryPayload(chatterSummaryToken string) (*chattersvc.SummaryPayload, error)
BuildSummaryPayload builds the payload for the chatter summary endpoint from CLI flags.
func DecodeEchoerResponse
func DecodeEchoerResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (interface{}, error)
DecodeEchoerResponse returns a decoder for responses returned by the chatter echoer endpoint. restoreBody controls whether the response body should be restored after having been read. DecodeEchoerResponse may return the following errors:
- "invalid-scopes" (type chattersvc.InvalidScopes): http.StatusForbidden
- "unauthorized" (type chattersvc.Unauthorized): http.StatusUnauthorized
- error: internal error
func DecodeHistoryResponse
func DecodeHistoryResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (interface{}, error)
DecodeHistoryResponse returns a decoder for responses returned by the chatter history endpoint. restoreBody controls whether the response body should be restored after having been read. DecodeHistoryResponse may return the following errors:
- "invalid-scopes" (type chattersvc.InvalidScopes): http.StatusForbidden
- "unauthorized" (type chattersvc.Unauthorized): http.StatusUnauthorized
- error: internal error
func DecodeListenerResponse
func DecodeListenerResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (interface{}, error)
DecodeListenerResponse returns a decoder for responses returned by the chatter listener endpoint. restoreBody controls whether the response body should be restored after having been read. DecodeListenerResponse may return the following errors:
- "invalid-scopes" (type chattersvc.InvalidScopes): http.StatusForbidden
- "unauthorized" (type chattersvc.Unauthorized): http.StatusUnauthorized
- error: internal error
func DecodeLoginResponse
func DecodeLoginResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (interface{}, error)
DecodeLoginResponse returns a decoder for responses returned by the chatter login endpoint. restoreBody controls whether the response body should be restored after having been read. DecodeLoginResponse may return the following errors:
- "unauthorized" (type chattersvc.Unauthorized): http.StatusUnauthorized
- error: internal error
func DecodeSummaryResponse
func DecodeSummaryResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (interface{}, error)
DecodeSummaryResponse returns a decoder for responses returned by the chatter summary endpoint. restoreBody controls whether the response body should be restored after having been read. DecodeSummaryResponse may return the following errors:
- "invalid-scopes" (type chattersvc.InvalidScopes): http.StatusForbidden
- "unauthorized" (type chattersvc.Unauthorized): http.StatusUnauthorized
- error: internal error
func EchoerChatterPath
func EchoerChatterPath() string
EchoerChatterPath returns the URL path to the chatter service echoer HTTP endpoint.
func EncodeEchoerRequest
func EncodeEchoerRequest(encoder func(*http.Request) goahttp.Encoder) func(*http.Request, interface{}) error
EncodeEchoerRequest returns an encoder for requests sent to the chatter echoer server.
func EncodeHistoryRequest
func EncodeHistoryRequest(encoder func(*http.Request) goahttp.Encoder) func(*http.Request, interface{}) error
EncodeHistoryRequest returns an encoder for requests sent to the chatter history server.
func EncodeListenerRequest
func EncodeListenerRequest(encoder func(*http.Request) goahttp.Encoder) func(*http.Request, interface{}) error
EncodeListenerRequest returns an encoder for requests sent to the chatter listener server.
func EncodeLoginRequest
func EncodeLoginRequest(encoder func(*http.Request) goahttp.Encoder) func(*http.Request, interface{}) error
EncodeLoginRequest returns an encoder for requests sent to the chatter login server.
func EncodeSummaryRequest
func EncodeSummaryRequest(encoder func(*http.Request) goahttp.Encoder) func(*http.Request, interface{}) error
EncodeSummaryRequest returns an encoder for requests sent to the chatter summary server.
func HistoryChatterPath
func HistoryChatterPath() string
HistoryChatterPath returns the URL path to the chatter service history HTTP endpoint.
func ListenerChatterPath
func ListenerChatterPath() string
ListenerChatterPath returns the URL path to the chatter service listener HTTP endpoint.
func LoginChatterPath
func LoginChatterPath() string
LoginChatterPath returns the URL path to the chatter service login HTTP endpoint.
func NewEchoerInvalidScopes
func NewEchoerInvalidScopes(body EchoerInvalidScopesResponseBody) chattersvc.InvalidScopes
NewEchoerInvalidScopes builds a chatter service echoer endpoint invalid-scopes error.
func NewEchoerUnauthorized
func NewEchoerUnauthorized(body EchoerUnauthorizedResponseBody) chattersvc.Unauthorized
NewEchoerUnauthorized builds a chatter service echoer endpoint unauthorized error.
func NewHistoryChatSummaryOK
func NewHistoryChatSummaryOK(body *HistoryResponseBody) *chattersvcviews.ChatSummaryView
NewHistoryChatSummaryOK builds a “chatter” service “history” endpoint result from a HTTP “OK” response.
func NewHistoryInvalidScopes
func NewHistoryInvalidScopes(body HistoryInvalidScopesResponseBody) chattersvc.InvalidScopes
NewHistoryInvalidScopes builds a chatter service history endpoint invalid-scopes error.
func NewHistoryUnauthorized
func NewHistoryUnauthorized(body HistoryUnauthorizedResponseBody) chattersvc.Unauthorized
NewHistoryUnauthorized builds a chatter service history endpoint unauthorized error.
func NewListenerInvalidScopes
func NewListenerInvalidScopes(body ListenerInvalidScopesResponseBody) chattersvc.InvalidScopes
NewListenerInvalidScopes builds a chatter service listener endpoint invalid-scopes error.
func NewListenerUnauthorized
func NewListenerUnauthorized(body ListenerUnauthorizedResponseBody) chattersvc.Unauthorized
NewListenerUnauthorized builds a chatter service listener endpoint unauthorized error.
func NewLoginUnauthorized
func NewLoginUnauthorized(body LoginUnauthorizedResponseBody) chattersvc.Unauthorized
NewLoginUnauthorized builds a chatter service login endpoint unauthorized error.
func NewSummaryChatSummaryCollectionOK
func NewSummaryChatSummaryCollectionOK(body SummaryResponseBody) chattersvcviews.ChatSummaryCollectionView
NewSummaryChatSummaryCollectionOK builds a “chatter” service “summary” endpoint result from a HTTP “OK” response.
func NewSummaryInvalidScopes
func NewSummaryInvalidScopes(body SummaryInvalidScopesResponseBody) chattersvc.InvalidScopes
NewSummaryInvalidScopes builds a chatter service summary endpoint invalid-scopes error.
func NewSummaryUnauthorized
func NewSummaryUnauthorized(body SummaryUnauthorizedResponseBody) chattersvc.Unauthorized
NewSummaryUnauthorized builds a chatter service summary endpoint unauthorized error.
func SummaryChatterPath
func SummaryChatterPath() string
SummaryChatterPath returns the URL path to the chatter service summary HTTP endpoint.
type ChatSummaryResponseBody
type ChatSummaryResponseBody struct {
// Message sent to the server
Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"`
// Length of the message sent
Length *int `form:"length,omitempty" json:"length,omitempty" xml:"length,omitempty"`
// Time at which the message was sent
SentAt *string `form:"sent_at,omitempty" json:"sent_at,omitempty" xml:"sent_at,omitempty"`
}
ChatSummaryResponseBody is used to define fields on response body types.
func (*ChatSummaryResponseBody) Validate
func (body *ChatSummaryResponseBody) Validate() (err error)
Validate runs the validations defined on ChatSummaryResponseBody
type Client
type Client struct {
// Login Doer is the HTTP client used to make requests to the login endpoint.
LoginDoer goahttp.Doer
// Echoer Doer is the HTTP client used to make requests to the echoer endpoint.
EchoerDoer goahttp.Doer
// Listener Doer is the HTTP client used to make requests to the listener
// endpoint.
ListenerDoer goahttp.Doer
// Summary Doer is the HTTP client used to make requests to the summary
// endpoint.
SummaryDoer goahttp.Doer
// History Doer is the HTTP client used to make requests to the history
// endpoint.
HistoryDoer 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 chatter 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,
dialer goahttp.Dialer,
connConfigFn goahttp.ConnConfigureFunc,
) *Client
NewClient instantiates HTTP clients for all the chatter service servers.
func (*Client) BuildEchoerRequest
func (c *Client) BuildEchoerRequest(ctx context.Context, v interface{}) (*http.Request, error)
BuildEchoerRequest instantiates a HTTP request object with method and path set to call the “chatter” service “echoer” endpoint
func (*Client) BuildHistoryRequest
func (c *Client) BuildHistoryRequest(ctx context.Context, v interface{}) (*http.Request, error)
BuildHistoryRequest instantiates a HTTP request object with method and path set to call the “chatter” service “history” endpoint
func (*Client) BuildListenerRequest
func (c *Client) BuildListenerRequest(ctx context.Context, v interface{}) (*http.Request, error)
BuildListenerRequest instantiates a HTTP request object with method and path set to call the “chatter” service “listener” endpoint
func (*Client) BuildLoginRequest
func (c *Client) BuildLoginRequest(ctx context.Context, v interface{}) (*http.Request, error)
BuildLoginRequest instantiates a HTTP request object with method and path set to call the “chatter” service “login” endpoint
func (*Client) BuildSummaryRequest
func (c *Client) BuildSummaryRequest(ctx context.Context, v interface{}) (*http.Request, error)
BuildSummaryRequest instantiates a HTTP request object with method and path set to call the “chatter” service “summary” endpoint
func (*Client) Echoer
func (c *Client) Echoer() goa.Endpoint
Echoer returns an endpoint that makes HTTP requests to the chatter service echoer server.
func (*Client) History
func (c *Client) History() goa.Endpoint
History returns an endpoint that makes HTTP requests to the chatter service history server.
func (*Client) Listener
func (c *Client) Listener() goa.Endpoint
Listener returns an endpoint that makes HTTP requests to the chatter service listener server.
func (*Client) Login
func (c *Client) Login() goa.Endpoint
Login returns an endpoint that makes HTTP requests to the chatter service login server.
func (*Client) Summary
func (c *Client) Summary() goa.Endpoint
Summary returns an endpoint that makes HTTP requests to the chatter service summary server.
type EchoerInvalidScopesResponseBody
type EchoerInvalidScopesResponseBody string
EchoerInvalidScopesResponseBody is the type of the “chatter” service “echoer” endpoint HTTP response body for the “invalid-scopes” error.
type EchoerUnauthorizedResponseBody
type EchoerUnauthorizedResponseBody string
EchoerUnauthorizedResponseBody is the type of the “chatter” service “echoer” endpoint HTTP response body for the “unauthorized” error.
type HistoryInvalidScopesResponseBody
type HistoryInvalidScopesResponseBody string
HistoryInvalidScopesResponseBody is the type of the “chatter” service “history” endpoint HTTP response body for the “invalid-scopes” error.
type HistoryResponseBody
type HistoryResponseBody struct {
// Message sent to the server
Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"`
// Length of the message sent
Length *int `form:"length,omitempty" json:"length,omitempty" xml:"length,omitempty"`
// Time at which the message was sent
SentAt *string `form:"sent_at,omitempty" json:"sent_at,omitempty" xml:"sent_at,omitempty"`
}
HistoryResponseBody is the type of the “chatter” service “history” endpoint HTTP response body.
type HistoryUnauthorizedResponseBody
type HistoryUnauthorizedResponseBody string
HistoryUnauthorizedResponseBody is the type of the “chatter” service “history” endpoint HTTP response body for the “unauthorized” error.
type ListenerInvalidScopesResponseBody
type ListenerInvalidScopesResponseBody string
ListenerInvalidScopesResponseBody is the type of the “chatter” service “listener” endpoint HTTP response body for the “invalid-scopes” error.
type ListenerUnauthorizedResponseBody
type ListenerUnauthorizedResponseBody string
ListenerUnauthorizedResponseBody is the type of the “chatter” service “listener” endpoint HTTP response body for the “unauthorized” error.
type LoginUnauthorizedResponseBody
type LoginUnauthorizedResponseBody string
LoginUnauthorizedResponseBody is the type of the “chatter” service “login” endpoint HTTP response body for the “unauthorized” error.
type SummaryInvalidScopesResponseBody
type SummaryInvalidScopesResponseBody string
SummaryInvalidScopesResponseBody is the type of the “chatter” service “summary” endpoint HTTP response body for the “invalid-scopes” error.
type SummaryResponseBody
type SummaryResponseBody []*ChatSummaryResponseBody
SummaryResponseBody is the type of the “chatter” service “summary” endpoint HTTP response body.
type SummaryUnauthorizedResponseBody
type SummaryUnauthorizedResponseBody string
SummaryUnauthorizedResponseBody is the type of the “chatter” service “summary” endpoint HTTP response body for the “unauthorized” error.
Generated by godoc2md