code

package
v0.0.74 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const BindingFilePath = "leap_mapping.yaml"

Variables

View Source
var CodeIntegrationEntityDesc = entity.NewEntityDescriptor[CodeIntegration](
	"code integration",
	"code integrations",
	func(p *CodeIntegration) string { return p.GetName() },
	func(p *CodeIntegration) string { return p.GetCid() },
)
View Source
var CodeIntegrationVersionEntityDesc = entity.NewEntityDescriptor[CodeIntegrationVersion](
	"code integration version",
	"code integration versions",
	func(p *CodeIntegrationVersion) string { return p.GetNote() },
	func(p *CodeIntegrationVersion) string { return p.GetCid() },
)
View Source
var ErrEmptyCodeIntegrationVersion = fmt.Errorf("CodeIntegration is empty")

Functions

func AskForCodeIntegrationName

func AskForCodeIntegrationName(codeIntegrations []CodeIntegration) (name string, err error)

func BundleCodeIntoTempFile added in v0.0.20

func BundleCodeIntoTempFile(filesDir string, workspaceConfig *workspace.WorkspaceConfig) (close func(), tarGzFile *os.File, err error)

func CloneCodeIntegrationVersion

func CloneCodeIntegrationVersion(ctx context.Context, codeIntegrationVersion *tensorleapapi.DatasetVersion, outputDir string) ([]string, error)

func CompareCodeVersion added in v0.0.23

func CompareCodeVersion(ctx context.Context, compareVersion *CodeIntegrationVersion, tarGzFile *os.File, entryFile, secretId string) (bool, error)

func DeleteCodeIntegration added in v0.0.20

func DeleteCodeIntegration(ctx context.Context, codeIntegration *CodeIntegration) error

func FetchFileFromTarGz added in v0.0.26

func FetchFileFromTarGz(blobURL string, filename string) (string, error)

func GetDatasetMappingYaml added in v0.0.26

func GetDatasetMappingYaml(ctx context.Context, codeIntegrationId string) string

func GetLatestVersion

func GetLatestVersion(ctx context.Context, codeIntegrationId string) (*tensorleapapi.DatasetVersion, error)

func IsCodeParseFailed added in v0.0.23

func IsCodeParseFailed(codeIntegrationVersion *CodeIntegrationVersion) bool

func IsCodeParsing added in v0.0.23

func IsCodeParsing(codeIntegrationVersion *CodeIntegrationVersion) bool

func PrintCodeIntegrationVersionParserErr added in v0.0.22

func PrintCodeIntegrationVersionParserErr(civ *CodeIntegrationVersion)

func SelectOrCreateCodeIntegration added in v0.0.20

func SelectOrCreateCodeIntegration(ctx context.Context, codeIntegrations []CodeIntegration, askIsCreateNewFirst bool) (*tensorleapapi.Dataset, bool, error)

Types

type CodeIntegration added in v0.0.20

type CodeIntegration = tensorleapapi.Dataset

func AddCodeIntegration added in v0.0.20

func AddCodeIntegration(ctx context.Context, name string) (*CodeIntegration, error)

func CreateCodeIntegration added in v0.0.20

func CreateCodeIntegration(ctx context.Context, codeIntegrations []CodeIntegration) (*CodeIntegration, error)

func GetAndUpdateCodeIntegrationIfNotExists added in v0.0.20

func GetAndUpdateCodeIntegrationIfNotExists(ctx context.Context, workspaceConfig *workspace.WorkspaceConfig) (code *CodeIntegration, wasCreated bool, err error)

func GetCodeIntegrationFromFlag added in v0.0.20

func GetCodeIntegrationFromFlag(ctx context.Context, codeIntegrationIdFlag string, askForNewProjectFirst bool) (code *CodeIntegration, wasCreated bool, err error)

func GetCodeIntegrations added in v0.0.20

func GetCodeIntegrations(ctx context.Context) ([]CodeIntegration, error)

type CodeIntegrationVersion added in v0.0.20

type CodeIntegrationVersion = tensorleapapi.DatasetVersion

func AddCodeIntegrationVersion added in v0.0.20

func AddCodeIntegrationVersion(ctx context.Context, tarGzFile io.Reader, fileSize int64, codeIntegrationId, entryFile, secretId string) (*CodeIntegrationVersion, error)

func GetCodeIntegration added in v0.0.22

func GetCodeIntegration(ctx context.Context, id string) (*CodeIntegrationVersion, error)

func GetCodeIntegrationVersions added in v0.0.20

func GetCodeIntegrationVersions(ctx context.Context, codeIntegrationId string) ([]CodeIntegrationVersion, error)

func PushCode added in v0.0.23

func PushCode(ctx context.Context, force bool, codeIntegrationId string, tarGzFile *os.File, entryFile, secretId string) (pushed bool, current *CodeIntegrationVersion, err error)

func WaitForCodeIntegrationStatus added in v0.0.22

func WaitForCodeIntegrationStatus(ctx context.Context, codeIntegrationId string) (ok bool, codeIntegrationVersion *CodeIntegrationVersion, err error)

Jump to

Keyboard shortcuts

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