devkit

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: May 9, 2019 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ApiVersionV1    = "v1"
	PackageJson     = "package.json"
	ClusterJsonTmpl = "cluster.json.tmpl"
	ConfigJson      = "config.json"
)
View Source
const DefaultServeAddr = "127.0.0.1:9191"

Variables

This section is empty.

Functions

func Create

func Create(metadata *opapp.Metadata, dir string) (string, error)

func IndexDirectory

func IndexDirectory(dir, baseURL string) (*opapp.IndexFile, error)

func IsAppDir

func IsAppDir(dirName string) (bool, error)

IsAppDir validate a app directory.

Checks for a valid package.json.

func Load

func Load(name string) (*opapp.OpApp, error)

func LoadArchive

func LoadArchive(in io.Reader) (*opapp.OpApp, error)

LoadArchive loads from a reader containing a compressed tar archive.

func LoadDir

func LoadDir(dir string) (*opapp.OpApp, error)

func LoadFile

func LoadFile(name string) (*opapp.OpApp, error)

LoadFile loads from an archive file.

func LoadFiles

func LoadFiles(files []opapp.BufferedFile) (*opapp.OpApp, error)

LoadFiles loads from in-memory files.

func Save

func Save(c *opapp.OpApp, outDir string) (string, error)

func StartLocalRepo

func StartLocalRepo(path, address string) error

StartLocalRepo starts a web server and serves files from the given path

Types

type RepositoryServer

type RepositoryServer struct {
	RepoPath string
}

RepositoryServer is an HTTP handler for serving a app repository.

func (*RepositoryServer) ServeHTTP

func (s *RepositoryServer) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP implements the http.Handler interface.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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