compiler

package
v1.7.1 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrUndefinedEnvVariable = errors.New("environment variable is undefined or empty")

ErrUndefinedEnvVariable occurs when requested environment variable is undefined or empty

Functions

func GOROOT added in v1.7.1

func GOROOT() (string, error)

GOROOT returns host GOROOT variable from OS environment vars or from Go tool environment.

func LookupEnv added in v1.7.1

func LookupEnv(ctx context.Context, varName string) (string, error)

LookupEnv gets variable by name from shell environment or using Go environment using "go env" tool.

Types

type BuildError

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

BuildError is build error

func (*BuildError) Error

func (e *BuildError) Error() string

Error implements error

type BuildService

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

BuildService is WASM build service

func NewBuildService

func NewBuildService(log *zap.SugaredLogger, store storage.StoreProvider) BuildService

NewBuildService is BuildService constructor

func (BuildService) Build

func (s BuildService) Build(ctx context.Context, data []byte) (*Result, error)

Build compiles Go source to WASM and returns result

func (BuildService) GetArtifact

func (s BuildService) GetArtifact(id storage.ArtifactID) (io.ReadCloser, error)

GetArtifact returns artifact by id

type Result

type Result struct {
	// FileName is artifact file name
	FileName string
}

Result is WASM build result

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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