web

package
v0.0.0-...-9f1fa51 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunWebserver

func RunWebserver()

RunWebserver starts a new web server using the access key and secret as provided on protected routes.

Types

type HttpService

type HttpService struct {
	Router *gin.Engine
}

HttpService encapsulates router, EI service and access credentials.

func NewHTTPService

func NewHTTPService() *HttpService

NewHTTPService creates a new HttpService instance with the default router.

func (*HttpService) HandleRpc

func (srv *HttpService) HandleRpc(c *gin.Context)

CreateSubscription expects a CreateSubscriptionReq payload, validates the request and subscribes to the job.

func (*HttpService) HandleWs

func (srv *HttpService) HandleWs(c *gin.Context)

func (*HttpService) ServeHTTP

func (srv *HttpService) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP calls ServeHTTP on the underlying router, which conforms to the http.Handler interface.

Jump to

Keyboard shortcuts

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