github.com/goadesign/goa/examples/security/gen/http/secured_service/client


client

import "github.com/goadesign/goa/examples/security/gen/http/secured_service/client"

Overview

Index

Package files

cli.go client.go encode_decode.go paths.go types.go

func AlsoDoublySecureSecuredServicePath

func AlsoDoublySecureSecuredServicePath() string

AlsoDoublySecureSecuredServicePath returns the URL path to the secured_service service also_doubly_secure HTTP endpoint.

func BuildAlsoDoublySecurePayload

func BuildAlsoDoublySecurePayload(securedServiceAlsoDoublySecureKey string, securedServiceAlsoDoublySecureOauthToken string, securedServiceAlsoDoublySecureToken string, securedServiceAlsoDoublySecureUsername string, securedServiceAlsoDoublySecurePassword string) (*securedservice.AlsoDoublySecurePayload, error)

BuildAlsoDoublySecurePayload builds the payload for the secured_service also_doubly_secure endpoint from CLI flags.

func BuildDoublySecurePayload

func BuildDoublySecurePayload(securedServiceDoublySecureKey string, securedServiceDoublySecureToken string) (*securedservice.DoublySecurePayload, error)

BuildDoublySecurePayload builds the payload for the secured_service doubly_secure endpoint from CLI flags.

func BuildSecurePayload

func BuildSecurePayload(securedServiceSecureFail string, securedServiceSecureToken string) (*securedservice.SecurePayload, error)

BuildSecurePayload builds the payload for the secured_service secure endpoint from CLI flags.

func BuildSigninPayload

func BuildSigninPayload(securedServiceSigninUsername string, securedServiceSigninPassword string) (*securedservice.SigninPayload, error)

BuildSigninPayload builds the payload for the secured_service signin endpoint from CLI flags.

func DecodeAlsoDoublySecureResponse

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

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

- "unauthorized" (type securedservice.Unauthorized): http.StatusUnauthorized
- error: internal error

func DecodeDoublySecureResponse

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

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

- "unauthorized" (type securedservice.Unauthorized): http.StatusUnauthorized
- error: internal error

func DecodeSecureResponse

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

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

- "unauthorized" (type securedservice.Unauthorized): http.StatusUnauthorized
- error: internal error

func DecodeSigninResponse

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

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

- "unauthorized" (type securedservice.Unauthorized): http.StatusUnauthorized
- error: internal error

func DoublySecureSecuredServicePath

func DoublySecureSecuredServicePath() string

DoublySecureSecuredServicePath returns the URL path to the secured_service service doubly_secure HTTP endpoint.

func EncodeAlsoDoublySecureRequest

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

EncodeAlsoDoublySecureRequest returns an encoder for requests sent to the secured_service also_doubly_secure server.

func EncodeDoublySecureRequest

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

EncodeDoublySecureRequest returns an encoder for requests sent to the secured_service doubly_secure server.

func EncodeSecureRequest

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

EncodeSecureRequest returns an encoder for requests sent to the secured_service secure server.

func EncodeSigninRequest

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

EncodeSigninRequest returns an encoder for requests sent to the secured_service signin server.

func NewAlsoDoublySecureUnauthorized

func NewAlsoDoublySecureUnauthorized(body AlsoDoublySecureUnauthorizedResponseBody) securedservice.Unauthorized

NewAlsoDoublySecureUnauthorized builds a secured_service service also_doubly_secure endpoint unauthorized error.

func NewDoublySecureUnauthorized

func NewDoublySecureUnauthorized(body DoublySecureUnauthorizedResponseBody) securedservice.Unauthorized

NewDoublySecureUnauthorized builds a secured_service service doubly_secure endpoint unauthorized error.

func NewSecureUnauthorized

func NewSecureUnauthorized(body SecureUnauthorizedResponseBody) securedservice.Unauthorized

NewSecureUnauthorized builds a secured_service service secure endpoint unauthorized error.

func NewSigninUnauthorized

func NewSigninUnauthorized(body SigninUnauthorizedResponseBody) securedservice.Unauthorized

NewSigninUnauthorized builds a secured_service service signin endpoint unauthorized error.

func SecureSecuredServicePath

func SecureSecuredServicePath() string

SecureSecuredServicePath returns the URL path to the secured_service service secure HTTP endpoint.

func SigninSecuredServicePath

func SigninSecuredServicePath() string

SigninSecuredServicePath returns the URL path to the secured_service service signin HTTP endpoint.

type AlsoDoublySecureUnauthorizedResponseBody

type AlsoDoublySecureUnauthorizedResponseBody string

AlsoDoublySecureUnauthorizedResponseBody is the type of the “secured_service” service “also_doubly_secure” endpoint HTTP response body for the “unauthorized” error.

type Client

type Client struct {
    // Signin Doer is the HTTP client used to make requests to the signin endpoint.
    SigninDoer goahttp.Doer

    // Secure Doer is the HTTP client used to make requests to the secure endpoint.
    SecureDoer goahttp.Doer

    // DoublySecure Doer is the HTTP client used to make requests to the
    // doubly_secure endpoint.
    DoublySecureDoer goahttp.Doer

    // AlsoDoublySecure Doer is the HTTP client used to make requests to the
    // also_doubly_secure endpoint.
    AlsoDoublySecureDoer 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 secured_service 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 secured_service service servers.

func (*Client) AlsoDoublySecure

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

AlsoDoublySecure returns an endpoint that makes HTTP requests to the secured_service service also_doubly_secure server.

func (*Client) BuildAlsoDoublySecureRequest

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

BuildAlsoDoublySecureRequest instantiates a HTTP request object with method and path set to call the “secured_service” service “also_doubly_secure” endpoint

func (*Client) BuildDoublySecureRequest

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

BuildDoublySecureRequest instantiates a HTTP request object with method and path set to call the “secured_service” service “doubly_secure” endpoint

func (*Client) BuildSecureRequest

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

BuildSecureRequest instantiates a HTTP request object with method and path set to call the “secured_service” service “secure” endpoint

func (*Client) BuildSigninRequest

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

BuildSigninRequest instantiates a HTTP request object with method and path set to call the “secured_service” service “signin” endpoint

func (*Client) DoublySecure

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

DoublySecure returns an endpoint that makes HTTP requests to the secured_service service doubly_secure server.

func (*Client) Secure

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

Secure returns an endpoint that makes HTTP requests to the secured_service service secure server.

func (*Client) Signin

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

Signin returns an endpoint that makes HTTP requests to the secured_service service signin server.

type DoublySecureUnauthorizedResponseBody

type DoublySecureUnauthorizedResponseBody string

DoublySecureUnauthorizedResponseBody is the type of the “secured_service” service “doubly_secure” endpoint HTTP response body for the “unauthorized” error.

type SecureUnauthorizedResponseBody

type SecureUnauthorizedResponseBody string

SecureUnauthorizedResponseBody is the type of the “secured_service” service “secure” endpoint HTTP response body for the “unauthorized” error.

type SigninUnauthorizedResponseBody

type SigninUnauthorizedResponseBody string

SigninUnauthorizedResponseBody is the type of the “secured_service” service “signin” endpoint HTTP response body for the “unauthorized” error.


Generated by godoc2md