api

package
v0.0.0-...-2cb5aa6 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2019 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package utilities provides utility endpoints like heartbeat, OpenAPI, contribute, etc.

Index

Constants

View Source
const DoormanContextKey string = "doorman"

DoormanContextKey is the Gin context key to obtain the *Doorman instance.

View Source
const PrincipalsContextKey string = "principals"

PrincipalsContextKey is the Gin context key to obtain the current user principals.

Variables

This section is empty.

Functions

func AuthnMiddleware

func AuthnMiddleware(d doorman.Doorman) gin.HandlerFunc

AuthnMiddleware relies on the authenticator if authentication was enabled for the origin.

func ContextMiddleware

func ContextMiddleware(d doorman.Doorman) gin.HandlerFunc

ContextMiddleware adds the Doorman instance to the Gin context.

func SetupRoutes

func SetupRoutes(r *gin.Engine, d doorman.Doorman)

SetupRoutes adds HTTP endpoints to the gin.Engine.

func YAMLAsJSONHandler

func YAMLAsJSONHandler(filename string) gin.HandlerFunc

YAMLAsJSONHandler is a handler function factory to serve specified YAML file as JSON.

func Yaml2JSON

func Yaml2JSON(i interface{}) interface{}

Yaml2JSON converts an unmarshalled YAML object to a JSON one.

Types

This section is empty.

Source Files

  • allowed.go
  • api.go
  • authn_middleware.go
  • reload.go
  • utilities.go

Jump to

Keyboard shortcuts

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