Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( //Package wide logger for logging bark errors etc. BarkLogger *log.Logger )
Functions ¶
func DataFromFakeJwt ¶
Strips the fakestuff off the Auth header JWT. Pass the authheader data from a barkmessage and get back the encrypted access token as []byte.
func NewRoutes ¶
func NewRoutes(xi *chi.Mux, rconf *RouterConf)
func SetWebLogger ¶
func SetWebLogger(path string)
Specifies the path for the barkweblog, please include full path with filename e.g. /path/to/logfile.log and not /path/to/
Types ¶
type RouterConf ¶
type RouterConf struct { //URLS to register & their respective handlers Taskuris []string Taskfunc http.HandlerFunc Outuris []string Outfunc http.HandlerFunc Reguris []string Regfunc http.HandlerFunc }
func NewBarkRouter ¶
func NewBarkRouter(reguris, taskuris, outputuris []string) RouterConf
Create a new BarkServ router config with specified URIs. Handler funcs must be specified.
type Server ¶
type Server struct { Server *http.Server Routes *RouterConf TLS *TLSConf Xi *chi.Mux QuicServer *http3.Server Quic bool LogPath string }
func NewBarkServHTTP ¶
func NewBarkServHTTP(rconf RouterConf) Server
Create a new BarkServ with HTTP Defaults
func NewBarkServHTTPS ¶
func NewBarkServHTTPS(tlscert, tlskey string, rconf RouterConf) Server
Create a new BarkServ with HTTPS Defaults
func NewBarkServQUIC ¶
func NewBarkServQUIC(tlscert, tlskey string, rconf RouterConf) Server
Create a new BarkServ with QUIC defaults
func (*Server) StartListener ¶
Click to show internal directories.
Click to hide internal directories.