api

package
v0.0.0-...-1d1c70e Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2019 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HealthCheckHandler

func HealthCheckHandler(w http.ResponseWriter, r *http.Request)

HealthCheckHandler is a basic ok response for load balancers & co returns the version of qri this node is running, pulled from the lib package

func NewServerRoutes

func NewServerRoutes(s *Server) *http.ServeMux

NewServerRoutes returns a Muxer that has all API routes

func NotFoundHandler

func NotFoundHandler(w http.ResponseWriter, r *http.Request)

NotFoundHandler indicates a route wasn't found

Types

type CollectionHandlers

type CollectionHandlers struct {
	// contains filtered or unexported fields
}

CollectionHandlers defines HTTP handlers for interacting with a collection

func (*CollectionHandlers) HandleCollectionIndex

func (h *CollectionHandlers) HandleCollectionIndex(w http.ResponseWriter, r *http.Request)

HandleCollectionIndex lists urls in the entire collection

func (*CollectionHandlers) HandleListWalks

func (h *CollectionHandlers) HandleListWalks(w http.ResponseWriter, r *http.Request)

HandleListWalks lists the walks connected to a collection

func (*CollectionHandlers) HandleRawResource

func (h *CollectionHandlers) HandleRawResource(w http.ResponseWriter, r *http.Request)

HandleRawResource returns the raw response for a given URL

func (*CollectionHandlers) HandleRawResourceMeta

func (h *CollectionHandlers) HandleRawResourceMeta(w http.ResponseWriter, r *http.Request)

HandleRawResourceMeta gives raw meta information for a capture

func (*CollectionHandlers) HandleResolvedResource

func (h *CollectionHandlers) HandleResolvedResource(w http.ResponseWriter, r *http.Request)

HandleResolvedResource fetches a resource, following any redirects

func (*CollectionHandlers) HandleResolvedResourceMeta

func (h *CollectionHandlers) HandleResolvedResourceMeta(w http.ResponseWriter, r *http.Request)

HandleResolvedResourceMeta gives resolved meta information

func (*CollectionHandlers) HandleWalkIndex

func (h *CollectionHandlers) HandleWalkIndex(w http.ResponseWriter, r *http.Request)

HandleWalkIndex lists walks contained in the collection

type JobHandlers

type JobHandlers struct {
	// contains filtered or unexported fields
}

JobHandlers defines HTTP handlers for interacting with a collection

func (*JobHandlers) HandleCreateJob

func (h *JobHandlers) HandleCreateJob(w http.ResponseWriter, r *http.Request)

func (*JobHandlers) HandleJob

func (h *JobHandlers) HandleJob(w http.ResponseWriter, r *http.Request)

HandleJob gets a job in a collection

func (*JobHandlers) HandleJobs

func (h *JobHandlers) HandleJobs(w http.ResponseWriter, r *http.Request)

func (*JobHandlers) HandleListJobs

func (h *JobHandlers) HandleListJobs(w http.ResponseWriter, r *http.Request)

HandleListJobs lists the jobs connected to a collection

type Server

type Server struct {
	Coordinator lib.Coordinator
	Collection  lib.Collection
	// contains filtered or unexported fields
}

Server wraps a collection, turning it into an API server

func (*Server) Serve

func (s *Server) Serve(port string) (err error)

Serve Blocks

Jump to

Keyboard shortcuts

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