go_api_controller

package module
v0.0.0-...-5b54438 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2019 License: GPL-3.0 Imports: 1 Imported by: 0

README

go-api-controller

This repository is used for the NanoHost backend APIs. Currently it is likely redundant, but we made it an extra project, so we can easily add new features to it, without making the backend project too confusing.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIController

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

APIController holds all the information about an API management controller

func NewController

func NewController() *APIController

NewController creates a new API management controller

func (*APIController) DestroyPath

func (controller *APIController) DestroyPath(path string)

DestroyPath destroys a registered path

func (*APIController) Handle404

func (controller *APIController) Handle404(handler func(ctx *fasthttp.RequestCtx))

Handle404 handles all 404 requests

func (*APIController) HandleFastHTTP

func (controller *APIController) HandleFastHTTP(ctx *fasthttp.RequestCtx)

HandleFastHTTP is the request handler for the fasthttp package

func (*APIController) HandlePath

func (controller *APIController) HandlePath(path string, handler func(ctx *fasthttp.RequestCtx))

HandlePath handles a new API path

Jump to

Keyboard shortcuts

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