gateway

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2020 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Assets = assets.NewFileSystem(map[string][]string{"/": []string{"gateway.go", "Makefile"}, "/public": []string{}, "/public/css": []string{"all.min.css", "style.css"}, "/public/html": []string{"error.gohtml", "miners.gohtml", "faults.gohtml", "index.gohtml", "asks.gohtml", "reputation.gohtml", "404.gohtml"}, "/public/img": []string{"favicon-16x16.png", "hex.svg", "favicon.ico", "android-chrome-192x192.png", "apple-touch-icon.png", "android-chrome-512x512.png", "site.webmanifest", "favicon-32x32.png"}}, map[string]*assets.File{
	"/public/img/site.webmanifest": &assets.File{
		Path:     "/public/img/site.webmanifest",
		FileMode: 0x1ed,
		Mtime:    time.Unix(1591014936, 1591014936054702978),
		Data:     []byte(_Assets8391991a0f9445efcc483e87a0508f7472f04dab),
	}, "/public/css/all.min.css": &assets.File{
		Path:     "/public/css/all.min.css",
		FileMode: 0x1a4,
		Mtime:    time.Unix(1591014936, 1591014936051573164),
		Data:     []byte(_Assets0f3873af67026ef9adff5293b531a01d11ae6c96),
	}, "/public/img/favicon-16x16.png": &assets.File{
		Path:     "/public/img/favicon-16x16.png",
		FileMode: 0x1ed,
		Mtime:    time.Unix(1591014936, 1591014936053904631),
		Data:     []byte(_Assetsd13d7a53abf40be3e0fd76e8a51bb4835b035bb0),
	}, "/public/img/favicon.ico": &assets.File{
		Path:     "/public/img/favicon.ico",
		FileMode: 0x1ed,
		Mtime:    time.Unix(1591014936, 1591014936054244377),
		Data:     []byte(_Assets0d77b2008fc5e76d7d489317fc8f0df507d753c5),
	}, "/public/img/apple-touch-icon.png": &assets.File{
		Path:     "/public/img/apple-touch-icon.png",
		FileMode: 0x1ed,
		Mtime:    time.Unix(1591014936, 1591014936053722691),
		Data:     []byte(_Assetsd02de8458478b9207bcc182c71f64095eebd83f2),
	}, "/public/html/error.gohtml": &assets.File{
		Path:     "/public/html/error.gohtml",
		FileMode: 0x1a4,
		Mtime:    time.Unix(1591014936, 1591014936052382584),
		Data:     []byte(_Assets86cd0824fababa1fde259c0e52ec8ca0455e8965),
	}, "/public/html/miners.gohtml": &assets.File{
		Path:     "/public/html/miners.gohtml",
		FileMode: 0x1a4,
		Mtime:    time.Unix(1591014936, 1591014936052658998),
		Data:     []byte(_Assets610f90f49cdc96fabb5ee57a1f077cfc00c6295e),
	}, "/public/html/asks.gohtml": &assets.File{
		Path:     "/public/html/asks.gohtml",
		FileMode: 0x1a4,
		Mtime:    time.Unix(1591014936, 1591014936052195770),
		Data:     []byte(_Assets19d4daaf5fda2bea44d5a868092320a88976ec0f),
	}, "/public/html/reputation.gohtml": &assets.File{
		Path:     "/public/html/reputation.gohtml",
		FileMode: 0x1a4,
		Mtime:    time.Unix(1591014936, 1591014936052791728),
		Data:     []byte(_Assetsff87a1af2b558b9c75d6a7149f7e7b3cc4566919),
	}, "/gateway.go": &assets.File{
		Path:     "/gateway.go",
		FileMode: 0x1a4,
		Mtime:    time.Unix(1598021791, 1598021791125629342),
		Data:     []byte(_Assetsb289e24e7683deca2454781b8d3914d88103d97a),
	}, "/Makefile": &assets.File{
		Path:     "/Makefile",
		FileMode: 0x1a4,
		Mtime:    time.Unix(1591014936, 1591014936048375174),
		Data:     []byte(_Assets5e70439c4378bfd4d8fad0377484821d8d3176bb),
	}, "/public": &assets.File{
		Path:     "/public",
		FileMode: 0x800001ed,
		Mtime:    time.Unix(1591014936, 1591014936053015654),
		Data:     nil,
	}, "/public/css/style.css": &assets.File{
		Path:     "/public/css/style.css",
		FileMode: 0x1a4,
		Mtime:    time.Unix(1591014936, 1591014936051787332),
		Data:     []byte(_Assetsdde0973434b88ffc53b81b28400233e4fde8bb40),
	}, "/public/img/hex.svg": &assets.File{
		Path:     "/public/img/hex.svg",
		FileMode: 0x1a4,
		Mtime:    time.Unix(1591014936, 1591014936054529114),
		Data:     []byte(_Assets747353a94cf1b19b7a2e5c9fbc50b3ea0972f088),
	}, "/public/css": &assets.File{
		Path:     "/public/css",
		FileMode: 0x800001ed,
		Mtime:    time.Unix(1591014936, 1591014936051714575),
		Data:     nil,
	}, "/public/html/faults.gohtml": &assets.File{
		Path:     "/public/html/faults.gohtml",
		FileMode: 0x1a4,
		Mtime:    time.Unix(1591360575, 1591360575185851657),
		Data:     []byte(_Assetsdd23384c8fb75cba24325da13db5e88f27edd970),
	}, "/public/img": &assets.File{
		Path:     "/public/img",
		FileMode: 0x800001ed,
		Mtime:    time.Unix(1591014936, 1591014936054642169),
		Data:     nil,
	}, "/public/img/android-chrome-512x512.png": &assets.File{
		Path:     "/public/img/android-chrome-512x512.png",
		FileMode: 0x1ed,
		Mtime:    time.Unix(1591014936, 1591014936053501192),
		Data:     []byte(_Assets5505a97055e70f2214132a49de39b49ea42721ef),
	}, "/public/img/android-chrome-192x192.png": &assets.File{
		Path:     "/public/img/android-chrome-192x192.png",
		FileMode: 0x1ed,
		Mtime:    time.Unix(1591014936, 1591014936053203474),
		Data:     []byte(_Assets8adebf81a81a55248a107972d373b02d60a4d498),
	}, "/public/img/favicon-32x32.png": &assets.File{
		Path:     "/public/img/favicon-32x32.png",
		FileMode: 0x1ed,
		Mtime:    time.Unix(1591014936, 1591014936054041540),
		Data:     []byte(_Assets73d5f881dc044ff1def628efb1b6c854a3374148),
	}, "/": &assets.File{
		Path:     "/",
		FileMode: 0x800001ed,
		Mtime:    time.Unix(1598021836, 1598021836257769183),
		Data:     nil,
	}, "/public/html": &assets.File{
		Path:     "/public/html",
		FileMode: 0x800001ed,
		Mtime:    time.Unix(1591360575, 1591360575185295483),
		Data:     nil,
	}, "/public/html/index.gohtml": &assets.File{
		Path:     "/public/html/index.gohtml",
		FileMode: 0x1a4,
		Mtime:    time.Unix(1598021175, 1598021175150364816),
		Data:     []byte(_Assets131cd67b6dd480f64ec4b1e6dc1172c43a81c7a9),
	}, "/public/html/404.gohtml": &assets.File{
		Path:     "/public/html/404.gohtml",
		FileMode: 0x1a4,
		Mtime:    time.Unix(1591014936, 1591014936052044627),
		Data:     []byte(_Assets4bf0d0667fe4719e513a3edfeb3a25a2377cf2b7),
	}}, "")

Assets returns go-assets FileSystem

Functions

This section is empty.

Types

type Gateway

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

Gateway provides HTTP-based access to Textile.

func NewGateway

func NewGateway(
	addr string,
	askIndex *askRunner.Runner,
	minerIndex *minerModule.Index,
	faultsIndex *faultsModule.Index,
	reputationModule *reputation.Module,
) *Gateway

NewGateway returns a new gateway.

func (*Gateway) Addr

func (g *Gateway) Addr() string

Addr returns the gateway's address.

func (*Gateway) Start

func (g *Gateway) Start(basePath string)

Start the gateway.

func (*Gateway) Stop

func (g *Gateway) Stop() error

Stop the gateway.

Jump to

Keyboard shortcuts

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