client

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2020 License: Apache-2.0 Imports: 11 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindUserProfileUserProfilePath added in v1.1.2

func FindUserProfileUserProfilePath() string

FindUserProfileUserProfilePath computes a request path to the FindUserProfile action of userProfile.

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) DecodeUserProfilePage added in v1.1.2

func (c *Client) DecodeUserProfilePage(resp *http.Response) (*UserProfilePage, error)

DecodeUserProfilePage decodes the UserProfilePage 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) FindUserProfileUserProfile added in v1.1.2

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

Find (filter) organizations by some filter.

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) NewFindUserProfileUserProfileRequest added in v1.1.2

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

NewFindUserProfileUserProfileRequest create the request corresponding to the FindUserProfile action endpoint of the userProfile resource.

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 FilterPayload added in v1.1.2

type FilterPayload struct {
	// Organizations filter.
	Filter []*FilterProperty `form:"filter,omitempty" json:"filter,omitempty" yaml:"filter,omitempty" xml:"filter,omitempty"`
	// Page number (1-based).
	Page int `form:"page" json:"page" yaml:"page" xml:"page"`
	// Items per page.
	PageSize int `form:"pageSize" json:"pageSize" yaml:"pageSize" xml:"pageSize"`
	// Sort specification.
	Sort *OrderSpec `form:"sort,omitempty" json:"sort,omitempty" yaml:"sort,omitempty" xml:"sort,omitempty"`
}

FilterPayload user type.

func (*FilterPayload) Validate added in v1.1.2

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

Validate validates the FilterPayload type instance.

type FilterProperty added in v1.1.2

type FilterProperty struct {
	// Property name
	Property string `form:"property" json:"property" yaml:"property" xml:"property"`
	// Property value to match
	Value string `form:"value" json:"value" yaml:"value" xml:"value"`
}

FilterProperty user type.

func (*FilterProperty) Validate added in v1.1.2

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

Validate validates the FilterProperty type instance.

type OrderSpec added in v1.1.2

type OrderSpec struct {
	// Sort order. Can be 'asc' or 'desc'.
	Direction string `form:"direction" json:"direction" yaml:"direction" xml:"direction"`
	// Sort by property
	Property string `form:"property" json:"property" yaml:"property" xml:"property"`
}

OrderSpec user type.

func (*OrderSpec) Validate added in v1.1.2

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

Validate validates the OrderSpec type instance.

type UserProfile

type UserProfile struct {
	// Company name
	Company *string `form:"company,omitempty" json:"company,omitempty" yaml:"company,omitempty" xml:"company,omitempty"`
	// Company registration number
	CompanyRegistrationNumber *string `` /* 170-byte string literal not displayed */
	// 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"`
	// Tax number
	TaxNumber *string `form:"taxNumber,omitempty" json:"taxNumber,omitempty" yaml:"taxNumber,omitempty" xml:"taxNumber,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 UserProfilePage added in v1.1.2

type UserProfilePage struct {
	// User profile list
	Items []*UserProfile `form:"items,omitempty" json:"items,omitempty" yaml:"items,omitempty" xml:"items,omitempty"`
	// Page number (1-based).
	Page *int `form:"page,omitempty" json:"page,omitempty" yaml:"page,omitempty" xml:"page,omitempty"`
	// Items per page.
	PageSize *int `form:"pageSize,omitempty" json:"pageSize,omitempty" yaml:"pageSize,omitempty" xml:"pageSize,omitempty"`
}

UserProfilePage media type (default view)

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

func (*UserProfilePage) Validate added in v1.1.2

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

Validate validates the UserProfilePage media type instance.

type UserProfilePayload

type UserProfilePayload struct {
	// Company name
	Company *string `form:"company,omitempty" json:"company,omitempty" yaml:"company,omitempty" xml:"company,omitempty"`
	// Company registration number
	CompanyRegistrationNumber *string `` /* 170-byte string literal not displayed */
	// 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"`
	// Tax number
	TaxNumber *string `form:"taxNumber,omitempty" json:"taxNumber,omitempty" yaml:"taxNumber,omitempty" xml:"taxNumber,omitempty"`
}

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