lib

package
v0.1.8-rc1 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2024 License: MIT Imports: 47 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConfigRollout = "ConfigRollout"
	RolloutStage  = "RolloutStage"
)

Variables

View Source
var (
	ErrBadConfigExtension = errors.New("bad config extension")
	ErrNotADictionary     = errors.New("`main' returned something that's not a dict")
	ErrNotStringKey       = errors.New("`main' returned a dict with non-string key")
	ErrNoProtobufValue    = errors.New("`main' returned a dict with non-protobuf value")
)
View Source
var (
	ErrStarlarkEval = errors.New("error evaluating starlark file")
	ErrLoadStarlark = errors.New("error loading starlark file")
)
View Source
var (
	ErrMainNotCallable = errors.New("`main` must be a function")
	ErrMainNotFound    = errors.New("`main` function not found")
)
View Source
var (
	ErrLoadMutable = errors.New("error opening mutable config file")
	ErrReadMutable = errors.New("error reading from mutable config file")
)
View Source
var (
	ErrInvalidConfig = errors.New("config is not valid")
)
View Source
var ErrorRemoteRepoNoIntegrityInfo = errors.New("missing integrity data")
View Source
var ErrorRemoteRepoNotDownloaded = errors.New("remote repo not in local cache")
View Source
var ErrorRemoteRepoValidationFailed = errors.New("failed to validate integrity")

Functions

This section is empty.

Types

type Compiler

type Compiler struct {
	MaterializedDir string

	ModuleService *ModuleService
	// contains filtered or unexported fields
}

func NewCompiler

func NewCompiler(protoconfRoot string, verboseLogging bool) *Compiler

func (*Compiler) CompileFile

func (c *Compiler) CompileFile(filename string) error

func (*Compiler) GetLoader

func (c *Compiler) GetLoader() *starlarkLoader

func (*Compiler) SyncModules

func (c *Compiler) SyncModules(ctx context.Context) error

type ModulePath

type ModulePath struct {
	Repo     string
	Filepath string
	Ext      string
}

func ParseModulePath

func ParseModulePath(moduleName string) *ModulePath

type ModuleService

type ModuleService struct {
	Config *module.ModuleServiceConfig
	// contains filtered or unexported fields
}

func NewModuleService

func NewModuleService(protoconfRoot string) *ModuleService

func (*ModuleService) Add

func (*ModuleService) Download

func (m *ModuleService) Download(ctx context.Context, r *module.RemoteRepo) error

func (*ModuleService) GenFileDescriptorSet

func (m *ModuleService) GenFileDescriptorSet(r *module.RemoteRepo) error

func (*ModuleService) GetProtoFilesRegistry

func (m *ModuleService) GetProtoFilesRegistry() *protoregistry.Files

func (*ModuleService) GetProtoPaths

func (m *ModuleService) GetProtoPaths() []string

func (*ModuleService) GetProtoRegistry

func (m *ModuleService) GetProtoRegistry() *utils.DescriptorRegistry

func (*ModuleService) Init

func (m *ModuleService) Init(ctx context.Context, initFiles ...string) error

func (*ModuleService) Load

func (m *ModuleService) Load(thread *starlark.Thread, moduleName string) (starlark.StringDict, error)

func (*ModuleService) LoadFromLockFile

func (m *ModuleService) LoadFromLockFile() error

func (*ModuleService) Lock

func (m *ModuleService) Lock() error

func (*ModuleService) Sync

func (m *ModuleService) Sync(ctx context.Context) error

func (*ModuleService) Validate

func (m *ModuleService) Validate(r *module.RemoteRepo) (string, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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