api

package
v1.9.3 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Logger

func Logger() gin.HandlerFunc

Logger is a generic logger for gin

func RequireAPIkey

func RequireAPIkey(apikey string) gin.HandlerFunc

RequireAPIkey is a middleware that requires the given api key to be present in the headers authorization field.

func RequireCalendarSecret

func RequireCalendarSecret() gin.HandlerFunc

RequireCalendarSecret is a middleware that requires the calendar secret to be set as a query parameter.

func RequireID2InURI added in v1.8.4

func RequireID2InURI() gin.HandlerFunc

RequireID2InURI returns a Gin middleware which requires an ID2 of the type uint to be supplied in the URI of the request.

func RequireIDInURI

func RequireIDInURI() gin.HandlerFunc

RequireIDInURI returns a Gin middleware which requires an ID of the type uint to be supplied in the URI of the request.

func RequireStringIDInURI

func RequireStringIDInURI() gin.HandlerFunc

RequireStringIDInURI returns a Gin middleware which requires an ID of the type string to be supplied in the URI of the request.

Types

type Handler added in v1.9.0

type Handler struct {
	Calendar *handler.CalendarHandler
	Database *handler.DatabaseHandler
}

type Server

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

Server serves a http server

func NewServer

func NewServer(config *configuration.Webserver, handler *Handler) *Server

NewServer returns a new webserver

func (*Server) Start

func (server *Server) Start(debug bool) error

Start starts the http server

func (*Server) Stop added in v1.9.0

func (server *Server) Stop(ctx context.Context) error

Jump to

Keyboard shortcuts

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