client

package
v1.0.1-beta Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2018 License: Apache-2.0 Imports: 11 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetMyProfileUserProfilePath

func GetMyProfileUserProfilePath() string

GetMyProfileUserProfilePath computes a request path to the GetMyProfile action of userProfile.

func GetUserProfileUserProfilePath

func GetUserProfileUserProfilePath(userID string) string

GetUserProfileUserProfilePath computes a request path to the GetUserProfile action of userProfile.

func UpdateMyProfileUserProfilePath

func UpdateMyProfileUserProfilePath() string

UpdateMyProfileUserProfilePath computes a request path to the UpdateMyProfile action of userProfile.

func UpdateUserProfileUserProfilePath

func UpdateUserProfileUserProfilePath(userID string) string

UpdateUserProfileUserProfilePath computes a request path to the UpdateUserProfile action of userProfile.

Types

type Client

type Client struct {
	*goaclient.Client
	Encoder *goa.HTTPEncoder
	Decoder *goa.HTTPDecoder
}

Client is the user-profile service client.

func New

func New(c goaclient.Doer) *Client

New instantiates the client.

func (*Client) DecodeErrorResponse

func (c *Client) DecodeErrorResponse(resp *http.Response) (*goa.ErrorResponse, error)

DecodeErrorResponse decodes the ErrorResponse instance encoded in resp body.

func (*Client) DecodeUserProfile

func (c *Client) DecodeUserProfile(resp *http.Response) (*UserProfile, error)

DecodeUserProfile decodes the UserProfile instance encoded in resp body.

func (*Client) DownloadSwaggerJSON

func (c *Client) DownloadSwaggerJSON(ctx context.Context, dest string) (int64, error)

DownloadSwaggerJSON downloads swagger.json and writes it to the file dest. It returns the number of bytes downloaded in case of success.

func (*Client) DownloadSwaggerUI

func (c *Client) DownloadSwaggerUI(ctx context.Context, filename, dest string) (int64, error)

DownloadSwaggerUI downloads /files with the given filename and writes it to the file dest. It returns the number of bytes downloaded in case of success.

func (*Client) GetMyProfileUserProfile

func (c *Client) GetMyProfileUserProfile(ctx context.Context, path string) (*http.Response, error)

Get a UserProfile by UserID

func (*Client) GetUserProfileUserProfile

func (c *Client) GetUserProfileUserProfile(ctx context.Context, path string) (*http.Response, error)

Get a UserProfile by UserID

func (*Client) NewGetMyProfileUserProfileRequest

func (c *Client) NewGetMyProfileUserProfileRequest(ctx context.Context, path string) (*http.Request, error)

NewGetMyProfileUserProfileRequest create the request corresponding to the GetMyProfile action endpoint of the userProfile resource.

func (*Client) NewGetUserProfileUserProfileRequest

func (c *Client) NewGetUserProfileUserProfileRequest(ctx context.Context, path string) (*http.Request, error)

NewGetUserProfileUserProfileRequest create the request corresponding to the GetUserProfile action endpoint of the userProfile resource.

func (*Client) NewUpdateMyProfileUserProfileRequest

func (c *Client) NewUpdateMyProfileUserProfileRequest(ctx context.Context, path string, payload *UserProfilePayload, contentType string) (*http.Request, error)

NewUpdateMyProfileUserProfileRequest create the request corresponding to the UpdateMyProfile action endpoint of the userProfile resource.

func (*Client) NewUpdateUserProfileUserProfileRequest

func (c *Client) NewUpdateUserProfileUserProfileRequest(ctx context.Context, path string, payload *UserProfilePayload, contentType string) (*http.Request, error)

NewUpdateUserProfileUserProfileRequest create the request corresponding to the UpdateUserProfile action endpoint of the userProfile resource.

func (*Client) UpdateMyProfileUserProfile

func (c *Client) UpdateMyProfileUserProfile(ctx context.Context, path string, payload *UserProfilePayload, contentType string) (*http.Response, error)

Update my profile

func (*Client) UpdateUserProfileUserProfile

func (c *Client) UpdateUserProfileUserProfile(ctx context.Context, path string, payload *UserProfilePayload, contentType string) (*http.Response, error)

Update user profile

type UserProfile

type UserProfile struct {
	// User profile created timestamp
	CreatedOn int `form:"createdOn" json:"createdOn" yaml:"createdOn" xml:"createdOn"`
	// Email of user
	Email *string `form:"email,omitempty" json:"email,omitempty" yaml:"email,omitempty" xml:"email,omitempty"`
	// Full name of the user
	FullName *string `form:"fullName,omitempty" json:"fullName,omitempty" yaml:"fullName,omitempty" xml:"fullName,omitempty"`
	// Unique user ID
	UserID string `form:"userId" json:"userId" yaml:"userId" xml:"userId"`
}

userProfile media type (default view)

Identifier: application/microkubes.user-profile+json; view=default

func (*UserProfile) Validate

func (mt *UserProfile) Validate() (err error)

Validate validates the UserProfile media type instance.

type UserProfilePayload

type UserProfilePayload struct {
	// Email of user
	Email string `form:"email" json:"email" yaml:"email" xml:"email"`
	// Full name of the user
	FullName string `form:"fullName" json:"fullName" yaml:"fullName" xml:"fullName"`
}

UserProfile data

func (*UserProfilePayload) Validate

func (ut *UserProfilePayload) Validate() (err error)

Validate validates the UserProfilePayload type instance.

Jump to

Keyboard shortcuts

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