endpoints

package
v0.0.0-...-5b5b1e2 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2018 License: BSD-3-Clause Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var VERSION string

go generate does not work in subdirectories. Beautious.

Functions

func Bgp

func Bgp(r *http.Request, ps httprouter.Params) (bird.Parsed, bool)

func CheckAccess

func CheckAccess(req *http.Request) error

func Endpoint

func Endpoint(wrapped endpoint) httprouter.Handle

func ProtoCount

func ProtoCount(r *http.Request, ps httprouter.Params) (bird.Parsed, bool)

func ProtoRoutes

func ProtoRoutes(r *http.Request, ps httprouter.Params) (bird.Parsed, bool)

func Protocols

func Protocols(r *http.Request, ps httprouter.Params) (bird.Parsed, bool)

func RouteNet

func RouteNet(r *http.Request, ps httprouter.Params) (bird.Parsed, bool)

func RouteNetTable

func RouteNetTable(r *http.Request, ps httprouter.Params) (bird.Parsed, bool)

func RoutesDump

func RoutesDump(r *http.Request, ps httprouter.Params) (bird.Parsed, bool)

func RoutesFiltered

func RoutesFiltered(r *http.Request, ps httprouter.Params) (bird.Parsed, bool)

func RoutesNoExport

func RoutesNoExport(r *http.Request, ps httprouter.Params) (bird.Parsed, bool)

func RoutesPeer

func RoutesPeer(r *http.Request, ps httprouter.Params) (bird.Parsed, bool)

func RoutesPrefixed

func RoutesPrefixed(r *http.Request, ps httprouter.Params) (bird.Parsed, bool)

func Status

func Status(r *http.Request, ps httprouter.Params) (bird.Parsed, bool)

func SymbolProtocols

func SymbolProtocols(r *http.Request, ps httprouter.Params) (bird.Parsed, bool)

func SymbolTables

func SymbolTables(r *http.Request, ps httprouter.Params) (bird.Parsed, bool)

func Symbols

func Symbols(r *http.Request, ps httprouter.Params) (bird.Parsed, bool)

func TableCount

func TableCount(r *http.Request, ps httprouter.Params) (bird.Parsed, bool)

func TableRoutes

func TableRoutes(r *http.Request, ps httprouter.Params) (bird.Parsed, bool)

func ValidateCharset

func ValidateCharset(value string, alphabet string) error

func ValidateLength

func ValidateLength(value string, maxLength int) error

Check if the value is not longer than a given length

func ValidateLengthAndCharset

func ValidateLengthAndCharset(value string, maxLength int, alphabet string) (string, error)

func ValidatePrefixParam

func ValidatePrefixParam(value string) (string, error)

func ValidateProtocolParam

func ValidateProtocolParam(value string) (string, error)

func Version

func Version(version string) httprouter.Handle

Types

type APIInfo

type APIInfo struct {
	Version         string
	ResultFromCache bool        `json:"result_from_cache"`
	CacheStatus     CacheStatus `json:"cache_status"`
}

func GetApiInfo

func GetApiInfo(from_cache bool) *APIInfo

type CacheStatus

type CacheStatus struct {
	OrigTTL  int      `json:"orig_ttl"`
	CachedAt TimeInfo `json:"cached_at"`
}

type ServerConfig

type ServerConfig struct {
	AllowFrom      []string `toml:"allow_from"`
	ModulesEnabled []string `toml:"modules_enabled"`
}

Endpoints / Server configuration

var Conf ServerConfig

type TimeInfo

type TimeInfo struct {
	Date         string `json:"date"`
	TimezoneType string `json:"timezone_type"`
	Timezone     string `json:"timezone"`
}

Jump to

Keyboard shortcuts

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