webserver

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2023 License: MIT Imports: 8 Imported by: 5

Documentation

Index

Constants

View Source
const (
	CONTENT_TYPE      = "Content-Type"
	CONTENT_TYPE_JSON = "application/json"
	AUTHORIZATION     = "Authorization"
)

Variables

View Source
var Name string

Functions

func ErrorResponse added in v0.4.2

func ErrorResponse(c *gin.Context, message string, httpStatusCode int)

func GetAuthHeader added in v0.4.2

func GetAuthHeader(c *gin.Context) (header string)

func UnmarshalBody added in v0.4.2

func UnmarshalBody[bodyT any](c *gin.Context) (v bodyT, err error)

Types

type Server

type Server struct {
	API *gin.RouterGroup
	// contains filtered or unexported fields
}

func Init

func Init() *Server

func (Server) Run

func (s Server) Run()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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