Documentation ¶
Index ¶
- func DecodeActivateDonorRequest(ctx context.Context, r *http.Request) (interface{}, error)
- func DecodeActivateRecipientRequest(ctx context.Context, r *http.Request) (interface{}, error)
- func DecodeCommentsRequest(ctx context.Context, r *http.Request) (interface{}, error)
- func DecodeCreateDonorRequest(ctx context.Context, r *http.Request) (interface{}, error)
- func DecodeCreateRecipientRequest(ctx context.Context, r *http.Request) (interface{}, error)
- func DecodeDeleteDonorRequest(ctx context.Context, r *http.Request) (interface{}, error)
- func DecodeDeleteRecipientRequest(ctx context.Context, r *http.Request) (interface{}, error)
- func DecodeEmptyRequest(ctx context.Context, r *http.Request) (interface{}, error)
- func DecodeProtectedEmptyRequest(ctx context.Context, r *http.Request) (interface{}, error)
- func DecodePublicDonorListRequest(ctx context.Context, r *http.Request) (interface{}, error)
- func DecodePublicDonorRequest(ctx context.Context, r *http.Request) (interface{}, error)
- func DecodePublicRecipientRequest(ctx context.Context, r *http.Request) (interface{}, error)
- func DecodeUpdateDonorRequest(ctx context.Context, r *http.Request) (interface{}, error)
- func DecodeUpdateRecipientRequest(ctx context.Context, r *http.Request) (interface{}, error)
- func DecodeUploaderRequest(ctx context.Context, r *http.Request) (interface{}, error)
- func DecodeVerifyDonorRequest(ctx context.Context, r *http.Request) (interface{}, error)
- func DecodeVerifyRecipientRequest(ctx context.Context, r *http.Request) (interface{}, error)
- func EncodeResponse(ctx context.Context, w http.ResponseWriter, response interface{}) error
- type ActivateDonorResquest
- type ActivateRecipientResquest
- type CommentsResquest
- type CreateDonorRequest
- type CreateDonorResponse
- type CreateRecipientRequest
- type CreateRecipientResponse
- type DeleteDonorResquest
- type DeleteRecipientResquest
- type GetDonorsRequest
- type GetDonorsResponse
- type GetRecipientsResponse
- type OkErrorResponse
- type PublicDonorResquest
- type PublicRecipientResquest
- type UpdateDonorRequest
- type UpdateDonorResponse
- type UpdateRecipientRequest
- type UpdateRecipientResponse
- type UploaderResponse
- type UploaderResquest
- type VerifyDonorResquest
- type VerifyRecipientResquest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeActivateDonorRequest ¶
DecodeActivateDonorRequest decode activate donor request
func DecodeActivateRecipientRequest ¶
DecodeActivateRecipientRequest decode activate recipient request
func DecodeCommentsRequest ¶
DecodeCommentsRequest decode create recipient request
func DecodeCreateDonorRequest ¶
DecodeCreateDonorRequest decode create donor request
func DecodeCreateRecipientRequest ¶
DecodeCreateRecipientRequest decode create recipient request
func DecodeDeleteDonorRequest ¶
DecodeDeleteDonorRequest decode delete donor request
func DecodeDeleteRecipientRequest ¶
DecodeDeleteRecipientRequest decode delete recipient request
func DecodeEmptyRequest ¶
DecodeEmptyRequest generic decoder for request with no parameteres, like GET /users
func DecodeProtectedEmptyRequest ¶
DecodeProtectedEmptyRequest generic decoder for request with no parameteres validating api-key
func DecodePublicDonorListRequest ¶
DecodePublicDonorListRequest decode public donor list request
func DecodePublicDonorRequest ¶
DecodePublicDonorRequest decode public donor request
func DecodePublicRecipientRequest ¶
DecodePublicRecipientRequest decode public recipient request
func DecodeUpdateDonorRequest ¶
DecodeUpdateDonorRequest decode update donor request
func DecodeUpdateRecipientRequest ¶
DecodeUpdateRecipientRequest decode update recipient request
func DecodeUploaderRequest ¶
DecodeUploaderRequest decode uploader request
func DecodeVerifyDonorRequest ¶
DecodeVerifyDonorRequest decode verify donor request
func DecodeVerifyRecipientRequest ¶
DecodeVerifyRecipientRequest decode verify recipient request
func EncodeResponse ¶
func EncodeResponse(ctx context.Context, w http.ResponseWriter, response interface{}) error
EncodeResponse generic encoder
Types ¶
type ActivateDonorResquest ¶
type ActivateDonorResquest struct {
ID int64 `json:"id,omitempty"`
}
ActivateDonorResquest activate donor request
type ActivateRecipientResquest ¶
type ActivateRecipientResquest struct {
ID int64 `json:"id,omitempty"`
}
ActivateRecipientResquest activate recipient request
type CommentsResquest ¶
CommentsResquest uploader request
type CreateDonorRequest ¶
CreateDonorRequest create donor request
type CreateDonorResponse ¶
CreateDonorResponse create donor response
type CreateRecipientRequest ¶
CreateRecipientRequest create recipient request
type CreateRecipientResponse ¶
CreateRecipientResponse create recipient response
type DeleteDonorResquest ¶
type DeleteDonorResquest struct { ID int64 `json:"id,omitempty"` Answer bool `json:"answer"` Comment string `json:"comment"` }
DeleteDonorResquest delete donor request
type DeleteRecipientResquest ¶
type DeleteRecipientResquest struct { ID int64 `json:"id,omitempty"` Answer bool `json:"answer"` Comment string `json:"comment"` }
DeleteRecipientResquest delete recipient request
type GetDonorsRequest ¶
GetDonorsRequest recipient list request
type GetDonorsResponse ¶
type GetDonorsResponse struct { Donors []entities.Donor `json:"donors"` Total int64 `json:"total_records"` Err error `json:"error,omitempty"` }
GetDonorsResponse Get a list of donors
type GetRecipientsResponse ¶
type GetRecipientsResponse struct { Recipients []entities.Recipient `json:"recipients"` Err error `json:"error,omitempty"` }
GetRecipientsResponse Get a list of recipients
type OkErrorResponse ¶
OkErrorResponse Empty response, just OK or Error
type PublicDonorResquest ¶
PublicDonorResquest public donor request
type PublicRecipientResquest ¶
PublicRecipientResquest public recipient request
type UpdateDonorRequest ¶
UpdateDonorRequest update donor request
type UpdateDonorResponse ¶
type UpdateDonorResponse struct { Donor entities.Donor `json:"donor"` Err error `json:"error,omitempty"` }
UpdateDonorResponse create donor request
type UpdateRecipientRequest ¶
UpdateRecipientRequest update recipient request
type UpdateRecipientResponse ¶
type UpdateRecipientResponse struct { Recipient entities.Recipient `json:"recipient"` Err error `json:"error,omitempty"` }
UpdateRecipientResponse create recipient request
type UploaderResponse ¶
type UploaderResponse struct { Filename string `json:"filename"` Err error `json:"error,omitempty"` }
UploaderResponse uploader request
type UploaderResquest ¶
type UploaderResquest struct {
Filename string `json:"filename"`
}
UploaderResquest uploader request
type VerifyDonorResquest ¶
VerifyDonorResquest vefiry donor request
type VerifyRecipientResquest ¶
type VerifyRecipientResquest struct { ID int64 `json:"id,omitempty"` Verified bool `json:"verified"` }
VerifyRecipientResquest vefiry recipient request