Documentation ¶
Index ¶
- Variables
- func AskForNewProject(projectDetails *AddProjectDetails, existingProjectNames []string) error
- func BuildProjectContext(ctx context.Context, projectEntity *ProjectEntity, schemaVersion int) (*hub.ProjectContext, error)
- func CopyProject(sourceCtx context.Context, sourceProject *ProjectEntity, ...) error
- func DeleteProject(ctx context.Context, project *ProjectEntity) error
- func ExportProject(ctx context.Context, projectId string) (*http.Response, error)
- func ExportProjectIntoFile(ctx context.Context, project *ProjectEntity, outputDir string) error
- func ImportProject(ctx context.Context, projectName, importUrl string, meta *hub.ProjectMeta) error
- func ImportProjectFromFile(ctx context.Context, filePath, projectName string) error
- func PublishProject(ctx context.Context, projectId string, tarAccess *hub.FileAccessBySignedUrl) error
- func ValidateProjectName(projectName, defaultProjectName string, projects []ProjectEntity) (string, error)
- type AddProjectDetails
- type ProjectEntity
- func AddProject(ctx context.Context, projectDetails *AddProjectDetails) (*ProjectEntity, error)
- func AskAndAddProject(ctx context.Context, projectDetails *AddProjectDetails, ...) (*ProjectEntity, error)
- func GetProjectFromFlag(ctx context.Context, projectIdFlag string, askForNewProjectFirst bool) (project *ProjectEntity, wasCreated bool, err error)
- func GetProjects(ctx context.Context) ([]ProjectEntity, error)
- func SelectOrCreateProject(ctx context.Context, projects []ProjectEntity, askForNewProjectFirst bool) (*ProjectEntity, bool, error)
- func SelectProjectsToPublish(ctx context.Context, projectNamesFromArgs []string, allProjectFlag bool) ([]ProjectEntity, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ProjectEntityDesc = entity.NewEntityDescriptor[ProjectEntity]( "project", "projects", func(p *ProjectEntity) string { return p.GetName() }, func(p *ProjectEntity) string { return p.GetCid() }, )
Functions ¶
func AskForNewProject ¶
func AskForNewProject(projectDetails *AddProjectDetails, existingProjectNames []string) error
func BuildProjectContext ¶ added in v0.0.41
func BuildProjectContext(ctx context.Context, projectEntity *ProjectEntity, schemaVersion int) (*hub.ProjectContext, error)
func CopyProject ¶ added in v0.0.45
func DeleteProject ¶
func DeleteProject(ctx context.Context, project *ProjectEntity) error
func ExportProject ¶ added in v0.0.41
Not using apiClient because of the response type (file)
func ExportProjectIntoFile ¶ added in v0.0.41
func ExportProjectIntoFile(ctx context.Context, project *ProjectEntity, outputDir string) error
func ImportProject ¶ added in v0.0.41
func ImportProjectFromFile ¶ added in v0.0.45
func PublishProject ¶ added in v0.0.41
func ValidateProjectName ¶ added in v0.0.45
func ValidateProjectName(projectName, defaultProjectName string, projects []ProjectEntity) (string, error)
Types ¶
type AddProjectDetails ¶
type ProjectEntity ¶
type ProjectEntity = tensorleapapi.Project
func AddProject ¶
func AddProject(ctx context.Context, projectDetails *AddProjectDetails) (*ProjectEntity, error)
func AskAndAddProject ¶
func AskAndAddProject(ctx context.Context, projectDetails *AddProjectDetails, projects []ProjectEntity) (*ProjectEntity, error)
func GetProjectFromFlag ¶
func GetProjects ¶
func GetProjects(ctx context.Context) ([]ProjectEntity, error)
func SelectOrCreateProject ¶
func SelectOrCreateProject(ctx context.Context, projects []ProjectEntity, askForNewProjectFirst bool) (*ProjectEntity, bool, error)
func SelectProjectsToPublish ¶ added in v0.0.41
Click to show internal directories.
Click to hide internal directories.