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 AttachToAccountLinkedinPath

func AttachToAccountLinkedinPath() string

AttachToAccountLinkedinPath returns the URL path to the linkedin service attach-to-account HTTP endpoint.

func BuildAttachToAccountPayload

func BuildAttachToAccountPayload(linkedinAttachToAccountAuthorization string, linkedinAttachToAccountXSession string, linkedinAttachToAccountAPIKey string) (*linkedin.AttachToAccountPayload, error)

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

func BuildDetachFromAccountPayload

func BuildDetachFromAccountPayload(linkedinDetachFromAccountAuthorization string, linkedinDetachFromAccountXSession string, linkedinDetachFromAccountAPIKey string) (*linkedin.DetachFromAccountPayload, error)

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

func BuildReceivePayload

func BuildReceivePayload(linkedinReceiveCode string, linkedinReceiveState string, linkedinReceiveAuthorization string, linkedinReceiveXSession string, linkedinReceiveRedirectURL string, linkedinReceiveAPIKey string) (*linkedin.ReceivePayload, error)

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

func BuildRegisterURLPayload

func BuildRegisterURLPayload(linkedinRegisterURLAPIKey string) (*linkedin.RegisterURLPayload, error)

BuildRegisterURLPayload builds the payload for the linkedin 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 linkedin 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 linkedin 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 linkedin 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 linkedin register-url endpoint. restoreBody controls whether the response body should be restored after having been read.

func DetachFromAccountLinkedinPath

func DetachFromAccountLinkedinPath() string

DetachFromAccountLinkedinPath returns the URL path to the linkedin 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 linkedin 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 linkedin 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 linkedin 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 linkedin register-url server.

func NewReceiveUserMediaOK

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

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

func ReceiveLinkedinPath

func ReceiveLinkedinPath() string

ReceiveLinkedinPath returns the URL path to the linkedin service receive HTTP endpoint.

func RegisterURLLinkedinPath

func RegisterURLLinkedinPath() string

RegisterURLLinkedinPath returns the URL path to the linkedin 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 linkedin 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 linkedin service servers.

func (*Client) AttachToAccount

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

AttachToAccount returns an endpoint that makes HTTP requests to the linkedin 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 "linkedin" 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 "linkedin" 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 "linkedin" 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 "linkedin" service "register-url" endpoint

func (*Client) DetachFromAccount

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

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

func (*Client) Receive

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

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

func (*Client) RegisterURL

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

RegisterURL returns an endpoint that makes HTTP requests to the linkedin 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 "linkedin" service "receive" endpoint HTTP response body.

Jump to

Keyboard shortcuts

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