golang

package
v0.4.6 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2024 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateGoMain

func GenerateGoMain(scalefileSchema *scalefile.Schema, signatureSchema *signature.Schema, functionInfo *FunctionInfo) ([]byte, error)

func GenerateGoModfile

func GenerateGoModfile(signatureInfo *SignatureInfo, functionInfo *FunctionInfo, replacements []GoModReplacement) ([]byte, error)

Types

type FunctionInfo added in v0.4.6

type FunctionInfo struct {
	// PackageName is the name of the function package
	PackageName string

	// ImportPath is the import path for the function, always a path on disk
	ImportPath string
}

FunctionInfo is the import information for a Function

type Generator

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

func New

func New() *Generator

func (*Generator) GenerateGoMain

func (g *Generator) GenerateGoMain(scalefileSchema *scalefile.Schema, signatureSchema *signature.Schema, functionInfo *FunctionInfo) ([]byte, error)

func (*Generator) GenerateGoModfile

func (g *Generator) GenerateGoModfile(signatureInfo *SignatureInfo, functionInfo *FunctionInfo, replacements []GoModReplacement) ([]byte, error)

type GoModReplacement added in v0.4.6

type GoModReplacement struct {
	Name string
	Path string
}

type Manifest

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

func ParseManifest

func ParseManifest(data []byte) (*Manifest, error)

func (*Manifest) AddReplacement

func (m *Manifest) AddReplacement(oldDependency string, oldVersion string, newDependency string, newVersion string) error

func (*Manifest) AddRequire

func (m *Manifest) AddRequire(dependency string, version string) error

func (*Manifest) GetReplacement

func (m *Manifest) GetReplacement(dependency string) (string, string)

func (*Manifest) GetReplacements added in v0.4.6

func (m *Manifest) GetReplacements() []*modfile.Replace

func (*Manifest) HasReplacement

func (m *Manifest) HasReplacement(oldDependency string, oldVersion string, newDependency string, newVersion string, lax bool) bool

func (*Manifest) HasRequire

func (m *Manifest) HasRequire(dependency string, version string, lax bool) bool

func (*Manifest) RemoveReplacement

func (m *Manifest) RemoveReplacement(dependency string, version string) error

func (*Manifest) RemoveRequire

func (m *Manifest) RemoveRequire(dependency string) error

func (*Manifest) Write

func (m *Manifest) Write() ([]byte, error)

type SignatureInfo added in v0.4.6

type SignatureInfo struct {
	// Local specifies whether the signature is a locally importable signature
	Local bool

	// ImportPath is the import path for the signature, if the signature is local this will be a path on disk
	ImportPath string

	// ImportVersion is the version of the signature to import, if the signature is local this will be ignored
	ImportVersion string
}

SignatureInfo is the import information for a Signature

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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