server

package
v0.0.2-0...-a5fe278 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2021 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Overview

Package server serves the user interface and API, and manages the data model.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Build

func Build(out io.Writer, g *model.Graph) error

Build saves the graph as Go source code and tries to "go build" it. Console output from the command (*not* the compiled program) is written to out.

func GeneratePackage

func GeneratePackage(out io.Writer, g *model.Graph) (string, error)

GeneratePackage writes the Go view of the graph to a file called generated.go in ${GOPATH}/src/${g.PackagePath}/, returning the full path. Messages from the generation process will be written to out.

func GenerateRunner

func GenerateRunner(out io.Writer, g *model.Graph) (string, error)

GenerateRunner generates a `go run`-able; either the output package itself, or the package together with a temporary runner, returning the full path to the runnable path. Messages from the generation process will be written to out.

func GuessPackagePath

func GuessPackagePath(srcPath string) (string, error)

GuessPackagePath attempts to find a sensible package path.

func Install

func Install(out io.Writer, g *model.Graph) error

Install saves the graph as Go source code and tries to "go install" it. Console output from the command (*not* the compiled program) is written to out.

func New

func New(uiParams view.Params) *server

New returns a new server.

func SaveJSONFile

func SaveJSONFile(g *model.Graph) error

SaveJSONFile saves the JSON-encoded Graph to the SourcePath.

Types

This section is empty.

Directories

Path Synopsis
Package view provides the user interface.
Package view provides the user interface.

Jump to

Keyboard shortcuts

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