api

package
v0.2.0-beta Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2020 License: MPL-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TIMEOUT = time.Second * 30
)

Variables

View Source
var ServiceConfig configs.Daemon

Functions

func AppendAPIService

func AppendAPIService(mux *http.ServeMux)

func AttachAPI

func AttachAPI(log *roggy.LogPrinter, router *mux.Router)

func AttachStore

func AttachStore(store_ *servicestore.MainManagedStorage)

func Authenticate

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

func HTTPFlushAll

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

func HTTPInfo

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

func HTTPListing

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

func HTTPListingSearch

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

Kazaam Specs https://github.com/qntfy/kazaam * * { * "query": "comics", * "filters": [ * "contains(doc.slug, \"golden\")" // Gval expression * ], * "limit": 5, * "transforms": [{ // Kazaam Spec * "operation": "shift", * "spec": { * "title": "title", * "owner": "parentPeer", * "price": "price.amount", * "thumb": "thumbnail.tiny" * } * }] * }

func HTTPMedia

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

func HTTPPeerAdd

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

func HTTPPeerGet

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

func HTTPPeerGetListings

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

func HTTPPeerSearch

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

func HTTPPeers

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

Types

type APIListResult

type APIListResult struct {
	Count     int           `json:"count"`
	Limit     int           `json:"limit"`
	NextStart int           `json:"nextStart"`
	Data      []interface{} `json:"data"`
}

type AuthPayload

type AuthPayload struct {
	Username    string `json:"username"`
	Password    string `json:"password"`
	NewUsername string `json:"newUsername"`
	NewPassword string `json:"newPassword"`
}

type KimitzuInfoP

type KimitzuInfoP struct {
	Repo                  string `json:"repoPath"`
	Cookie                string `json:"cookie"`
	Username              string `json:"username"`
	Password              string `json:"password"`
	Authenticated         bool   `json:"authenticated"`
	OBVersion             string `json:"obVersion"`
	KimitzuServiceVersion string `json:"kimitzuVersion"`
}

func GetInfo

func GetInfo() (KimitzuInfoP, error)

Jump to

Keyboard shortcuts

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