Documentation ¶
Index ¶
- Variables
- type Service
- func (s *Service) ALL(def *service.RouteDefinition)
- func (s *Service) AssetHandler(def *service.HeadlessAssetsDefinition, ctx service.Context) (interface{}, error)
- func (s *Service) Context() context.Context
- func (s *Service) DELETE(def *service.RouteDefinition)
- func (s *Service) Error() error
- func (s *Service) GET(def *service.RouteDefinition)
- func (s *Service) GetListenAddress() (*url.URL, error)
- func (s *Service) Kill()
- func (s *Service) LowLevel(def *service.LowLevelDefinition) *mux.Route
- func (s *Service) LowLevelAssetHandler(def *service.HeadlessAssetsDefinition, w http.ResponseWriter, r *http.Request) error
- func (s *Service) PATCH(def *service.RouteDefinition)
- func (s *Service) POST(def *service.RouteDefinition)
- func (s *Service) PUT(def *service.RouteDefinition)
- func (s *Service) Raw(def *service.RawRouteDefinition) *mux.Route
- func (s *Service) ServeAssets(def *service.AssetsDefinition)
- func (s *Service) SetOption(optIface interface{}) error
- func (s *Service) Start()
- func (s *Service) Stop()
- func (s *Service) Wait() error
- func (s *Service) WebSocket(def *service.WebSocketDefinition)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DefaultAllowedMethods = []string{"OPTIONS", "HEAD", "GET", "PUT", "POST", "DELETE", "PATCH"} ShutDownGrace = 1 * time.Second )
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct { ListenAddress string AllowedMethods []string AllowedOriginsFunc func(origin string) bool Router *mux.Router Server *http.Server SecLayer *secure.Secure Cors *cors.Cors Debug bool // contains filtered or unexported fields }
func (*Service) ALL ¶
func (s *Service) ALL(def *service.RouteDefinition)
func (*Service) AssetHandler ¶
func (*Service) DELETE ¶
func (s *Service) DELETE(def *service.RouteDefinition)
func (*Service) GET ¶
func (s *Service) GET(def *service.RouteDefinition)
func (*Service) LowLevelAssetHandler ¶
func (s *Service) LowLevelAssetHandler(def *service.HeadlessAssetsDefinition, w http.ResponseWriter, r *http.Request) error
func (*Service) PATCH ¶
func (s *Service) PATCH(def *service.RouteDefinition)
func (*Service) POST ¶
func (s *Service) POST(def *service.RouteDefinition)
func (*Service) PUT ¶
func (s *Service) PUT(def *service.RouteDefinition)
func (*Service) ServeAssets ¶
func (s *Service) ServeAssets(def *service.AssetsDefinition)
func (*Service) WebSocket ¶
func (s *Service) WebSocket(def *service.WebSocketDefinition)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.