Documentation ¶
Index ¶
- Variables
- func CORS(validator OriginValidator) func(http.Handler) http.Handler
- type OriginValidator
- type Server
- func (s *Server) Acquire(w http.ResponseWriter, r *http.Request)
- func (s *Server) Call(w http.ResponseWriter, r *http.Request)
- func (s *Server) Close() error
- func (s *Server) Enumerate(w http.ResponseWriter, r *http.Request)
- func (s *Server) Info(w http.ResponseWriter, r *http.Request)
- func (s *Server) Listen(w http.ResponseWriter, r *http.Request)
- func (s *Server) Post(w http.ResponseWriter, r *http.Request)
- func (s *Server) Release(w http.ResponseWriter, r *http.Request)
- func (s *Server) Run() error
- func (s *Server) StatusPage(w http.ResponseWriter, r *http.Request)
Constants ¶
This section is empty.
Variables ¶
Functions ¶
Types ¶
type OriginValidator ¶
OriginValidator takes an origin string and returns whether or not that origin is allowed.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func New ¶
func New(bus *usb.USB, logWriter io.Writer, mw, dmw *memorywriter.MemoryWriter, logger, dlogger *log.Logger) (*Server, error)
func (*Server) StatusPage ¶
func (s *Server) StatusPage(w http.ResponseWriter, r *http.Request)
Click to show internal directories.
Click to hide internal directories.