controller

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2020 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Endpoints = map[string]*Endpoint{
	getEndpointKey(circleCIBuildFinished): circleCIBuildFinished,
}

Endpoints is a map of endpoint key to endpoint object Usage: getEndpointKey(GetMetadata): GetMetadata

Functions

func Authenticated

func Authenticated(w http.ResponseWriter, r *http.Request) bool

Authenticated verifies if provided request is performed by a logged-in Mattermost user.

func InitAPI

func InitAPI() *mux.Router

InitAPI initializes the REST API

Types

type Endpoint

type Endpoint struct {
	Path         string
	Method       string
	Execute      func(w http.ResponseWriter, r *http.Request)
	RequiresAuth bool
}

Jump to

Keyboard shortcuts

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