Documentation ¶
Index ¶
- Constants
- Variables
- func AskForCodeIntegrationName(codeIntegrations []CodeIntegration) (name string, err error)
- func AskForCodeIntegrationNameIfExisted(name string, codeIntegrations []CodeIntegration) (string, error)
- func BranchesFromCodeIntegration(codeIntegration *CodeIntegration) []string
- func BundleCodeIntoTempFile(filesDir string, workspaceConfig *workspace.WorkspaceConfig) (close func(), tarGzFile *os.File, err error)
- func CloneCodeIntegrationVersion(ctx context.Context, codeIntegrationVersion *tensorleapapi.DatasetVersion, ...) ([]string, error)
- func CompareCodeVersion(ctx context.Context, compareVersion *CodeIntegrationVersion, ...) (bool, error)
- func CreateOrSelectBranch(branch string, branches []string, defaultBranch string) (selectedBranch string, err error)
- func DeleteCodeIntegration(ctx context.Context, codeIntegration *CodeIntegration) error
- func FetchFileFromTarGz(blobURL string, filename string) (string, error)
- func GetDatasetMappingYaml(ctx context.Context, codeIntegrationId, branch string) string
- func GetLatestVersion(ctx context.Context, codeIntegrationId string, branch string) (*tensorleapapi.DatasetVersion, error)
- func IsCodeParseFailed(codeIntegrationVersion *CodeIntegrationVersion) bool
- func IsCodeParsing(codeIntegrationVersion *CodeIntegrationVersion) bool
- func PrintCodeIntegrationVersionParserErr(civ *CodeIntegrationVersion)
- func SelectBranch(branches []string, defaultBranch string) (selectedBranch string, err error)
- func SelectOrCreateCodeIntegration(ctx context.Context, codeIntegrations []CodeIntegration, ...) (*tensorleapapi.Dataset, bool, error)
- func SyncBranchFromFlagAndConfig(flagBranch string, workspaceConfig *workspace.WorkspaceConfig, ...) (string, error)
- type CodeIntegration
- func AddCodeIntegration(ctx context.Context, name string) (*CodeIntegration, error)
- func CreateCodeIntegration(ctx context.Context, codeIntegrations []CodeIntegration) (*CodeIntegration, error)
- func GetAndUpdateCodeIntegrationIfNotExists(ctx context.Context, workspaceConfig *workspace.WorkspaceConfig) (code *CodeIntegration, wasCreated bool, err error)
- func GetCodeIntegrationFromFlag(ctx context.Context, codeIntegrationIdFlag string, askForNewProjectFirst bool) (code *CodeIntegration, wasCreated bool, err error)
- func GetCodeIntegrations(ctx context.Context) ([]CodeIntegration, error)
- type CodeIntegrationVersion
- func AddCodeIntegrationVersion(ctx context.Context, tarGzFile io.Reader, fileSize int64, ...) (*CodeIntegrationVersion, error)
- func GetCodeIntegration(ctx context.Context, id string) (*CodeIntegrationVersion, error)
- func GetCodeIntegrationVersions(ctx context.Context, codeIntegrationId string) ([]CodeIntegrationVersion, error)
- func PushCode(ctx context.Context, force bool, codeIntegrationId string, tarGzFile *os.File, ...) (pushed bool, current *CodeIntegrationVersion, err error)
- func WaitForCodeIntegrationStatus(ctx context.Context, codeIntegrationId string) (ok bool, codeIntegrationVersion *CodeIntegrationVersion, err error)
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 AskForCodeIntegrationNameIfExisted ¶ added in v0.0.84
func AskForCodeIntegrationNameIfExisted(name string, codeIntegrations []CodeIntegration) (string, error)
func BranchesFromCodeIntegration ¶ added in v0.0.84
func BranchesFromCodeIntegration(codeIntegration *CodeIntegration) []string
func BundleCodeIntoTempFile ¶ added in v0.0.20
func CloneCodeIntegrationVersion ¶
func CloneCodeIntegrationVersion(ctx context.Context, codeIntegrationVersion *tensorleapapi.DatasetVersion, outputDir string) ([]string, error)
func CompareCodeVersion ¶ added in v0.0.23
func CreateOrSelectBranch ¶ added in v0.0.84
func DeleteCodeIntegration ¶ added in v0.0.20
func DeleteCodeIntegration(ctx context.Context, codeIntegration *CodeIntegration) error
func FetchFileFromTarGz ¶ added in v0.0.26
func GetDatasetMappingYaml ¶ added in v0.0.26
func GetLatestVersion ¶
func GetLatestVersion(ctx context.Context, codeIntegrationId string, branch 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 SelectBranch ¶ added in v0.0.84
func SelectOrCreateCodeIntegration ¶ added in v0.0.20
func SelectOrCreateCodeIntegration(ctx context.Context, codeIntegrations []CodeIntegration, askIsCreateNewFirst bool) (*tensorleapapi.Dataset, bool, error)
func SyncBranchFromFlagAndConfig ¶ added in v0.0.84
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 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 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 WaitForCodeIntegrationStatus ¶ added in v0.0.22
Click to show internal directories.
Click to hide internal directories.