Documentation ¶
Index ¶
- func DecodeBody(w http.ResponseWriter, r *http.Request, body interface{}) (err error)
- func DecodeJSONBody(w http.ResponseWriter, r *http.Request, dst interface{}) error
- func SendReadRequest(darkenresourceName string, endpoint string) string
- func SendWriteRequest(patch string, endpoint string) string
- type BodyRead
- type BodyWrite
- type MalformedRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeBody ¶
func DecodeBody(w http.ResponseWriter, r *http.Request, body interface{}) (err error)
use to decode a body for read access command (cat & ls & tree)
func DecodeJSONBody ¶
func DecodeJSONBody(w http.ResponseWriter, r *http.Request, dst interface{}) error
Use to mitigate the Decoder limitation (error handling ,etc)
func SendReadRequest ¶
Create a request for a read command (cat or ls or tree) and return the response body Errors are handled in the function
func SendWriteRequest ¶
Create a request for a write command (eg rm) and return the response body the body is a patch in json format which tells to ubac which ressource modified, removed or add Errors are handled in the function
Types ¶
type MalformedRequest ¶
func (*MalformedRequest) Error ¶
func (mr *MalformedRequest) Error() string
Click to show internal directories.
Click to hide internal directories.