package
0.27.274
Repository: https://github.com/effective-security/porto.git
Documentation: pkg.go.dev

# Packages

Package authz provides an implemention of http authorization where specific URI (or URI's and their children) are allowed access by a set of roles the caller can supply a way to map from a request to a role name.
No description provided by the author
No description provided by the author

# Functions

GetHostName returns Hostname from HTTP bind address, or OS Hostname, if it's not specified in the config.
GetPort returns the port from HTTP bind address, or standard HTTPS 443 port, if it's not specified in the config.
GetServerBaseURL returns server base URL.
GetServerURL returns complete server URL for given relative end-point.
New creates a new instance of the server.
NewRouter returns a new initialized Router.
NewRouterWithCORS returns a new initialized Router with CORS enabled.

# Constants

EvtServiceStarted specifies Service Started event.
EvtServiceStopped specifies Service Stopped event.
EvtSourceStatus specifies source for service Status.
MaxRequestSize specifies max size of regular HTTP Post requests in bytes, 64 Mb.
ServerStartedEvent is fired on server start.
ServerStoppedEvent is fired after server stopped.
ServerStoppingEvent is fired before server stopped.

# Structs

CORSOptions is a configuration container to setup the CORS middleware.
HTTPServer is responsible for exposing the collection of the services as a single HTTP server.

# Interfaces

Config provides interface for the server configurarion.
MuxFactory creates http handlers.
Router provides a router interface.
Server is an interface to provide server status.
Service provides a way for subservices to be registered so they get added to the http API.
TLSInfoConfig contains configuration info for the TLS.

# Type aliases

Handle is a function that can be registered to a route to handle HTTP requests.
Params is a Param-slice, as returned by the router.
ServerEvent specifies server event type.
ServerEventFunc is a callback to handle server events.