Documentation ¶
Index ¶
- func CreateUserPath() string
- func FindByEmailUserPath() string
- func FindUserPath() string
- func FindUsersUserPath() string
- func ForgotPasswordUpdateUserPath() string
- func ForgotPasswordUserPath() string
- func GetAllUserPath() string
- func GetMeUserPath() string
- func GetUserPath(userID string) string
- func ResetVerificationTokenUserPath() string
- func UpdateUserPath(userID string) string
- func VerifyUserPath() string
- type Client
- func (c *Client) CreateUser(ctx context.Context, path string, payload *CreateUserPayload, ...) (*http.Response, error)
- func (c *Client) DecodeErrorResponse(resp *http.Response) (*goa.ErrorResponse, error)
- func (c *Client) DecodeResetToken(resp *http.Response) (*ResetToken, error)
- func (c *Client) DecodeUsers(resp *http.Response) (*Users, error)
- func (c *Client) DecodeUsersPage(resp *http.Response) (*UsersPage, error)
- func (c *Client) DownloadSwaggerJSON(ctx context.Context, dest string) (int64, error)
- func (c *Client) DownloadSwaggerUI(ctx context.Context, filename, dest string) (int64, error)
- func (c *Client) FindByEmailUser(ctx context.Context, path string, payload *EmailPayload, contentType string) (*http.Response, error)
- func (c *Client) FindUser(ctx context.Context, path string, payload *Credentials, contentType string) (*http.Response, error)
- func (c *Client) FindUsersUser(ctx context.Context, path string, payload *FilterPayload, contentType string) (*http.Response, error)
- func (c *Client) ForgotPasswordUpdateUser(ctx context.Context, path string, payload *ForgotPasswordPayload, ...) (*http.Response, error)
- func (c *Client) ForgotPasswordUser(ctx context.Context, path string, payload *EmailPayload, contentType string) (*http.Response, error)
- func (c *Client) GetAllUser(ctx context.Context, path string, limit *int, offset *int, order *string, ...) (*http.Response, error)
- func (c *Client) GetMeUser(ctx context.Context, path string) (*http.Response, error)
- func (c *Client) GetUser(ctx context.Context, path string) (*http.Response, error)
- func (c *Client) NewCreateUserRequest(ctx context.Context, path string, payload *CreateUserPayload, ...) (*http.Request, error)
- func (c *Client) NewFindByEmailUserRequest(ctx context.Context, path string, payload *EmailPayload, contentType string) (*http.Request, error)
- func (c *Client) NewFindUserRequest(ctx context.Context, path string, payload *Credentials, contentType string) (*http.Request, error)
- func (c *Client) NewFindUsersUserRequest(ctx context.Context, path string, payload *FilterPayload, contentType string) (*http.Request, error)
- func (c *Client) NewForgotPasswordUpdateUserRequest(ctx context.Context, path string, payload *ForgotPasswordPayload, ...) (*http.Request, error)
- func (c *Client) NewForgotPasswordUserRequest(ctx context.Context, path string, payload *EmailPayload, contentType string) (*http.Request, error)
- func (c *Client) NewGetAllUserRequest(ctx context.Context, path string, limit *int, offset *int, order *string, ...) (*http.Request, error)
- func (c *Client) NewGetMeUserRequest(ctx context.Context, path string) (*http.Request, error)
- func (c *Client) NewGetUserRequest(ctx context.Context, path string) (*http.Request, error)
- func (c *Client) NewResetVerificationTokenUserRequest(ctx context.Context, path string, payload *EmailPayload, contentType string) (*http.Request, error)
- func (c *Client) NewUpdateUserRequest(ctx context.Context, path string, payload *UpdateUserPayload, ...) (*http.Request, error)
- func (c *Client) NewVerifyUserRequest(ctx context.Context, path string, token *string) (*http.Request, error)
- func (c *Client) ResetVerificationTokenUser(ctx context.Context, path string, payload *EmailPayload, contentType string) (*http.Response, error)
- func (c *Client) UpdateUser(ctx context.Context, path string, payload *UpdateUserPayload, ...) (*http.Response, error)
- func (c *Client) VerifyUser(ctx context.Context, path string, token *string) (*http.Response, error)
- type CreateUserPayload
- type Credentials
- type EmailPayload
- type FilterPayload
- type FilterProperty
- type ForgotPasswordPayload
- type OrderSpec
- type ResetToken
- type UpdateUserPayload
- type Users
- type UsersPage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateUserPath ¶
func CreateUserPath() string
CreateUserPath computes a request path to the create action of user.
func FindByEmailUserPath ¶
func FindByEmailUserPath() string
FindByEmailUserPath computes a request path to the findByEmail action of user.
func FindUserPath ¶
func FindUserPath() string
FindUserPath computes a request path to the find action of user.
func FindUsersUserPath ¶
func FindUsersUserPath() string
FindUsersUserPath computes a request path to the findUsers action of user.
func ForgotPasswordUpdateUserPath ¶
func ForgotPasswordUpdateUserPath() string
ForgotPasswordUpdateUserPath computes a request path to the forgotPasswordUpdate action of user.
func ForgotPasswordUserPath ¶
func ForgotPasswordUserPath() string
ForgotPasswordUserPath computes a request path to the forgotPassword action of user.
func GetAllUserPath ¶
func GetAllUserPath() string
GetAllUserPath computes a request path to the getAll action of user.
func GetMeUserPath ¶
func GetMeUserPath() string
GetMeUserPath computes a request path to the getMe action of user.
func GetUserPath ¶
GetUserPath computes a request path to the get action of user.
func ResetVerificationTokenUserPath ¶
func ResetVerificationTokenUserPath() string
ResetVerificationTokenUserPath computes a request path to the resetVerificationToken action of user.
func UpdateUserPath ¶
UpdateUserPath computes a request path to the update action of user.
func VerifyUserPath ¶
func VerifyUserPath() string
VerifyUserPath computes a request path to the verify action of user.
Types ¶
type Client ¶
type Client struct { *goaclient.Client Encoder *goa.HTTPEncoder Decoder *goa.HTTPDecoder }
Client is the user service client.
func (*Client) CreateUser ¶
func (c *Client) CreateUser(ctx context.Context, path string, payload *CreateUserPayload, contentType string) (*http.Response, error)
Creates user
func (*Client) DecodeErrorResponse ¶
DecodeErrorResponse decodes the ErrorResponse instance encoded in resp body.
func (*Client) DecodeResetToken ¶
func (c *Client) DecodeResetToken(resp *http.Response) (*ResetToken, error)
DecodeResetToken decodes the ResetToken instance encoded in resp body.
func (*Client) DecodeUsers ¶
DecodeUsers decodes the Users instance encoded in resp body.
func (*Client) DecodeUsersPage ¶
DecodeUsersPage decodes the UsersPage instance encoded in resp body.
func (*Client) DownloadSwaggerJSON ¶
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 ¶
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) FindByEmailUser ¶
func (c *Client) FindByEmailUser(ctx context.Context, path string, payload *EmailPayload, contentType string) (*http.Response, error)
Find a user by email
func (*Client) FindUser ¶
func (c *Client) FindUser(ctx context.Context, path string, payload *Credentials, contentType string) (*http.Response, error)
Find a user by email+password
func (*Client) FindUsersUser ¶
func (c *Client) FindUsersUser(ctx context.Context, path string, payload *FilterPayload, contentType string) (*http.Response, error)
Find (filter) users by some filter.
func (*Client) ForgotPasswordUpdateUser ¶
func (c *Client) ForgotPasswordUpdateUser(ctx context.Context, path string, payload *ForgotPasswordPayload, contentType string) (*http.Response, error)
Password token validation & password update
func (*Client) ForgotPasswordUser ¶
func (c *Client) ForgotPasswordUser(ctx context.Context, path string, payload *EmailPayload, contentType string) (*http.Response, error)
Forgot password action (sending email to user with link for resseting password)
func (*Client) GetAllUser ¶
func (c *Client) GetAllUser(ctx context.Context, path string, limit *int, offset *int, order *string, sorting *string) (*http.Response, error)
Retrieves all active users
func (*Client) NewCreateUserRequest ¶
func (c *Client) NewCreateUserRequest(ctx context.Context, path string, payload *CreateUserPayload, contentType string) (*http.Request, error)
NewCreateUserRequest create the request corresponding to the create action endpoint of the user resource.
func (*Client) NewFindByEmailUserRequest ¶
func (c *Client) NewFindByEmailUserRequest(ctx context.Context, path string, payload *EmailPayload, contentType string) (*http.Request, error)
NewFindByEmailUserRequest create the request corresponding to the findByEmail action endpoint of the user resource.
func (*Client) NewFindUserRequest ¶
func (c *Client) NewFindUserRequest(ctx context.Context, path string, payload *Credentials, contentType string) (*http.Request, error)
NewFindUserRequest create the request corresponding to the find action endpoint of the user resource.
func (*Client) NewFindUsersUserRequest ¶
func (c *Client) NewFindUsersUserRequest(ctx context.Context, path string, payload *FilterPayload, contentType string) (*http.Request, error)
NewFindUsersUserRequest create the request corresponding to the findUsers action endpoint of the user resource.
func (*Client) NewForgotPasswordUpdateUserRequest ¶
func (c *Client) NewForgotPasswordUpdateUserRequest(ctx context.Context, path string, payload *ForgotPasswordPayload, contentType string) (*http.Request, error)
NewForgotPasswordUpdateUserRequest create the request corresponding to the forgotPasswordUpdate action endpoint of the user resource.
func (*Client) NewForgotPasswordUserRequest ¶
func (c *Client) NewForgotPasswordUserRequest(ctx context.Context, path string, payload *EmailPayload, contentType string) (*http.Request, error)
NewForgotPasswordUserRequest create the request corresponding to the forgotPassword action endpoint of the user resource.
func (*Client) NewGetAllUserRequest ¶
func (c *Client) NewGetAllUserRequest(ctx context.Context, path string, limit *int, offset *int, order *string, sorting *string) (*http.Request, error)
NewGetAllUserRequest create the request corresponding to the getAll action endpoint of the user resource.
func (*Client) NewGetMeUserRequest ¶
NewGetMeUserRequest create the request corresponding to the getMe action endpoint of the user resource.
func (*Client) NewGetUserRequest ¶
NewGetUserRequest create the request corresponding to the get action endpoint of the user resource.
func (*Client) NewResetVerificationTokenUserRequest ¶
func (c *Client) NewResetVerificationTokenUserRequest(ctx context.Context, path string, payload *EmailPayload, contentType string) (*http.Request, error)
NewResetVerificationTokenUserRequest create the request corresponding to the resetVerificationToken action endpoint of the user resource.
func (*Client) NewUpdateUserRequest ¶
func (c *Client) NewUpdateUserRequest(ctx context.Context, path string, payload *UpdateUserPayload, contentType string) (*http.Request, error)
NewUpdateUserRequest create the request corresponding to the update action endpoint of the user resource.
func (*Client) NewVerifyUserRequest ¶
func (c *Client) NewVerifyUserRequest(ctx context.Context, path string, token *string) (*http.Request, error)
NewVerifyUserRequest create the request corresponding to the verify action endpoint of the user resource.
func (*Client) ResetVerificationTokenUser ¶
func (c *Client) ResetVerificationTokenUser(ctx context.Context, path string, payload *EmailPayload, contentType string) (*http.Response, error)
Reset verification token
type CreateUserPayload ¶
type CreateUserPayload struct { // Status of user account Active bool `form:"active" json:"active" yaml:"active" xml:"active"` // Email of user Email string `form:"email" json:"email" yaml:"email" xml:"email"` // External id of user ExternalID *string `form:"externalId,omitempty" json:"externalId,omitempty" yaml:"externalId,omitempty" xml:"externalId,omitempty"` // List of namespaces this user belongs to Namespaces []string `form:"namespaces,omitempty" json:"namespaces,omitempty" yaml:"namespaces,omitempty" xml:"namespaces,omitempty"` // List of organizations to which this user belongs to Organizations []string `form:"organizations,omitempty" json:"organizations,omitempty" yaml:"organizations,omitempty" xml:"organizations,omitempty"` // Password of user Password *string `form:"password,omitempty" json:"password,omitempty" yaml:"password,omitempty" xml:"password,omitempty"` // Roles of user Roles []string `form:"roles,omitempty" json:"roles,omitempty" yaml:"roles,omitempty" xml:"roles,omitempty"` // Token for email verification Token *string `form:"token,omitempty" json:"token,omitempty" yaml:"token,omitempty" xml:"token,omitempty"` }
CreateUserPayload
func (*CreateUserPayload) Validate ¶
func (ut *CreateUserPayload) Validate() (err error)
Validate validates the CreateUserPayload type instance.
type Credentials ¶
type Credentials struct { // Email of user Email string `form:"email" json:"email" yaml:"email" xml:"email"` // Password of user Password string `form:"password" json:"password" yaml:"password" xml:"password"` }
Email and password credentials
func (*Credentials) Validate ¶
func (ut *Credentials) Validate() (err error)
Validate validates the Credentials type instance.
type EmailPayload ¶
type EmailPayload struct { // Email of user Email string `form:"email" json:"email" yaml:"email" xml:"email"` }
Email payload
func (*EmailPayload) Validate ¶
func (ut *EmailPayload) Validate() (err error)
Validate validates the EmailPayload type instance.
type FilterPayload ¶
type FilterPayload struct { // Users 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 ¶
func (ut *FilterPayload) Validate() (err error)
Validate validates the FilterPayload type instance.
type FilterProperty ¶
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 ¶
func (ut *FilterProperty) Validate() (err error)
Validate validates the FilterProperty type instance.
type ForgotPasswordPayload ¶
type ForgotPasswordPayload struct { // Email of the user Email *string `form:"email,omitempty" json:"email,omitempty" yaml:"email,omitempty" xml:"email,omitempty"` // New password Password string `form:"password" json:"password" yaml:"password" xml:"password"` // Forgot password token Token string `form:"token" json:"token" yaml:"token" xml:"token"` }
Password Reset payload
func (*ForgotPasswordPayload) Validate ¶
func (ut *ForgotPasswordPayload) Validate() (err error)
Validate validates the ForgotPasswordPayload type instance.
type OrderSpec ¶
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.
type ResetToken ¶
type ResetToken struct { // User email Email string `form:"email" json:"email" yaml:"email" xml:"email"` // User ID ID string `form:"id" json:"id" yaml:"id" xml:"id"` // New token Token string `form:"token" json:"token" yaml:"token" xml:"token"` }
ResetToken media type (default view)
Identifier: resettokenmedia; view=default
func (*ResetToken) Validate ¶
func (mt *ResetToken) Validate() (err error)
Validate validates the ResetToken media type instance.
type UpdateUserPayload ¶
type UpdateUserPayload struct { // Status of user account Active bool `form:"active" json:"active" yaml:"active" xml:"active"` // Email of user Email *string `form:"email,omitempty" json:"email,omitempty" yaml:"email,omitempty" xml:"email,omitempty"` // External id of user ExternalID *string `form:"externalId,omitempty" json:"externalId,omitempty" yaml:"externalId,omitempty" xml:"externalId,omitempty"` // List of namespaces this user belongs to Namespaces []string `form:"namespaces,omitempty" json:"namespaces,omitempty" yaml:"namespaces,omitempty" xml:"namespaces,omitempty"` // List of organizations to which this user belongs to Organizations []string `form:"organizations,omitempty" json:"organizations,omitempty" yaml:"organizations,omitempty" xml:"organizations,omitempty"` // Password of user Password *string `form:"password,omitempty" json:"password,omitempty" yaml:"password,omitempty" xml:"password,omitempty"` // Roles of user Roles []string `form:"roles,omitempty" json:"roles,omitempty" yaml:"roles,omitempty" xml:"roles,omitempty"` // Token for email verification Token *string `form:"token,omitempty" json:"token,omitempty" yaml:"token,omitempty" xml:"token,omitempty"` }
UpdateUserPayload
func (*UpdateUserPayload) Validate ¶
func (ut *UpdateUserPayload) Validate() (err error)
Validate validates the UpdateUserPayload type instance.
type Users ¶
type Users struct { // Status of user account Active bool `form:"active" json:"active" yaml:"active" xml:"active"` // Email of user Email string `form:"email" json:"email" yaml:"email" xml:"email"` // External id of user ExternalID string `form:"externalId" json:"externalId" yaml:"externalId" xml:"externalId"` // Unique user ID ID string `form:"id" json:"id" yaml:"id" xml:"id"` // List of namespaces this user belongs to Namespaces []string `form:"namespaces,omitempty" json:"namespaces,omitempty" yaml:"namespaces,omitempty" xml:"namespaces,omitempty"` // List of organizations to which this user belongs to Organizations []string `form:"organizations,omitempty" json:"organizations,omitempty" yaml:"organizations,omitempty" xml:"organizations,omitempty"` // Roles of user Roles []string `form:"roles" json:"roles" yaml:"roles" xml:"roles"` }
users media type (default view)
Identifier: application/vnd.goa.user+json; view=default
type UsersPage ¶
type UsersPage struct { // Users list Items []*Users `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"` }
UsersPage media type (default view)
Identifier: application/mt.ckan.users-page+json; view=default