Documentation ¶
Overview ¶
Package rest implements the pageshot's REST API.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler is an REST HTTP handler.
func NewHandler ¶
func NewHandler(params HandlerParams) *Handler
NewHandler returns net http.Handler.
type HandlerParams ¶
type HandlerParams struct { Logger *logrus.Logger ScreenshotService ScreenshotService }
HandlerParams is an incoming params for the NewHandler function.
type ScreenshotService ¶
type ScreenshotService interface {
Screenshot(ctx context.Context, opts models.ScreenshotOptions) (io.Reader, string, error)
}
ScreenshotService is a screenshot interface that is required for the Handler.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is main HTTP server.
func NewServer ¶
func NewServer(params ServerParams) *Server
NewServer creates new instance of the Server.
type ServerParams ¶
type ServerParams struct { Config config.ServerConfig Handler http.Handler }
ServerParams is an incoming params for the NewServer function.
Click to show internal directories.
Click to hide internal directories.