frontend

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2018 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Overview

Package frontend provides tools to publish static data from within any micro service

It implements a simple Union HttpFS to be exposed by a standard net.HttpFileServer interface.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewIndexFile

func NewIndexFile(rootList []string) http.File

func RegisterPluginBoxes

func RegisterPluginBoxes(boxes ...PluginBox)

Types

type IndexFile

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

func (*IndexFile) Close

func (i *IndexFile) Close() error

func (*IndexFile) Read

func (i *IndexFile) Read(p []byte) (n int, err error)

func (*IndexFile) Readdir

func (i *IndexFile) Readdir(count int) ([]os.FileInfo, error)

func (*IndexFile) Seek

func (i *IndexFile) Seek(offset int64, whence int) (int64, error)

func (*IndexFile) Stat

func (i *IndexFile) Stat() (os.FileInfo, error)

type PluginBox

type PluginBox struct {
	Box     packr.Box
	Exposes []string
}

func GetRegisteredPluginBoxes

func GetRegisteredPluginBoxes() []PluginBox

type UnionHttpFs

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

func NewUnionHttpFs

func NewUnionHttpFs(boxes ...PluginBox) *UnionHttpFs

func (*UnionHttpFs) Open

func (p *UnionHttpFs) Open(name string) (http.File, error)

Jump to

Keyboard shortcuts

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