Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ExceedMaxRelatedResourceNumError ¶
type ExceedMaxRelatedResourceNumError struct {
// contains filtered or unexported fields
}
type GlobalProjectDTO ¶
type GlobalProjectDTO struct { ProjectSummaryDTO AvatarId string `json:"avatar_id"` }
type GlobalProjectsDTO ¶
type GlobalProjectsDTO struct { Total int `json:"total"` Projects []GlobalProjectDTO `json:"projects"` }
Project
type PrivateRepoError ¶
type PrivateRepoError struct {
// contains filtered or unexported fields
}
type ProjectCreateCmd ¶
type ProjectCreateCmd struct { Owner domain.Account Name domain.ResourceName Desc domain.ResourceDesc Title domain.ResourceTitle Type domain.ProjType CoverId domain.CoverId RepoType domain.RepoType Protocol domain.ProtocolName Training domain.TrainingPlatform Tags []string TagKinds []string All []domain.DomainTags Hardware domain.Hardware BaseImage domain.BaseImage }
func (*ProjectCreateCmd) Validate ¶
func (cmd *ProjectCreateCmd) Validate() error
type ProjectDTO ¶
type ProjectDTO struct { Id string `json:"id"` Owner string `json:"owner"` Name string `json:"name"` Desc string `json:"desc"` Title string `json:"title"` Type string `json:"type"` CoverId string `json:"cover_id"` Protocol string `json:"protocol"` Training string `json:"training"` RepoType string `json:"repo_type"` RepoId string `json:"repo_id"` Tags []string `json:"tags"` CreatedAt string `json:"created_at"` UpdatedAt string `json:"updated_at"` LikeCount int `json:"like_count"` ForkCount int `json:"fork_count"` DownloadCount int `json:"download_count"` }
type ProjectDetailDTO ¶
type ProjectDetailDTO struct { ProjectDTO RelatedModels []app.ResourceDTO `json:"related_models"` RelatedDatasets []app.ResourceDTO `json:"related_datasets"` }
type ProjectForkCmd ¶
type ProjectForkCmd struct { Name domain.ResourceName Desc domain.ResourceDesc From spacedomain.Project Owner domain.Account ValidTags []domain.DomainTags }
type ProjectService ¶
type ProjectService interface { CanApplyResourceName(domain.Account, domain.ResourceName) bool Create(*ProjectCreateCmd, platform.Repository) (ProjectDTO, error) Delete(*spacedomain.Project, platform.Repository) error GetByName(domain.Account, domain.ResourceName, bool) (ProjectDetailDTO, error) List(domain.Account, *app.ResourceListCmd) (ProjectsDTO, error) ListGlobal(*app.GlobalResourceListCmd) (GlobalProjectsDTO, error) Update(*spacedomain.Project, *ProjectUpdateCmd, platform.Repository) (ProjectDTO, error) Fork(*ProjectForkCmd, platform.Repository) (ProjectDTO, error) AddRelatedModel(*spacedomain.Project, *domain.ResourceIndex) error RemoveRelatedModel(*spacedomain.Project, *domain.ResourceIndex) error AddRelatedDataset(*spacedomain.Project, *domain.ResourceIndex) error RemoveRelatedDataset(*spacedomain.Project, *domain.ResourceIndex) error SetTags(*spacedomain.Project, *app.ResourceTagsUpdateCmd) error }
func NewProjectService ¶
func NewProjectService( user userrepo.User, repo spacerepo.Project, model repository.Model, dataset repository.Dataset, activity repository.Activity, pr platform.Repository, sender message.ResourceProducer, computilityApp computilityapp.ComputilityInternalAppService, ) ProjectService
type ProjectSummaryDTO ¶
type ProjectSummaryDTO struct { Id string `json:"id"` Owner string `json:"owner"` Name string `json:"name"` Desc string `json:"desc"` Title string `json:"title"` Level string `json:"level"` CoverId string `json:"cover_id"` Tags []string `json:"tags"` UpdatedAt string `json:"updated_at"` LikeCount int `json:"like_count"` ForkCount int `json:"fork_count"` DownloadCount int `json:"download_count"` }
type ProjectUpdateCmd ¶
type ProjectUpdateCmd struct { Name domain.ResourceName Desc domain.ResourceDesc Title domain.ResourceTitle RepoType domain.RepoType CoverId domain.CoverId }
only admin user can update level of project
type ProjectsDTO ¶
type ProjectsDTO struct { Total int `json:"total"` Projects []ProjectSummaryDTO `json:"projects"` }
Click to show internal directories.
Click to hide internal directories.