http

package
v1.7.7 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2021 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const INDEX_DOC = `` /* 844-byte string literal not displayed */

Variables

This section is empty.

Functions

func Start

func Start(addr string, arc *archivist.Archivist, indexStore store.IndexInterface, dataStore store.StoreInterface, st *stats.Stats) error

Types

type DownloadRequest

type DownloadRequest struct {
	Path struct {
		Address string
	} `example:"/download/1.2.3.4"`

	Query struct {
	}

	Response []byte

	Index store.IndexInterface
	Store store.StoreInterface
}

func (*DownloadRequest) Handle

type GetKeysRequest

type GetKeysRequest struct {
	Path  struct{} `example:"/keys"`
	Query struct {
		WithData bool `description:"include data keys" example:"false"`
	}
	Response KeysList

	IndexStore store.IndexInterface
	DataStore  store.DataInterface
}

func (*GetKeysRequest) Handle

func (r *GetKeysRequest) Handle(ctx context.Context, w http.ResponseWriter)

type GetStatsRequest

type GetStatsRequest struct {
	Path  struct{} `example:"/stats"`
	Query struct{}

	Response stats.Stats

	IndexStore store.IndexInterface
	DataStore  store.DataInterface
	Stats      *stats.Stats
}

func (*GetStatsRequest) Handle

type KeysList

type KeysList struct {
	IndexKeys []string `json:"index_keys"`
	DataKeys  []string `json:"data_keys,omitempty"`
}

Jump to

Keyboard shortcuts

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