Documentation ¶
Index ¶
- Variables
- func BuildHeap(w http.ResponseWriter, r *http.Request)
- func CheckError(err error)
- func CheckHttpError(w *http.ResponseWriter, err error)
- func Get(w http.ResponseWriter, r *http.Request)
- func GetBirthDate(w http.ResponseWriter, r *http.Request)
- func GetName(w http.ResponseWriter, r *http.Request)
- func GetRequestFromBody(r *http.Request) ([]byte, error)
- func HeapSort(w http.ResponseWriter, r *http.Request)
- func SetupResponse(w *http.ResponseWriter)
- func WriteJsonToResponse(w http.ResponseWriter, body interface{})
- type HeapApiRequest
- type HeapApiResponse
- type HeapSortApiResponse
Constants ¶
This section is empty.
Variables ¶
var Log = log.Logger
Functions ¶
func BuildHeap ¶
func BuildHeap(w http.ResponseWriter, r *http.Request)
HeapBuild godoc @Summary Build a Heap from an int array. @Description Builds heap from int array, returns original array and built array @Accept json @Produce json @Param data body HeapApiRequest true "Input todo struct" @Success 200 {object} HeapApiResponse @Router /heap/build [post]
func CheckError ¶
func CheckError(err error)
func CheckHttpError ¶
func CheckHttpError(w *http.ResponseWriter, err error)
func Get ¶
func Get(w http.ResponseWriter, r *http.Request)
About godoc @Summary Fetches Information About me. @Description Fetches Information About me. @Produce json @Success 200 {object} nosql.Info @Router /about [get]
func GetBirthDate ¶
func GetBirthDate(w http.ResponseWriter, r *http.Request)
About godoc @Summary Fetches my birthday. @Description Fetches my birthday. @Produce json @Success 200 {object} int @Router /about/birthday [get]
func GetName ¶
func GetName(w http.ResponseWriter, r *http.Request)
About godoc @Summary Fetches my name. @Description Fetches my name. @Produce json @Success 200 {object} nosql.Name_t @Router /about/name [get]
func HeapSort ¶
func HeapSort(w http.ResponseWriter, r *http.Request)
HeapSort godoc @Summary Sort an int array using Heap Sort Algorithm @Description Sorts an unsorted int array, returns unordered and ordered array. @Accept json @Produce json @Param data body HeapApiRequest true "Input todo struct" @Success 200 {object} HeapSortApiResponse @Router /heap/sort [post]
func SetupResponse ¶
func SetupResponse(w *http.ResponseWriter)
func WriteJsonToResponse ¶
func WriteJsonToResponse(w http.ResponseWriter, body interface{})
Types ¶
type HeapApiRequest ¶
type HeapApiRequest struct {
Array []int
}