security

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2019 License: NCSA Imports: 15 Imported by: 1

Documentation

Index

Constants

View Source
const (
	MB      = 1048576
	MaxSize = 16 * MB
)

Defines the maximum size for sanitized requests

Variables

View Source
var AccessLogLocation string = "log/access.log"

Default location for access log

View Source
var ClientRegistryLocation string = "clients.db"

Default location for client db

Functions

func AddClient

func AddClient(name string) (string, error)

Add a Authorized API Client to Arbor Will return an API key on successful addition Will return DB error if there is an issue

func DeleteClient

func DeleteClient(name string) error

func Init

func Init()

func IsAuthorizedClient

func IsAuthorizedClient(token string) (bool, error)

Verify if a key provided by a client is vaild

func IsEnabled

func IsEnabled() bool

func ListClients

func ListClients() ([]string, error)

func SanitizeRequest

func SanitizeRequest(r *http.Request)

func Shutdown

func Shutdown()

Types

This section is empty.

Jump to

Keyboard shortcuts

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