controllers

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseController added in v0.3.0

type BaseController struct {
	Resource models.BaseResource

	// Used for nested controllers
	PreviousController          *BaseController
	PreviousControllerIdMapping string // A string containing the name of the field in the current controller's resource that relates it to the previous controller's resource

	Variable string
}

func New added in v0.3.0

func New(resource models.BaseResource, previous_controller *BaseController, previous_controller_id_mapping string) BaseController

func (BaseController) AddToRouter added in v0.3.0

func (controller BaseController) AddToRouter(router *http.ServeMux)

func (BaseController) Delete added in v0.3.0

func (controller BaseController) Delete() http.Handler

func (BaseController) Get added in v0.3.0

func (controller BaseController) Get() http.Handler

func (BaseController) GetAll added in v0.3.0

func (controller BaseController) GetAll() http.Handler

func (BaseController) Patch added in v0.3.0

func (controller BaseController) Patch() http.Handler

func (BaseController) Post added in v0.3.0

func (controller BaseController) Post() http.Handler

type Controller added in v0.3.0

type Controller interface {
	GetAll() http.Handler
	Post() http.Handler
	Get() http.Handler
	Patch() http.Handler
	Delete() http.Handler

	AddToRouter(router *http.ServeMux)
}

Jump to

Keyboard shortcuts

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