loader

package
v0.464.0 Latest Latest
Warning

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

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

Documentation

Overview

package loader loads a source file into a sysl Module

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnsureSyslPb added in v0.249.0

func EnsureSyslPb(fs afero.Fs, root, syslPath string) error

EnsureSyslPb generates a binary protobuf message alongside a Sysl file if one does not already exist. TODO(ladeo): Remove once parsed modules can be easily passed into arr.ai.

func FindRootFromSyslModule

func FindRootFromSyslModule(modulePath string, fs afero.Fs) (string, error)

func LoadSyslModule

func LoadSyslModule(root, filename string, fs afero.Fs, logger *logrus.Logger) (*sysl.Module, string, error)

func LoadSyslModuleFromPb added in v0.374.0

func LoadSyslModuleFromPb(pbPath string, fs afero.Fs) (*sysl.Module, error)

LoadSyslPb decodes a Sysl module from a protobuf message.

Types

type ProjectConfiguration

type ProjectConfiguration struct {
	Module, Root string
	RootIsFound  bool
	Fs           afero.Fs
}

func NewProjectConfiguration

func NewProjectConfiguration() *ProjectConfiguration

func (*ProjectConfiguration) ConfigureProject

func (pc *ProjectConfiguration) ConfigureProject(root, module string, fs afero.Fs, logger *logrus.Logger) error

Jump to

Keyboard shortcuts

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