gateway

package
v0.0.1-beta.9 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2020 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Assets = assets.NewFileSystem(map[string][]string{"/": []string{"gateway.go", "Makefile", "assets.go"}, "/public": []string{}, "/public/css": []string{"all.min.css", "style.css"}, "/public/html": []string{"error.gohtml", "miners.gohtml", "slashing.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": &assets.File{
		Path:     "/public",
		FileMode: 0x800001ed,
		Mtime:    time.Unix(1583341810, 1583341810160316423),
		Data:     nil,
	}, "/public/html/slashing.gohtml": &assets.File{
		Path:     "/public/html/slashing.gohtml",
		FileMode: 0x1a4,
		Mtime:    time.Unix(1583269858, 1583269858096610198),
		Data:     []byte(_Assets02d50ae637c9a1b406cf66d13e529eec2a22c068),
	}, "/public/html/asks.gohtml": &assets.File{
		Path:     "/public/html/asks.gohtml",
		FileMode: 0x1a4,
		Mtime:    time.Unix(1583263458, 1583263458943145754),
		Data:     []byte(_Assets19d4daaf5fda2bea44d5a868092320a88976ec0f),
	}, "/public/img": &assets.File{
		Path:     "/public/img",
		FileMode: 0x800001ed,
		Mtime:    time.Unix(1583185451, 1583185451791337635),
		Data:     nil,
	}, "/public/img/hex.svg": &assets.File{
		Path:     "/public/img/hex.svg",
		FileMode: 0x1a4,
		Mtime:    time.Unix(1583185451, 1583185451790844898),
		Data:     []byte(_Assets747353a94cf1b19b7a2e5c9fbc50b3ea0972f088),
	}, "/public/img/favicon.ico": &assets.File{
		Path:     "/public/img/favicon.ico",
		FileMode: 0x1ed,
		Mtime:    time.Unix(1583185451, 1583185451789563277),
		Data:     []byte(_Assets0d77b2008fc5e76d7d489317fc8f0df507d753c5),
	}, "/gateway.go": &assets.File{
		Path:     "/gateway.go",
		FileMode: 0x1a4,
		Mtime:    time.Unix(1583341294, 1583341294537857219),
		Data:     []byte(_Assetsb289e24e7683deca2454781b8d3914d88103d97a),
	}, "/public/html/error.gohtml": &assets.File{
		Path:     "/public/html/error.gohtml",
		FileMode: 0x1a4,
		Mtime:    time.Unix(1583185451, 1583185451783735924),
		Data:     []byte(_Assets86cd0824fababa1fde259c0e52ec8ca0455e8965),
	}, "/public/html/reputation.gohtml": &assets.File{
		Path:     "/public/html/reputation.gohtml",
		FileMode: 0x1a4,
		Mtime:    time.Unix(1583270718, 1583270718546239518),
		Data:     []byte(_Assetsff87a1af2b558b9c75d6a7149f7e7b3cc4566919),
	}, "/public/img/android-chrome-192x192.png": &assets.File{
		Path:     "/public/img/android-chrome-192x192.png",
		FileMode: 0x1ed,
		Mtime:    time.Unix(1583185451, 1583185451785392296),
		Data:     []byte(_Assets8adebf81a81a55248a107972d373b02d60a4d498),
	}, "/public/img/site.webmanifest": &assets.File{
		Path:     "/public/img/site.webmanifest",
		FileMode: 0x1ed,
		Mtime:    time.Unix(1583185451, 1583185451791695384),
		Data:     []byte(_Assets8391991a0f9445efcc483e87a0508f7472f04dab),
	}, "/public/css/all.min.css": &assets.File{
		Path:     "/public/css/all.min.css",
		FileMode: 0x1a4,
		Mtime:    time.Unix(1583185451, 1583185451778563041),
		Data:     []byte(_Assets0f3873af67026ef9adff5293b531a01d11ae6c96),
	}, "/public/html/404.gohtml": &assets.File{
		Path:     "/public/html/404.gohtml",
		FileMode: 0x1a4,
		Mtime:    time.Unix(1583252653, 1583252653011742509),
		Data:     []byte(_Assets4bf0d0667fe4719e513a3edfeb3a25a2377cf2b7),
	}, "/public/img/favicon-16x16.png": &assets.File{
		Path:     "/public/img/favicon-16x16.png",
		FileMode: 0x1ed,
		Mtime:    time.Unix(1583185451, 1583185451788224702),
		Data:     []byte(_Assetsd13d7a53abf40be3e0fd76e8a51bb4835b035bb0),
	}, "/public/img/android-chrome-512x512.png": &assets.File{
		Path:     "/public/img/android-chrome-512x512.png",
		FileMode: 0x1ed,
		Mtime:    time.Unix(1583185451, 1583185451786997066),
		Data:     []byte(_Assets5505a97055e70f2214132a49de39b49ea42721ef),
	}, "/public/img/favicon-32x32.png": &assets.File{
		Path:     "/public/img/favicon-32x32.png",
		FileMode: 0x1ed,
		Mtime:    time.Unix(1583185451, 1583185451788798703),
		Data:     []byte(_Assets73d5f881dc044ff1def628efb1b6c854a3374148),
	}, "/Makefile": &assets.File{
		Path:     "/Makefile",
		FileMode: 0x1a4,
		Mtime:    time.Unix(1583185451, 1583185451761172905),
		Data:     []byte(_Assets5e70439c4378bfd4d8fad0377484821d8d3176bb),
	}, "/public/css": &assets.File{
		Path:     "/public/css",
		FileMode: 0x800001ed,
		Mtime:    time.Unix(1583185451, 1583185451779031001),
		Data:     nil,
	}, "/public/css/style.css": &assets.File{
		Path:     "/public/css/style.css",
		FileMode: 0x1a4,
		Mtime:    time.Unix(1583340898, 1583340898842110657),
		Data:     []byte(_Assetsdde0973434b88ffc53b81b28400233e4fde8bb40),
	}, "/public/html": &assets.File{
		Path:     "/public/html",
		FileMode: 0x800001ed,
		Mtime:    time.Unix(1583272265, 1583272265546844867),
		Data:     nil,
	}, "/public/html/miners.gohtml": &assets.File{
		Path:     "/public/html/miners.gohtml",
		FileMode: 0x1a4,
		Mtime:    time.Unix(1583266840, 1583266840236911012),
		Data:     []byte(_Assets610f90f49cdc96fabb5ee57a1f077cfc00c6295e),
	}, "/public/html/index.gohtml": &assets.File{
		Path:     "/public/html/index.gohtml",
		FileMode: 0x1a4,
		Mtime:    time.Unix(1583340357, 1583340357198831955),
		Data:     []byte(_Assets131cd67b6dd480f64ec4b1e6dc1172c43a81c7a9),
	}, "/public/img/apple-touch-icon.png": &assets.File{
		Path:     "/public/img/apple-touch-icon.png",
		FileMode: 0x1ed,
		Mtime:    time.Unix(1583185451, 1583185451787620197),
		Data:     []byte(_Assetsd02de8458478b9207bcc182c71f64095eebd83f2),
	}, "/assets.go": &assets.File{
		Path:     "/assets.go",
		FileMode: 0x1a4,
		Mtime:    time.Unix(1583340904, 1583340904384529773),
		Data:     []byte(_Assets276d6c9405a4d79dcd9a9583123dc13518cdbf78),
	}, "/": &assets.File{
		Path:     "/",
		FileMode: 0x800001ed,
		Mtime:    time.Unix(1583186243, 1583186243634509318),
		Data:     nil,
	}}, "")

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 *miner.Index,
	faultsIndex *faults.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()

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