api

package
v0.0.0-...-6560cc6 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2022 License: ISC Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Start

func Start()

Start API Server

Types

type CORSRouterDecorator

type CORSRouterDecorator struct {
	R *mux.Router
}

CORSRouterDecorator applies CORS headers to a mux.Router

func (*CORSRouterDecorator) ServeHTTP

func (c *CORSRouterDecorator) ServeHTTP(rw http.ResponseWriter, req *http.Request)

type Client

type Client struct {
	*client.Client
	// contains filtered or unexported fields
}

Client ...

func (*Client) Lock

func (c *Client) Lock()

Lock ...

func (*Client) Unlock

func (c *Client) Unlock()

Unlock ...

type LocalHandlers

type LocalHandlers struct {
	client.Handlers
	// contains filtered or unexported fields
}

LocalHandlers stores files on local drive

func GetLocalHandlers

func GetLocalHandlers(path string) LocalHandlers

GetLocalHandlers ...

func (LocalHandlers) Delete

func (h LocalHandlers) Delete(id string) error

Delete ...

func (LocalHandlers) Download

func (h LocalHandlers) Download(id string) ([]byte, error)

Download ...

func (LocalHandlers) Exists

func (h LocalHandlers) Exists(id string) bool

Exists ...

func (LocalHandlers) Upload

func (h LocalHandlers) Upload(id string, data []byte) error

Upload ...

type Register

type Register struct {
	Mnemonic string `json:"mnemonic"`
}

Register ...

type Session

type Session struct {
	ID string `json:"id"`
}

Session ...

Jump to

Keyboard shortcuts

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