handlers

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2022 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Overview

Package handlers manages the different versions of the API.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func APIMux

func APIMux(cfg APIMuxConfig, options ...func(opts *Options)) *web.App

APIMux constructs a fiber.Handler with all application routes defined.

func DebugMux

func DebugMux(build string, log *zap.SugaredLogger, db *sqlx.DB) http.Handler

DebugMux registers all the debug standard library routes and then custom debug application routes for the service. This bypassing the use of the DefaultServerMux. Using the DefaultServerMux would be a security risk since a dependency could inject a handler into our service without us knowing it.

func DebugStandardLibraryMux

func DebugStandardLibraryMux() *http.ServeMux

DebugStandardLibraryMux registers all the debug routes from the standard library into a new mux bypassing the use of the DefaultServerMux. Using the DefaultServerMux would be a security risk since a dependency could inject a handler into our service without us knowing it.

func WithCORS

func WithCORS(origin string) func(opts *Options)

WithCORS provides configuration options for CORS.

Types

type APIMuxConfig

type APIMuxConfig struct {
	Shutdown chan os.Signal
	Log      *zap.SugaredLogger
	Auth     *auth.Auth
	DB       *sqlx.DB
}

APIMuxConfig contains all the mandatory systems required by handlers.

type Options

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

Options represent optional parameters.

Directories

Path Synopsis
debug
checkgrp
Package checkgrp maintains the group of handlers for health checking.
Package checkgrp maintains the group of handlers for health checking.
v1
Package v1 contains the full set of handler functions and routes supported by the v1 web api.
Package v1 contains the full set of handler functions and routes supported by the v1 web api.
clientgrp
Package clientgrp maintains the group of handlers for group access.
Package clientgrp maintains the group of handlers for group access.
groupgrp
Package groupgrp maintains the group of handlers for group access.
Package groupgrp maintains the group of handlers for group access.
projectgrp
Package projectgrp maintains the group of handlers for project access.
Package projectgrp maintains the group of handlers for project access.
projectusergrp
Package projectusergrp maintains the group of handlers for projectuser access.
Package projectusergrp maintains the group of handlers for projectuser access.
taggrp
Package taggrp maintains the tag of handlers for tag access.
Package taggrp maintains the tag of handlers for tag access.
taskgrp
Package taskgrp maintains the group of handlers for task access.
Package taskgrp maintains the group of handlers for task access.
timeentrygrp
Package timeentrygrp maintains the group of handlers for timeEntry access.
Package timeentrygrp maintains the group of handlers for timeEntry access.
usergrp
Package usergrp maintains the group of handlers for user access.
Package usergrp maintains the group of handlers for user access.
workspacegrp
Package workspacegrp maintains the group of handlers for workspace access.
Package workspacegrp maintains the group of handlers for workspace access.
workspaceusergrp
Package workspaceusergrp maintains the group of handlers for workspaceuser access.
Package workspaceusergrp maintains the group of handlers for workspaceuser access.

Jump to

Keyboard shortcuts

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