client

package
v0.0.0-...-63cd2eb Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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) (any, 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:

  • "invalid-scopes" (type securedservice.InvalidScopes): http.StatusForbidden
  • "unauthorized" (type securedservice.Unauthorized): http.StatusUnauthorized
  • error: internal error

func DecodeDoublySecureResponse

func DecodeDoublySecureResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, 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:

  • "invalid-scopes" (type securedservice.InvalidScopes): http.StatusForbidden
  • "unauthorized" (type securedservice.Unauthorized): http.StatusUnauthorized
  • error: internal error

func DecodeSecureResponse

func DecodeSecureResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, 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:

  • "invalid-scopes" (type securedservice.InvalidScopes): http.StatusForbidden
  • "unauthorized" (type securedservice.Unauthorized): http.StatusUnauthorized
  • error: internal error

func DecodeSigninResponse

func DecodeSigninResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, 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, any) 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, any) 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, any) 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, any) error

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

func NewAlsoDoublySecureInvalidScopes

func NewAlsoDoublySecureInvalidScopes(body string) securedservice.InvalidScopes

NewAlsoDoublySecureInvalidScopes builds a secured_service service also_doubly_secure endpoint invalid-scopes error.

func NewAlsoDoublySecureUnauthorized

func NewAlsoDoublySecureUnauthorized(body string) securedservice.Unauthorized

NewAlsoDoublySecureUnauthorized builds a secured_service service also_doubly_secure endpoint unauthorized error.

func NewDoublySecureInvalidScopes

func NewDoublySecureInvalidScopes(body string) securedservice.InvalidScopes

NewDoublySecureInvalidScopes builds a secured_service service doubly_secure endpoint invalid-scopes error.

func NewDoublySecureUnauthorized

func NewDoublySecureUnauthorized(body string) securedservice.Unauthorized

NewDoublySecureUnauthorized builds a secured_service service doubly_secure endpoint unauthorized error.

func NewSecureInvalidScopes

func NewSecureInvalidScopes(body string) securedservice.InvalidScopes

NewSecureInvalidScopes builds a secured_service service secure endpoint invalid-scopes error.

func NewSecureUnauthorized

func NewSecureUnauthorized(body string) securedservice.Unauthorized

NewSecureUnauthorized builds a secured_service service secure endpoint unauthorized error.

func NewSigninCredsOK

func NewSigninCredsOK(body *SigninResponseBody) *securedservice.Creds

NewSigninCredsOK builds a "secured_service" service "signin" endpoint result from a HTTP "OK" response.

func NewSigninUnauthorized

func NewSigninUnauthorized(body string) 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.

func ValidateSigninResponseBody

func ValidateSigninResponseBody(body *SigninResponseBody) (err error)

ValidateSigninResponseBody runs the validations defined on SigninResponseBody

Types

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 any) (*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 any) (*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 any) (*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 any) (*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 SigninResponseBody

type SigninResponseBody struct {
	// JWT token
	JWT *string `form:"jwt,omitempty" json:"jwt,omitempty" xml:"jwt,omitempty"`
	// API Key
	APIKey *string `form:"api_key,omitempty" json:"api_key,omitempty" xml:"api_key,omitempty"`
	// OAuth2 token
	OauthToken *string `form:"oauth_token,omitempty" json:"oauth_token,omitempty" xml:"oauth_token,omitempty"`
}

SigninResponseBody is the type of the "secured_service" service "signin" endpoint HTTP response body.

Jump to

Keyboard shortcuts

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