client

package
v0.0.0-...-69a499a Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AttachToAccountTwitterPath

func AttachToAccountTwitterPath() string

AttachToAccountTwitterPath returns the URL path to the twitter service attach-to-account HTTP endpoint.

func BuildAttachToAccountPayload

func BuildAttachToAccountPayload(twitterAttachToAccountAuthorization string, twitterAttachToAccountXSession string, twitterAttachToAccountAPIKey string) (*twitter.AttachToAccountPayload, error)

BuildAttachToAccountPayload builds the payload for the twitter attach-to-account endpoint from CLI flags.

func BuildDetachFromAccountPayload

func BuildDetachFromAccountPayload(twitterDetachFromAccountAuthorization string, twitterDetachFromAccountXSession string, twitterDetachFromAccountAPIKey string) (*twitter.DetachFromAccountPayload, error)

BuildDetachFromAccountPayload builds the payload for the twitter detach-from-account endpoint from CLI flags.

func BuildReceivePayload

func BuildReceivePayload(twitterReceiveOauthToken string, twitterReceiveOauthVerifier string, twitterReceiveState string, twitterReceiveAuthorization string, twitterReceiveXSession string, twitterReceiveRedirectURL string, twitterReceiveAPIKey string) (*twitter.ReceivePayload, error)

BuildReceivePayload builds the payload for the twitter receive endpoint from CLI flags.

func BuildRegisterURLPayload

func BuildRegisterURLPayload(twitterRegisterURLAPIKey string) (*twitter.RegisterURLPayload, error)

BuildRegisterURLPayload builds the payload for the twitter register-url endpoint from CLI flags.

func DecodeAttachToAccountResponse

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

DecodeAttachToAccountResponse returns a decoder for responses returned by the twitter attach-to-account endpoint. restoreBody controls whether the response body should be restored after having been read.

func DecodeDetachFromAccountResponse

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

DecodeDetachFromAccountResponse returns a decoder for responses returned by the twitter detach-from-account endpoint. restoreBody controls whether the response body should be restored after having been read.

func DecodeReceiveResponse

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

DecodeReceiveResponse returns a decoder for responses returned by the twitter receive endpoint. restoreBody controls whether the response body should be restored after having been read.

func DecodeRegisterURLResponse

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

DecodeRegisterURLResponse returns a decoder for responses returned by the twitter register-url endpoint. restoreBody controls whether the response body should be restored after having been read.

func DetachFromAccountTwitterPath

func DetachFromAccountTwitterPath() string

DetachFromAccountTwitterPath returns the URL path to the twitter service detach-from-account HTTP endpoint.

func EncodeAttachToAccountRequest

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

EncodeAttachToAccountRequest returns an encoder for requests sent to the twitter attach-to-account server.

func EncodeDetachFromAccountRequest

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

EncodeDetachFromAccountRequest returns an encoder for requests sent to the twitter detach-from-account server.

func EncodeReceiveRequest

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

EncodeReceiveRequest returns an encoder for requests sent to the twitter receive server.

func EncodeRegisterURLRequest

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

EncodeRegisterURLRequest returns an encoder for requests sent to the twitter register-url server.

func NewReceiveUserMediaOK

func NewReceiveUserMediaOK(body *ReceiveResponseBody, authorization string, xSession string) *twitterviews.UserMediaView

NewReceiveUserMediaOK builds a "twitter" service "receive" endpoint result from a HTTP "OK" response.

func ReceiveTwitterPath

func ReceiveTwitterPath() string

ReceiveTwitterPath returns the URL path to the twitter service receive HTTP endpoint.

func RegisterURLTwitterPath

func RegisterURLTwitterPath() string

RegisterURLTwitterPath returns the URL path to the twitter service register-url HTTP endpoint.

Types

type Client

type Client struct {
	// RegisterURL Doer is the HTTP client used to make requests to the
	// register-url endpoint.
	RegisterURLDoer goahttp.Doer

	// AttachToAccount Doer is the HTTP client used to make requests to the
	// attach-to-account endpoint.
	AttachToAccountDoer goahttp.Doer

	// DetachFromAccount Doer is the HTTP client used to make requests to the
	// detach-from-account endpoint.
	DetachFromAccountDoer goahttp.Doer

	// Receive Doer is the HTTP client used to make requests to the receive
	// endpoint.
	ReceiveDoer goahttp.Doer

	// CORS Doer is the HTTP client used to make requests to the  endpoint.
	CORSDoer 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 twitter 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 twitter service servers.

func (*Client) AttachToAccount

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

AttachToAccount returns an endpoint that makes HTTP requests to the twitter service attach-to-account server.

func (*Client) BuildAttachToAccountRequest

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

BuildAttachToAccountRequest instantiates a HTTP request object with method and path set to call the "twitter" service "attach-to-account" endpoint

func (*Client) BuildDetachFromAccountRequest

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

BuildDetachFromAccountRequest instantiates a HTTP request object with method and path set to call the "twitter" service "detach-from-account" endpoint

func (*Client) BuildReceiveRequest

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

BuildReceiveRequest instantiates a HTTP request object with method and path set to call the "twitter" service "receive" endpoint

func (*Client) BuildRegisterURLRequest

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

BuildRegisterURLRequest instantiates a HTTP request object with method and path set to call the "twitter" service "register-url" endpoint

func (*Client) DetachFromAccount

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

DetachFromAccount returns an endpoint that makes HTTP requests to the twitter service detach-from-account server.

func (*Client) Receive

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

Receive returns an endpoint that makes HTTP requests to the twitter service receive server.

func (*Client) RegisterURL

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

RegisterURL returns an endpoint that makes HTTP requests to the twitter service register-url server.

type ReceiveResponseBody

type ReceiveResponseBody struct {
	// Unique unchanging user ID
	ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"`
	// Given name for the user
	FirstName *string `form:"firstName,omitempty" json:"firstName,omitempty" xml:"firstName,omitempty"`
	// Family name for the user
	LastName *string `form:"lastName,omitempty" json:"lastName,omitempty" xml:"lastName,omitempty"`
	// Email attached to the account of the user
	Email *string `form:"email,omitempty" json:"email,omitempty" xml:"email,omitempty"`
	// Phone Number Of the user
	Phone *string `form:"phone,omitempty" json:"phone,omitempty" xml:"phone,omitempty"`
	// When the user attempts to change their email, this is what they will change
	// it to after they verify that it belongs to them
	ChangingEmail *string `form:"changingEmail,omitempty" json:"changingEmail,omitempty" xml:"changingEmail,omitempty"`
	// Whether the user has verified their email
	VerifiedEmail *bool `form:"verifiedEmail,omitempty" json:"verifiedEmail,omitempty" xml:"verifiedEmail,omitempty"`
	// Whether the user is an administrator on the site
	IsAdmin          *bool   `form:"isAdmin,omitempty" json:"isAdmin,omitempty" xml:"isAdmin,omitempty"`
	UpdatedAt        *string `form:"updatedAt,omitempty" json:"updatedAt,omitempty" xml:"updatedAt,omitempty"`
	IsActive         *bool   `form:"isActive,omitempty" json:"isActive,omitempty" xml:"isActive,omitempty"`
	CreatedAt        *string `form:"createdAt,omitempty" json:"createdAt,omitempty" xml:"createdAt,omitempty"`
	CountryPhoneCode *string `form:"countryPhoneCode,omitempty" json:"countryPhoneCode,omitempty" xml:"countryPhoneCode,omitempty"`
}

ReceiveResponseBody is the type of the "twitter" service "receive" endpoint HTTP response body.

Jump to

Keyboard shortcuts

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