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: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildDeactivatePayload

func BuildDeactivatePayload(userDeactivateID string, userDeactivateAdmin string, userDeactivateAuthorization string, userDeactivateXSession string, userDeactivateAPIKey string) (*user.DeactivatePayload, error)

BuildDeactivatePayload builds the payload for the user deactivate endpoint from CLI flags.

func BuildGetAuthsPayload

func BuildGetAuthsPayload(userGetAuthsUserID string, userGetAuthsAuthorization string, userGetAuthsXSession string, userGetAuthsAPIKey string) (*user.GetAuthsPayload, error)

BuildGetAuthsPayload builds the payload for the user getAuths endpoint from CLI flags.

func BuildGetUserPayload

func BuildGetUserPayload(userGetUserAuthorization string, userGetUserXSession string, userGetUserAPIKey string) (*user.GetUserPayload, error)

BuildGetUserPayload builds the payload for the user getUser endpoint from CLI flags.

func BuildResendOtpPayload

func BuildResendOtpPayload(userResendOtpAuthorization string, userResendOtpXSession string, userResendOtpAPIKey string) (*user.ResendOtpPayload, error)

BuildResendOtpPayload builds the payload for the user resend-otp endpoint from CLI flags.

func BuildResendVerifyEmailPayload

func BuildResendVerifyEmailPayload(userResendVerifyEmailAuthorization string, userResendVerifyEmailXSession string, userResendVerifyEmailAPIKey string) (*user.ResendVerifyEmailPayload, error)

BuildResendVerifyEmailPayload builds the payload for the user resend-verify-email endpoint from CLI flags.

func BuildUpdatePhonePayload

func BuildUpdatePhonePayload(userUpdatePhonePhone string, userUpdatePhoneCountry string, userUpdatePhoneAuthorization string, userUpdatePhoneXSession string, userUpdatePhoneAPIKey string) (*user.UpdatePhonePayload, error)

BuildUpdatePhonePayload builds the payload for the user update-phone endpoint from CLI flags.

func BuildUpdateUserPayload

func BuildUpdateUserPayload(userUpdateUserBody string, userUpdateUserAuthorization string, userUpdateUserXSession string, userUpdateUserAPIKey string) (*user.UserUpdateParams, error)

BuildUpdateUserPayload builds the payload for the user update-user endpoint from CLI flags.

func BuildValidateEmailPayload

func BuildValidateEmailPayload(userValidateEmailValidateID string, userValidateEmailAPIKey string) (*user.ValidateEmailPayload, error)

BuildValidateEmailPayload builds the payload for the user validate-email endpoint from CLI flags.

func BuildVerifyPhonePayload

func BuildVerifyPhonePayload(userVerifyPhoneOtp string, userVerifyPhoneAuthorization string, userVerifyPhoneXSession string, userVerifyPhoneAPIKey string) (*user.VerifyPhonePayload, error)

BuildVerifyPhonePayload builds the payload for the user verify-phone endpoint from CLI flags.

func DeactivateUserPath

func DeactivateUserPath() string

DeactivateUserPath returns the URL path to the user service deactivate HTTP endpoint.

func DecodeDeactivateResponse

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

DecodeDeactivateResponse returns a decoder for responses returned by the user deactivate endpoint. restoreBody controls whether the response body should be restored after having been read.

func DecodeGetAuthsResponse

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

DecodeGetAuthsResponse returns a decoder for responses returned by the user getAuths endpoint. restoreBody controls whether the response body should be restored after having been read.

func DecodeGetUserResponse

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

DecodeGetUserResponse returns a decoder for responses returned by the user getUser endpoint. restoreBody controls whether the response body should be restored after having been read.

func DecodeResendOtpResponse

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

DecodeResendOtpResponse returns a decoder for responses returned by the user resend-otp endpoint. restoreBody controls whether the response body should be restored after having been read.

func DecodeResendVerifyEmailResponse

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

DecodeResendVerifyEmailResponse returns a decoder for responses returned by the user resend-verify-email endpoint. restoreBody controls whether the response body should be restored after having been read.

func DecodeUpdatePhoneResponse

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

DecodeUpdatePhoneResponse returns a decoder for responses returned by the user update-phone endpoint. restoreBody controls whether the response body should be restored after having been read.

func DecodeUpdateUserResponse

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

DecodeUpdateUserResponse returns a decoder for responses returned by the user update-user endpoint. restoreBody controls whether the response body should be restored after having been read.

func DecodeValidateEmailResponse

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

DecodeValidateEmailResponse returns a decoder for responses returned by the user validate-email endpoint. restoreBody controls whether the response body should be restored after having been read.

func DecodeVerifyPhoneResponse

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

DecodeVerifyPhoneResponse returns a decoder for responses returned by the user verify-phone endpoint. restoreBody controls whether the response body should be restored after having been read.

func EncodeDeactivateRequest

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

EncodeDeactivateRequest returns an encoder for requests sent to the user deactivate server.

func EncodeGetAuthsRequest

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

EncodeGetAuthsRequest returns an encoder for requests sent to the user getAuths server.

func EncodeGetUserRequest

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

EncodeGetUserRequest returns an encoder for requests sent to the user getUser server.

func EncodeResendOtpRequest

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

EncodeResendOtpRequest returns an encoder for requests sent to the user resend-otp server.

func EncodeResendVerifyEmailRequest

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

EncodeResendVerifyEmailRequest returns an encoder for requests sent to the user resend-verify-email server.

func EncodeUpdatePhoneRequest

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

EncodeUpdatePhoneRequest returns an encoder for requests sent to the user update-phone server.

func EncodeUpdateUserRequest

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

EncodeUpdateUserRequest returns an encoder for requests sent to the user update-user server.

func EncodeValidateEmailRequest

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

EncodeValidateEmailRequest returns an encoder for requests sent to the user validate-email server.

func EncodeVerifyPhoneRequest

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

EncodeVerifyPhoneRequest returns an encoder for requests sent to the user verify-phone server.

func GetAuthsUserPath

func GetAuthsUserPath() string

GetAuthsUserPath returns the URL path to the user service getAuths HTTP endpoint.

func GetUserUserPath

func GetUserUserPath() string

GetUserUserPath returns the URL path to the user service getUser HTTP endpoint.

func NewGetAuthsAuthStatusMediaOK

func NewGetAuthsAuthStatusMediaOK(body *GetAuthsResponseBody) *userviews.AuthStatusMediaView

NewGetAuthsAuthStatusMediaOK builds a "user" service "getAuths" endpoint result from a HTTP "OK" response.

func NewGetUserUserMediaOK

func NewGetUserUserMediaOK(body *GetUserResponseBody) *userviews.UserMediaView

NewGetUserUserMediaOK builds a "user" service "getUser" endpoint result from a HTTP "OK" response.

func NewUpdateUserUserMediaOK

func NewUpdateUserUserMediaOK(body *UpdateUserResponseBody) *userviews.UserMediaView

NewUpdateUserUserMediaOK builds a "user" service "update-user" endpoint result from a HTTP "OK" response.

func ResendOtpUserPath

func ResendOtpUserPath() string

ResendOtpUserPath returns the URL path to the user service resend-otp HTTP endpoint.

func ResendVerifyEmailUserPath

func ResendVerifyEmailUserPath() string

ResendVerifyEmailUserPath returns the URL path to the user service resend-verify-email HTTP endpoint.

func UpdatePhoneUserPath

func UpdatePhoneUserPath() string

UpdatePhoneUserPath returns the URL path to the user service update-phone HTTP endpoint.

func UpdateUserUserPath

func UpdateUserUserPath() string

UpdateUserUserPath returns the URL path to the user service update-user HTTP endpoint.

func ValidateEmailUserPath

func ValidateEmailUserPath(validateID string) string

ValidateEmailUserPath returns the URL path to the user service validate-email HTTP endpoint.

func VerifyPhoneUserPath

func VerifyPhoneUserPath() string

VerifyPhoneUserPath returns the URL path to the user service verify-phone HTTP endpoint.

Types

type Client

type Client struct {
	// GetAuths Doer is the HTTP client used to make requests to the getAuths
	// endpoint.
	GetAuthsDoer goahttp.Doer

	// Deactivate Doer is the HTTP client used to make requests to the deactivate
	// endpoint.
	DeactivateDoer goahttp.Doer

	// GetUser Doer is the HTTP client used to make requests to the getUser
	// endpoint.
	GetUserDoer goahttp.Doer

	// ValidateEmail Doer is the HTTP client used to make requests to the
	// validate-email endpoint.
	ValidateEmailDoer goahttp.Doer

	// UpdateUser Doer is the HTTP client used to make requests to the update-user
	// endpoint.
	UpdateUserDoer goahttp.Doer

	// ResendVerifyEmail Doer is the HTTP client used to make requests to the
	// resend-verify-email endpoint.
	ResendVerifyEmailDoer goahttp.Doer

	// UpdatePhone Doer is the HTTP client used to make requests to the
	// update-phone endpoint.
	UpdatePhoneDoer goahttp.Doer

	// ResendOtp Doer is the HTTP client used to make requests to the resend-otp
	// endpoint.
	ResendOtpDoer goahttp.Doer

	// VerifyPhone Doer is the HTTP client used to make requests to the
	// verify-phone endpoint.
	VerifyPhoneDoer 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 user 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 user service servers.

func (*Client) BuildDeactivateRequest

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

BuildDeactivateRequest instantiates a HTTP request object with method and path set to call the "user" service "deactivate" endpoint

func (*Client) BuildGetAuthsRequest

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

BuildGetAuthsRequest instantiates a HTTP request object with method and path set to call the "user" service "getAuths" endpoint

func (*Client) BuildGetUserRequest

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

BuildGetUserRequest instantiates a HTTP request object with method and path set to call the "user" service "getUser" endpoint

func (*Client) BuildResendOtpRequest

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

BuildResendOtpRequest instantiates a HTTP request object with method and path set to call the "user" service "resend-otp" endpoint

func (*Client) BuildResendVerifyEmailRequest

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

BuildResendVerifyEmailRequest instantiates a HTTP request object with method and path set to call the "user" service "resend-verify-email" endpoint

func (*Client) BuildUpdatePhoneRequest

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

BuildUpdatePhoneRequest instantiates a HTTP request object with method and path set to call the "user" service "update-phone" endpoint

func (*Client) BuildUpdateUserRequest

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

BuildUpdateUserRequest instantiates a HTTP request object with method and path set to call the "user" service "update-user" endpoint

func (*Client) BuildValidateEmailRequest

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

BuildValidateEmailRequest instantiates a HTTP request object with method and path set to call the "user" service "validate-email" endpoint

func (*Client) BuildVerifyPhoneRequest

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

BuildVerifyPhoneRequest instantiates a HTTP request object with method and path set to call the "user" service "verify-phone" endpoint

func (*Client) Deactivate

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

Deactivate returns an endpoint that makes HTTP requests to the user service deactivate server.

func (*Client) GetAuths

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

GetAuths returns an endpoint that makes HTTP requests to the user service getAuths server.

func (*Client) GetUser

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

GetUser returns an endpoint that makes HTTP requests to the user service getUser server.

func (*Client) ResendOtp

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

ResendOtp returns an endpoint that makes HTTP requests to the user service resend-otp server.

func (*Client) ResendVerifyEmail

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

ResendVerifyEmail returns an endpoint that makes HTTP requests to the user service resend-verify-email server.

func (*Client) UpdatePhone

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

UpdatePhone returns an endpoint that makes HTTP requests to the user service update-phone server.

func (*Client) UpdateUser

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

UpdateUser returns an endpoint that makes HTTP requests to the user service update-user server.

func (*Client) ValidateEmail

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

ValidateEmail returns an endpoint that makes HTTP requests to the user service validate-email server.

func (*Client) VerifyPhone

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

VerifyPhone returns an endpoint that makes HTTP requests to the user service verify-phone server.

type GetAuthsResponseBody

type GetAuthsResponseBody struct {
	// True if user has google Oauth signin
	Google *bool `form:"google,omitempty" json:"google,omitempty" xml:"google,omitempty"`
	// True if user has facebook Oauth signin
	Facebook *bool `form:"facebook,omitempty" json:"facebook,omitempty" xml:"facebook,omitempty"`
	// True if user has twitter Oauth signin
	Twitter *bool `form:"twitter,omitempty" json:"twitter,omitempty" xml:"twitter,omitempty"`
	// True if user has linkedin Oauth signin
	Linkedin *bool `form:"linkedin,omitempty" json:"linkedin,omitempty" xml:"linkedin,omitempty"`
	// True if user has microsoft Oauth signin
	Instagram *bool `form:"instagram,omitempty" json:"instagram,omitempty" xml:"instagram,omitempty"`
	// True if user has password signin
	Standard *bool `form:"standard,omitempty" json:"standard,omitempty" xml:"standard,omitempty"`
}

GetAuthsResponseBody is the type of the "user" service "getAuths" endpoint HTTP response body.

type GetUserResponseBody

type GetUserResponseBody 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"`
	Authorization    *string `form:"Authorization,omitempty" json:"Authorization,omitempty" xml:"Authorization,omitempty"`
	XSession         *string `form:"X-Session,omitempty" json:"X-Session,omitempty" xml:"X-Session,omitempty"`
}

GetUserResponseBody is the type of the "user" service "getUser" endpoint HTTP response body.

type UpdateUserRequestBody

type UpdateUserRequestBody struct {
	// 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"`
	CountryPhoneCode *string `form:"countryPhoneCode,omitempty" json:"countryPhoneCode,omitempty" xml:"countryPhoneCode,omitempty"`
}

UpdateUserRequestBody is the type of the "user" service "update-user" endpoint HTTP request body.

func NewUpdateUserRequestBody

func NewUpdateUserRequestBody(p *user.UserUpdateParams) *UpdateUserRequestBody

NewUpdateUserRequestBody builds the HTTP request body from the payload of the "update-user" endpoint of the "user" service.

type UpdateUserResponseBody

type UpdateUserResponseBody 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"`
	Authorization    *string `form:"Authorization,omitempty" json:"Authorization,omitempty" xml:"Authorization,omitempty"`
	XSession         *string `form:"X-Session,omitempty" json:"X-Session,omitempty" xml:"X-Session,omitempty"`
}

UpdateUserResponseBody is the type of the "user" service "update-user" endpoint HTTP response body.

Jump to

Keyboard shortcuts

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