Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewProjectRepository ¶
func NewProjectRepository(mapper ProjectMapper) spacerepo.Project
Types ¶
type ProjectDO ¶
type ProjectDO struct {
Id string
Owner string
Name string
FL byte
Desc string
Title string
Type string
Level int
CoverId string
Protocol string
Training string
RepoType string
RepoId string
Tags []string
TagKinds []string
CreatedAt int64
UpdatedAt int64
Version int
LikeCount int
ForkCount int
DownloadCount int
CommitId string
NoApplicationFile bool
Exception string
CompPowerAllocated bool
Hardware string
BaseImage string
RelatedModels []repositories.ResourceIndexDO
RelatedDatasets []repositories.ResourceIndexDO
}
type ProjectMapper ¶
type ProjectMapper interface {
Insert(ProjectDO) (string, error)
Delete(*repositories.ResourceIndexDO) error
Get(string, string) (ProjectDO, error)
GetByName(string, string) (ProjectDO, error)
GetByRepoId(string) (ProjectDO, error)
GetSummary(string, string) (ProjectResourceSummaryDO, error)
GetSummaryByName(string, string) (repositories.ResourceSummaryDO, error)
ListUsersProjects(map[string][]string) ([]ProjectSummaryDO, error)
ListAndSortByUpdateTime(string, *repositories.ResourceListDO) ([]ProjectSummaryDO, int, error)
ListAndSortByFirstLetter(string, *repositories.ResourceListDO) ([]ProjectSummaryDO, int, error)
ListAndSortByDownloadCount(string, *repositories.ResourceListDO) ([]ProjectSummaryDO, int, error)
ListGlobalAndSortByUpdateTime(*repositories.GlobalResourceListDO) ([]ProjectSummaryDO, int, error)
ListGlobalAndSortByFirstLetter(*repositories.GlobalResourceListDO) ([]ProjectSummaryDO, int, error)
ListGlobalAndSortByDownloadCount(*repositories.GlobalResourceListDO) ([]ProjectSummaryDO, int, error)
Search(do *repositories.GlobalResourceListDO, topNum int) ([]repositories.ResourceSummaryDO, int, error)
IncreaseFork(repositories.ResourceIndexDO) error
IncreaseDownload(repositories.ResourceIndexDO) error
AddLike(repositories.ResourceIndexDO) error
RemoveLike(repositories.ResourceIndexDO) error
AddRelatedModel(*repositories.RelatedResourceDO) error
RemoveRelatedModel(*repositories.RelatedResourceDO) error
AddRelatedDataset(*repositories.RelatedResourceDO) error
RemoveRelatedDataset(*repositories.RelatedResourceDO) error
UpdateProperty(*ProjectPropertyDO) error
}
type ProjectPropertyDO ¶
type ProjectResourceSummaryDO ¶
type ProjectResourceSummaryDO struct {
repositories.ResourceSummaryDO
Tags []string
}
Click to show internal directories.
Click to hide internal directories.