govader_backend

package module
v0.1.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 8, 2022 License: MIT Imports: 4 Imported by: 0

README

Govader Backend Package

Go Reference Go Report Card codecov

Govader-Backend is based on GoVader Packagehttps://github.com/jonreiter/govader

Usage:

go get github.com/PIMPfiction/govader_backend
package main

import (
	"github.com/PIMPfiction/govader_backend"
	echo "github.com/labstack/echo/v4"
	"fmt"
)

func main() {
	e := echo.New()
	err := Serve(e, "8080")
	if err != nil {
		panic(err)
	}
	fmt.Scanln()

}

Sample Get Request
GET: http://localhost:8080?text=I%20am%20looking%20good
Sample Post Request
POST: http://localhost:8080/
RequestBody: {"text": "I am looking good"}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Serve

func Serve(e *echo.Echo, portNumber string) error

Types

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

func (Handler) HandleGetRequest

func (h Handler) HandleGetRequest(c echo.Context) error

func (Handler) HandleHealthCheck added in v0.1.4

func (h Handler) HandleHealthCheck(c echo.Context) error

func (Handler) HandlePostRequest

func (h Handler) HandlePostRequest(c echo.Context) error

type RequestType

type RequestType struct {
	Text string `json:"text"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL