Documentation ¶
Overview ¶
Package rest implement the callback required by the profile package
Package rest implement the callback required by the profile package
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type RequestDTO ¶
type RequestDTO struct { PublicId string `json:"profile_id" binding:"required,min=16"` FirstName string `json:"first_name" binding:"required,min=2"` LastName string `json:"last_name" binding:"required,min=2"` ProfilePictureUrl string `json:"profile_picture_url" binding:"required,url"` Birthday string `json:"birthday" binding:"required,min=10"` }
RequestDTO is the object to map JSON request body
type RequestDTOCreation ¶
type RequestDTOCreation struct { PublicId string `json:"profile_id"` FirstName string `json:"first_name" binding:"required,min=2"` LastName string `json:"last_name" binding:"required,min=2"` Email string `json:"email" binding:"required,email"` ProfilePictureUrl string `json:"profile_picture_url"` Birthday string `json:"birthday" binding:"required,min=10"` }
RequestDTOCreation is the object to map JSON request body of a profile creation request
type ResponseDTO ¶
type ResponseDTO struct { PublicId string `json:"profile_id"` FirstName string `json:"first_name"` LastName string `json:"last_name"` Email string `json:"email"` ProfilePictureUrl string `json:"profile_picture_url"` Birthday string `json:"birthday"` OrderAmount uint `json:"order_amount"` }
ResponseDTO is the object to map JSON response body
type ResponseDTOUserInfo ¶
ResponseDTOUserInfo is the object to map JSON response body when requesting basic user info
type ServiceInterface ¶
type ServiceInterface interface { GetResourceOwnerId(email string) uint Add(creation RequestDTOCreation) (ResponseDTO, *servicehelper.Error) Retrieve(string) (ResponseDTO, *servicehelper.Error) Edit(RequestDTO) (ResponseDTO, *servicehelper.Error) Remove(string) *servicehelper.Error IsThatTheUserId(string, uint) (bool, *servicehelper.Error) }
ServiceInterface is the model for the service package of profile
Click to show internal directories.
Click to hide internal directories.