project

package
v0.0.40 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

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 DeleteProject

func DeleteProject(ctx context.Context, project *ProjectEntity) error

Types

type AddProjectDetails

type AddProjectDetails struct {
	Name        string
	Description string
}

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 GetProjectFromFlag(ctx context.Context, projectIdFlag string, askForNewProjectFirst bool) (project *ProjectEntity, wasCreated bool, err error)

func GetProjects

func GetProjects(ctx context.Context) ([]ProjectEntity, error)

func SelectOrCreateProject

func SelectOrCreateProject(ctx context.Context, projects []ProjectEntity, askForNewProjectFirst bool) (*ProjectEntity, bool, error)

Jump to

Keyboard shortcuts

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