api

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2016 License: MIT Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ErrorResponse added in v0.2.0

func ErrorResponse(w http.ResponseWriter, errorCode int, reason string)

Types

type Gateway added in v0.3.0

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

Gateway represents an HTTP API gateway

func NewGateway added in v0.3.0

func NewGateway(n *core.OpenBazaarNode, authCookie http.Cookie, l net.Listener, config repo.APIConfig, options ...corehttp.ServeOption) (*Gateway, error)

NewGateway instantiates a new `Gateway`

func (*Gateway) Close added in v0.3.0

func (g *Gateway) Close() error

Close shutsdown the Gateway listener

func (*Gateway) Serve added in v0.3.0

func (g *Gateway) Serve() error

Serve begins listening on the configured address

type JsonAPIConfig added in v0.1.1

type JsonAPIConfig struct {
	Headers       map[string][]string
	Enabled       bool
	Cors          *string
	Authenticated bool
	Cookie        http.Cookie
	Username      string
	Password      string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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