gateway

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2020 License: MIT Imports: 42 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Assets = assets.NewFileSystem(map[string][]string{"/": []string{"gateway.go", ".DS_Store", "Makefile", "ipfs.go", "assets.go", "threads.go", "buckets.go"}, "/public": []string{".DS_Store"}, "/public/css": []string{"all.min.css", "style.css"}, "/public/html": []string{"unixfs.gohtml", "error.gohtml", "confirm.gohtml", "index.gohtml", "consent.gohtml", "404.gohtml"}, "/public/img": []string{"favicon-16x16.png", "hex.svg", "favicon.ico", ".DS_Store", "android-chrome-192x192.png", "apple-touch-icon.png", "android-chrome-512x512.png", "site.webmanifest", "favicon-32x32.png"}, "/public/webfonts": []string{"fa-solid-900.ttf", "fa-regular-400.svg", "fa-regular-400.woff2", "fa-solid-900.eot", "fa-brands-400.svg", "fa-regular-400.woff", "fa-brands-400.eot", "fa-solid-900.svg", "fa-solid-900.woff", "fa-regular-400.ttf", "fa-solid-900.woff2", "fa-brands-400.woff2", "fa-brands-400.woff", "fa-brands-400.ttf", "fa-regular-400.eot"}}, map[string]*assets.File{
	"/public/img/.DS_Store": &assets.File{
		Path:     "/public/img/.DS_Store",
		FileMode: 0x1a4,
		Mtime:    time.Unix(1577572179, 1577572179973956094),
		Data:     []byte(_Assetsc8a0243f5b1b2cb8a698f03d938b8a2276eb3240),
	}, "/public/webfonts/fa-solid-900.ttf": &assets.File{
		Path:     "/public/webfonts/fa-solid-900.ttf",
		FileMode: 0x1a4,
		Mtime:    time.Unix(1577812992, 1577812992827653985),
		Data:     []byte(_Assetsa778db74bb0610978d68bf45c1d84ed40dc5e19e),
	}, "/threads.go": &assets.File{
		Path:     "/threads.go",
		FileMode: 0x1a4,
		Mtime:    time.Unix(1590182432, 1590182432235822974),
		Data:     []byte(_Assets20bbcb56854340073ddda797ede16b7f86c7d3a3),
	}, "/public/webfonts/fa-brands-400.eot": &assets.File{
		Path:     "/public/webfonts/fa-brands-400.eot",
		FileMode: 0x1a4,
		Mtime:    time.Unix(1577812992, 1577812992790736776),
		Data:     []byte(_Assets0d82f92ba8c7e829dd63af485d6dfd5cfee1968d),
	}, "/buckets.go": &assets.File{
		Path:     "/buckets.go",
		FileMode: 0x1a4,
		Mtime:    time.Unix(1590182432, 1590182432233779821),
		Data:     []byte(_Assets9af9b32d4979a14fbf6f85fef5e28a54c6ceb4d8),
	}, "/": &assets.File{
		Path:     "/",
		FileMode: 0x800001ed,
		Mtime:    time.Unix(1590686893, 1590686893257504333),
		Data:     nil,
	}, "/public": &assets.File{
		Path:     "/public",
		FileMode: 0x800001ed,
		Mtime:    time.Unix(1577812992, 1577812992787562495),
		Data:     nil,
	}, "/public/css": &assets.File{
		Path:     "/public/css",
		FileMode: 0x800001ed,
		Mtime:    time.Unix(1590182432, 1590182432234425741),
		Data:     nil,
	}, "/public/html/error.gohtml": &assets.File{
		Path:     "/public/html/error.gohtml",
		FileMode: 0x1a4,
		Mtime:    time.Unix(1577812992, 1577812992781049299),
		Data:     []byte(_Assets86cd0824fababa1fde259c0e52ec8ca0455e8965),
	}, "/public/webfonts/fa-solid-900.eot": &assets.File{
		Path:     "/public/webfonts/fa-solid-900.eot",
		FileMode: 0x1a4,
		Mtime:    time.Unix(1577812992, 1577812992815475493),
		Data:     []byte(_Assetsc8e5f53dbe9ae4243f36350d1e222609f6af178b),
	}, "/ipfs.go": &assets.File{
		Path:     "/ipfs.go",
		FileMode: 0x1a4,
		Mtime:    time.Unix(1589320243, 1589320243825726197),
		Data:     []byte(_Assetsb83960ccf65b57d0332e33d148e2165646ceb9bb),
	}, "/public/img/favicon-16x16.png": &assets.File{
		Path:     "/public/img/favicon-16x16.png",
		FileMode: 0x1ed,
		Mtime:    time.Unix(1577812992, 1577812992784417223),
		Data:     []byte(_Assetsd13d7a53abf40be3e0fd76e8a51bb4835b035bb0),
	}, "/public/img/favicon.ico": &assets.File{
		Path:     "/public/img/favicon.ico",
		FileMode: 0x1ed,
		Mtime:    time.Unix(1577812992, 1577812992785448672),
		Data:     []byte(_Assets0d77b2008fc5e76d7d489317fc8f0df507d753c5),
	}, "/public/webfonts/fa-solid-900.woff": &assets.File{
		Path:     "/public/webfonts/fa-solid-900.woff",
		FileMode: 0x1a4,
		Mtime:    time.Unix(1577812992, 1577812992830580650),
		Data:     []byte(_Assets7f20ca1245bb8b3d9d2ba4abac70f5fb42bab011),
	}, "/gateway.go": &assets.File{
		Path:     "/gateway.go",
		FileMode: 0x1a4,
		Mtime:    time.Unix(1590686893, 1590686893257401259),
		Data:     []byte(_Assetsb289e24e7683deca2454781b8d3914d88103d97a),
	}, "/public/css/all.min.css": &assets.File{
		Path:     "/public/css/all.min.css",
		FileMode: 0x1a4,
		Mtime:    time.Unix(1577812992, 1577812992777614723),
		Data:     []byte(_Assets0f3873af67026ef9adff5293b531a01d11ae6c96),
	}, "/public/html": &assets.File{
		Path:     "/public/html",
		FileMode: 0x800001ed,
		Mtime:    time.Unix(1590710218, 1590710218929474687),
		Data:     nil,
	}, "/public/img/hex.svg": &assets.File{
		Path:     "/public/img/hex.svg",
		FileMode: 0x1a4,
		Mtime:    time.Unix(1577812992, 1577812992786821875),
		Data:     []byte(_Assets747353a94cf1b19b7a2e5c9fbc50b3ea0972f088),
	}, "/public/webfonts/fa-brands-400.svg": &assets.File{
		Path:     "/public/webfonts/fa-brands-400.svg",
		FileMode: 0x1a4,
		Mtime:    time.Unix(1577812992, 1577812992799788424),
		Data:     []byte(_Assetsaeddafb109d244dccf51e6a0309f04536e6c7eb7),
	}, "/public/webfonts/fa-regular-400.ttf": &assets.File{
		Path:     "/public/webfonts/fa-regular-400.ttf",
		FileMode: 0x1a4,
		Mtime:    time.Unix(1577812992, 1577812992811238687),
		Data:     []byte(_Assetsaf1761e86eb6c63bb3e05e2d74c4e2f792ae10b3),
	}, "/public/webfonts/fa-brands-400.ttf": &assets.File{
		Path:     "/public/webfonts/fa-brands-400.ttf",
		FileMode: 0x1a4,
		Mtime:    time.Unix(1577812992, 1577812992803191548),
		Data:     []byte(_Assetsd049223eb2ab91ac66001a116d54e31249bb6996),
	}, "/.DS_Store": &assets.File{
		Path:     "/.DS_Store",
		FileMode: 0x1a4,
		Mtime:    time.Unix(1577565469, 1577565469198572432),
		Data:     []byte(_Assets2eaf811e78c039402383e125deb093600a999e32),
	}, "/public/html/unixfs.gohtml": &assets.File{
		Path:     "/public/html/unixfs.gohtml",
		FileMode: 0x1a4,
		Mtime:    time.Unix(1590182432, 1590182432235203654),
		Data:     []byte(_Assetsd05f64fbc9bda08199115722ef3368a3ded9a593),
	}, "/public/html/confirm.gohtml": &assets.File{
		Path:     "/public/html/confirm.gohtml",
		FileMode: 0x1a4,
		Mtime:    time.Unix(1577812992, 1577812992779698102),
		Data:     []byte(_Assets78386ead3fb287ea2e07758fc3d0fe2187e0d0ad),
	}, "/public/html/404.gohtml": &assets.File{
		Path:     "/public/html/404.gohtml",
		FileMode: 0x1a4,
		Mtime:    time.Unix(1577812992, 1577812992779212230),
		Data:     []byte(_Assets4bf0d0667fe4719e513a3edfeb3a25a2377cf2b7),
	}, "/public/img/android-chrome-192x192.png": &assets.File{
		Path:     "/public/img/android-chrome-192x192.png",
		FileMode: 0x1ed,
		Mtime:    time.Unix(1577812992, 1577812992782232926),
		Data:     []byte(_Assets8adebf81a81a55248a107972d373b02d60a4d498),
	}, "/public/webfonts": &assets.File{
		Path:     "/public/webfonts",
		FileMode: 0x800001ed,
		Mtime:    time.Unix(1577812992, 1577812992830919408),
		Data:     nil,
	}, "/public/webfonts/fa-regular-400.svg": &assets.File{
		Path:     "/public/webfonts/fa-regular-400.svg",
		FileMode: 0x1a4,
		Mtime:    time.Unix(1577812992, 1577812992810235265),
		Data:     []byte(_Assets64f30b43055dd09ec44f8eadb40269023d03229e),
	}, "/public/.DS_Store": &assets.File{
		Path:     "/public/.DS_Store",
		FileMode: 0x1a4,
		Mtime:    time.Unix(1577566128, 1577566128244292637),
		Data:     []byte(_Assets8d3d84b01d8e875fa96f3fb120e5aef152ba2a3b),
	}, "/public/css/style.css": &assets.File{
		Path:     "/public/css/style.css",
		FileMode: 0x1a4,
		Mtime:    time.Unix(1590182432, 1590182432234715885),
		Data:     []byte(_Assetsdde0973434b88ffc53b81b28400233e4fde8bb40),
	}, "/public/html/consent.gohtml": &assets.File{
		Path:     "/public/html/consent.gohtml",
		FileMode: 0x1a4,
		Mtime:    time.Unix(1590710218, 1590710218929021969),
		Data:     []byte(_Assetsee5a7899492dd689fa51716a10baa72c11b0a277),
	}, "/public/img": &assets.File{
		Path:     "/public/img",
		FileMode: 0x800001ed,
		Mtime:    time.Unix(1577812992, 1577812992787109221),
		Data:     nil,
	}, "/public/img/site.webmanifest": &assets.File{
		Path:     "/public/img/site.webmanifest",
		FileMode: 0x1ed,
		Mtime:    time.Unix(1577812992, 1577812992787403694),
		Data:     []byte(_Assets8391991a0f9445efcc483e87a0508f7472f04dab),
	}, "/public/webfonts/fa-regular-400.woff": &assets.File{
		Path:     "/public/webfonts/fa-regular-400.woff",
		FileMode: 0x1a4,
		Mtime:    time.Unix(1577812992, 1577812992812007588),
		Data:     []byte(_Assets9ec4cdb6b9a1b4a014c65fbde9dbb7ca62e478ab),
	}, "/public/webfonts/fa-solid-900.woff2": &assets.File{
		Path:     "/public/webfonts/fa-solid-900.woff2",
		FileMode: 0x1a4,
		Mtime:    time.Unix(1577812992, 1577812992832316200),
		Data:     []byte(_Assetse5228f4473380f8aaf60204d3214f579490bdba3),
	}, "/public/webfonts/fa-brands-400.woff": &assets.File{
		Path:     "/public/webfonts/fa-brands-400.woff",
		FileMode: 0x1a4,
		Mtime:    time.Unix(1577812992, 1577812992804987522),
		Data:     []byte(_Assets2b8ba0ba9ee6d47753727f8c81b09020b5f9249c),
	}, "/public/webfonts/fa-regular-400.eot": &assets.File{
		Path:     "/public/webfonts/fa-regular-400.eot",
		FileMode: 0x1a4,
		Mtime:    time.Unix(1577812992, 1577812992808492887),
		Data:     []byte(_Assetsbea737c26084085e55f9d5af779b4b5af1c1e4f2),
	}, "/public/webfonts/fa-regular-400.woff2": &assets.File{
		Path:     "/public/webfonts/fa-regular-400.woff2",
		FileMode: 0x1a4,
		Mtime:    time.Unix(1577812992, 1577812992812652044),
		Data:     []byte(_Assetsbddb83b9a8840e063a3c00a419998f20584423c9),
	}, "/public/webfonts/fa-solid-900.svg": &assets.File{
		Path:     "/public/webfonts/fa-solid-900.svg",
		FileMode: 0x1a4,
		Mtime:    time.Unix(1577812992, 1577812992822888483),
		Data:     []byte(_Assets3937419623a4cdffaf5c05b0d497629e127d85b5),
	}, "/public/webfonts/fa-brands-400.woff2": &assets.File{
		Path:     "/public/webfonts/fa-brands-400.woff2",
		FileMode: 0x1a4,
		Mtime:    time.Unix(1577812992, 1577812992807486742),
		Data:     []byte(_Assets88d58097382a74c60911983bc1037b4ca4d863cc),
	}, "/Makefile": &assets.File{
		Path:     "/Makefile",
		FileMode: 0x1a4,
		Mtime:    time.Unix(1577812992, 1577812992720959638),
		Data:     []byte(_Assets5e70439c4378bfd4d8fad0377484821d8d3176bb),
	}, "/public/html/index.gohtml": &assets.File{
		Path:     "/public/html/index.gohtml",
		FileMode: 0x1a4,
		Mtime:    time.Unix(1577812992, 1577812992781561441),
		Data:     []byte(_Assets131cd67b6dd480f64ec4b1e6dc1172c43a81c7a9),
	}, "/public/img/apple-touch-icon.png": &assets.File{
		Path:     "/public/img/apple-touch-icon.png",
		FileMode: 0x1ed,
		Mtime:    time.Unix(1577812992, 1577812992783985567),
		Data:     []byte(_Assetsd02de8458478b9207bcc182c71f64095eebd83f2),
	}, "/public/img/android-chrome-512x512.png": &assets.File{
		Path:     "/public/img/android-chrome-512x512.png",
		FileMode: 0x1ed,
		Mtime:    time.Unix(1577812992, 1577812992783316491),
		Data:     []byte(_Assets5505a97055e70f2214132a49de39b49ea42721ef),
	}, "/public/img/favicon-32x32.png": &assets.File{
		Path:     "/public/img/favicon-32x32.png",
		FileMode: 0x1ed,
		Mtime:    time.Unix(1577812992, 1577812992784893936),
		Data:     []byte(_Assets73d5f881dc044ff1def628efb1b6c854a3374148),
	}, "/assets.go": &assets.File{
		Path:     "/assets.go",
		FileMode: 0x1a4,
		Mtime:    time.Unix(1590182432, 1590182432228712085),
		Data:     []byte(_Assets276d6c9405a4d79dcd9a9583123dc13518cdbf78),
	}}, "")

Assets returns go-assets FileSystem

Functions

This section is empty.

Types

type Config added in v1.0.3

type Config struct {
	Addr            ma.Multiaddr
	URL             string
	Subdomains      bool
	BucketsDomain   string
	APIAddr         ma.Multiaddr
	APISession      string
	Collections     *collections.Collections
	IPFSClient      iface.CoreAPI
	EmailSessionBus *broadcast.Broadcaster
	Hub             bool
	Debug           bool
}

Config defines the gateway configuration.

type Gateway

type Gateway struct {
	sync.Mutex
	// contains filtered or unexported fields
}

Gateway provides HTTP-based access to Textile.

func NewGateway

func NewGateway(conf Config) (*Gateway, error)

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