Documentation
¶
Index ¶
- func ConvertError(err error) (out error)
- func ConvertToResourceIndex(v []ResourceIndexDO) (r []domain.ResourceIndex, err error)
- func NewAIQuestionRepository(mapper AIQuestionMapper) repository.AIQuestion
- func NewActivityRepository(mapper ActivityMapper) repository.Activity
- func NewCompetitionRepository(mapper CompetitionMapper) repository.Competition
- func NewDatasetRepository(mapper DatasetMapper) repository.Dataset
- func NewErrorConcurrentUpdating(err error) errorConcurrentUpdating
- func NewErrorDataNotExists(err error) errorDataNotExists
- func NewErrorDuplicateCreating(err error) errorDuplicateCreating
- func NewFinetuneRepository(mapper FinetuneMapper) repository.Finetune
- func NewLikeRepository(mapper LikeMapper) repository.Like
- func NewLoginRepository(mapper LoginMapper) repository.Login
- func NewLuoJiaRepository(mapper LuoJiaMapper) repository.LuoJia
- func NewModelRepository(mapper ModelMapper) repository.Model
- func NewTagsRepository(mapper TagsMapper) repository.Tags
- func NewTrainingRepository(mapper TrainingMapper) repository.Training
- func NewWuKongPictureRepository(mapper WuKongPictureMapper) repository.WuKongPicture
- func NewWuKongRepository(mapper WuKongMapper) repository.WuKong
- type AIQuestionMapper
- type Access
- type ActivityDO
- type ActivityListDO
- type ActivityMapper
- type ChoiceQuestionDO
- type CompetitionDO
- type CompetitionIndexDO
- type CompetitionListOptionDO
- type CompetitionMapper
- type CompetitionRepoDO
- type CompetitionSubmissionDO
- type CompetitionSubmissionInfoDO
- type CompetitionSummaryDO
- type CompetitionTeamDO
- type CompetitorDO
- type CompetitorInfoDO
- type CompetitorSummaryDO
- type CompletionQuestionDO
- type ComputeDO
- type DatasetDO
- type DatasetMapper
- type DatasetPropertyDO
- type DatasetSummaryDO
- type DomainTagsDo
- type FinetuneConfigDO
- type FinetuneDetailDO
- type FinetuneIndexDO
- type FinetuneJobDO
- type FinetuneJobDetailDO
- type FinetuneJobInfoDO
- type FinetuneMapper
- type FinetuneSummaryDO
- type GlobalResourceListDO
- type InputDO
- type KeyValueDO
- type LikeDO
- type LikeListDO
- type LikeMapper
- type LoginDO
- type LoginMapper
- type LuoJiaMapper
- type LuoJiaRecordDO
- type LuoJiaRecordIndexDO
- type ModelDO
- type ModelMapper
- type ModelPropertyDO
- type ModelSummaryDO
- type QuestionSubmissionDO
- type QuestionSubmissionInfoDO
- type RelatedResourceDO
- type ResourceIndexDO
- type ResourceListDO
- type ResourceObjectDO
- type ResourceSummaryDO
- type ResourceToUpdateDO
- type ReverselyRelatedResourceInfoDO
- type TagsDo
- type TagsMapper
- type TrainingConfigDO
- type TrainingDetailDO
- type TrainingIndexDO
- type TrainingJobDetailDO
- type TrainingJobInfoDO
- type TrainingMapper
- type TrainingSummaryDO
- type UserFinetuneDO
- type UserFinetunesDO
- type UserLuoJiaRecordDO
- type UserTrainingDO
- type WuKongMapper
- type WuKongPictureDO
- type WuKongPictureListOptionDO
- type WuKongPictureMapper
- type WuKongPictureMetaDO
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertToResourceIndex ¶ added in v1.3.2
func ConvertToResourceIndex(v []ResourceIndexDO) (r []domain.ResourceIndex, err error)
func NewAIQuestionRepository ¶
func NewAIQuestionRepository(mapper AIQuestionMapper) repository.AIQuestion
func NewActivityRepository ¶
func NewActivityRepository(mapper ActivityMapper) repository.Activity
func NewCompetitionRepository ¶
func NewCompetitionRepository(mapper CompetitionMapper) repository.Competition
func NewDatasetRepository ¶
func NewDatasetRepository(mapper DatasetMapper) repository.Dataset
func NewErrorConcurrentUpdating ¶
func NewErrorConcurrentUpdating(err error) errorConcurrentUpdating
func NewErrorDataNotExists ¶
func NewErrorDataNotExists(err error) errorDataNotExists
func NewErrorDuplicateCreating ¶
func NewErrorDuplicateCreating(err error) errorDuplicateCreating
func NewFinetuneRepository ¶
func NewFinetuneRepository(mapper FinetuneMapper) repository.Finetune
func NewLikeRepository ¶
func NewLikeRepository(mapper LikeMapper) repository.Like
func NewLoginRepository ¶
func NewLoginRepository(mapper LoginMapper) repository.Login
TODO: mapper can be mysql
func NewLuoJiaRepository ¶
func NewLuoJiaRepository(mapper LuoJiaMapper) repository.LuoJia
func NewModelRepository ¶
func NewModelRepository(mapper ModelMapper) repository.Model
func NewTagsRepository ¶
func NewTagsRepository(mapper TagsMapper) repository.Tags
func NewTrainingRepository ¶
func NewTrainingRepository(mapper TrainingMapper) repository.Training
func NewWuKongPictureRepository ¶
func NewWuKongPictureRepository(mapper WuKongPictureMapper) repository.WuKongPicture
func NewWuKongRepository ¶
func NewWuKongRepository(mapper WuKongMapper) repository.WuKong
Types ¶
type AIQuestionMapper ¶
type AIQuestionMapper interface {
GetCompetitorAndSubmission(string, string) (
bool, int, QuestionSubmissionDO, error,
)
SaveCompetitor(string, *CompetitorInfoDO) error
InsertSubmission(string, *QuestionSubmissionDO) (string, error)
UpdateSubmission(string, *QuestionSubmissionDO) error
GetSubmission(qid, competitor, date string) (QuestionSubmissionDO, error)
GetQuestions(pool string, choice, completion []int) (
[]ChoiceQuestionDO,
[]CompletionQuestionDO, error,
)
GetResult(string) ([]QuestionSubmissionInfoDO, error)
}
type Access ¶
type Access interface {
Insert(key, value string) error
Get(key string) (string, error)
Expire(key string, expire int64) error
}
func NewAccessRepo ¶
type ActivityDO ¶
type ActivityDO struct {
Type string
Time int64
RepoType string
ResourceObjectDO
}
type ActivityListDO ¶
type ActivityListDO struct {
}
type ActivityMapper ¶
type ActivityMapper interface {
Insert(string, ActivityDO) error
List(string, ActivityListDO) ([]ActivityDO, error)
}
type ChoiceQuestionDO ¶
type ChoiceQuestionDO = domain.ChoiceQuestion
type CompetitionDO ¶
type CompetitionIndexDO ¶
type CompetitionListOptionDO ¶
type CompetitionMapper ¶
type CompetitionMapper interface {
List(*CompetitionListOptionDO) ([]CompetitionSummaryDO, error)
Get(index *CompetitionIndexDO, competitor string) (
CompetitionDO, CompetitorSummaryDO, error,
)
GetTeam(index *CompetitionIndexDO, competitor string) ([]CompetitorDO, error)
GetResult(*CompetitionIndexDO) (
bool, []CompetitionTeamDO, []CompetitionSubmissionDO, error,
)
GetSubmisstions(index *CompetitionIndexDO, competitor string) (
CompetitionRepoDO, []CompetitionSubmissionDO, error,
)
InsertSubmission(*CompetitionIndexDO, *CompetitionSubmissionDO) (string, error)
UpdateSubmission(*CompetitionIndexDO, *CompetitionSubmissionInfoDO) error
GetCompetitorAndSubmission(*CompetitionIndexDO, string) (
bool, []CompetitionSubmissionInfoDO, error,
)
SaveCompetitor(*CompetitionIndexDO, *CompetitorInfoDO) error
AddRelatedProject(*CompetitionIndexDO, *CompetitionRepoDO) error
}
type CompetitionRepoDO ¶
type CompetitionSubmissionDO ¶
type CompetitionSubmissionInfoDO ¶
type CompetitionSubmissionInfoDO = domain.CompetitionSubmissionInfo
type CompetitionSummaryDO ¶
type CompetitionTeamDO ¶
type CompetitorDO ¶
type CompetitorDO struct {
CompetitorInfoDO
TeamId string
TeamRole string
TeamName string
}
type CompetitorInfoDO ¶
type CompetitorSummaryDO ¶
type CompletionQuestionDO ¶
type CompletionQuestionDO = domain.CompletionQuestion
type DatasetDO ¶
type DatasetDO struct {
Id string
Owner string
Name string
FL byte
Desc string
Title string
Protocol string
RepoType string
RepoId string
Tags []string
TagKinds []string
CreatedAt int64
UpdatedAt int64
Version int
LikeCount int
DownloadCount int
RelatedModels []ResourceIndexDO
RelatedProjects []ResourceIndexDO
}
type DatasetMapper ¶
type DatasetMapper interface {
Insert(DatasetDO) (string, error)
Delete(*ResourceIndexDO) error
Get(string, string) (DatasetDO, error)
GetByName(string, string) (DatasetDO, error)
GetSummaryByName(string, string) (ResourceSummaryDO, error)
ListUsersDatasets(map[string][]string) ([]DatasetSummaryDO, error)
ListSummary(map[string][]string) ([]ResourceSummaryDO, error)
ListAndSortByUpdateTime(string, *ResourceListDO) ([]DatasetSummaryDO, int, error)
ListAndSortByFirstLetter(string, *ResourceListDO) ([]DatasetSummaryDO, int, error)
ListAndSortByDownloadCount(string, *ResourceListDO) ([]DatasetSummaryDO, int, error)
ListGlobalAndSortByUpdateTime(*GlobalResourceListDO) ([]DatasetSummaryDO, int, error)
ListGlobalAndSortByFirstLetter(*GlobalResourceListDO) ([]DatasetSummaryDO, int, error)
ListGlobalAndSortByDownloadCount(*GlobalResourceListDO) ([]DatasetSummaryDO, int, error)
Search(do *GlobalResourceListDO, topNum int) ([]ResourceSummaryDO, int, error)
IncreaseDownload(ResourceIndexDO) error
AddLike(ResourceIndexDO) error
RemoveLike(ResourceIndexDO) error
AddRelatedProject(*ReverselyRelatedResourceInfoDO) error
RemoveRelatedProject(*ReverselyRelatedResourceInfoDO) error
AddRelatedModel(*ReverselyRelatedResourceInfoDO) error
RemoveRelatedModel(*ReverselyRelatedResourceInfoDO) error
UpdateProperty(*DatasetPropertyDO) error
}
type DatasetPropertyDO ¶
type DatasetSummaryDO ¶
type DomainTagsDo ¶
type DomainTagsDo = domain.DomainTags
type FinetuneConfigDO ¶
type FinetuneDetailDO ¶
type FinetuneDetailDO struct {
Id string
CreatedAt int64
FinetuneConfigDO
Job FinetuneJobInfoDO
JobDetail FinetuneJobDetailDO
}
type FinetuneIndexDO ¶
type FinetuneJobDO ¶
type FinetuneJobDO = domain.FinetuneJob
type FinetuneJobDetailDO ¶
type FinetuneJobDetailDO = domain.FinetuneJobDetail
type FinetuneJobInfoDO ¶
type FinetuneJobInfoDO = domain.FinetuneJobInfo
type FinetuneMapper ¶
type FinetuneMapper interface {
Delete(*FinetuneIndexDO) error
Insert(*UserFinetuneDO, int) (string, error)
Get(*FinetuneIndexDO) (FinetuneDetailDO, error)
List(user string) (UserFinetunesDO, int, error)
GetJob(*FinetuneIndexDO) (FinetuneJobDO, error)
UpdateJobInfo(*FinetuneIndexDO, *FinetuneJobInfoDO) error
UpdateJobDetail(*FinetuneIndexDO, *FinetuneJobDetailDO) error
}
type FinetuneSummaryDO ¶
type FinetuneSummaryDO struct {
Id string
Name string
CreatedAt int64
FinetuneJobDetailDO
}
type GlobalResourceListDO ¶
type GlobalResourceListDO struct {
ResourceListDO
Level int
Tags []string
TagKinds []string
}
func SearchOptionToListDO ¶ added in v1.3.2
func SearchOptionToListDO( opt *repository.ResourceSearchOption, ) (do GlobalResourceListDO)
func ToGlobalResourceListDO ¶ added in v1.3.2
func ToGlobalResourceListDO( opt *repository.GlobalResourceListOption, ) (do GlobalResourceListDO)
type KeyValueDO ¶
type LikeDO ¶
type LikeDO struct {
CreatedAt int64
ResourceObjectDO
}
type LikeListDO ¶
type LikeListDO struct {
}
type LikeMapper ¶
type LoginMapper ¶
type LuoJiaMapper ¶
type LuoJiaMapper interface {
Insert(*UserLuoJiaRecordDO) (string, error)
List(string) ([]LuoJiaRecordDO, error)
}
type LuoJiaRecordDO ¶
type LuoJiaRecordIndexDO ¶
type ModelDO ¶
type ModelDO struct {
Id string
Owner string
Name string
FL byte
Desc string
Title string
Protocol string
RepoType string
RepoId string
Tags []string
TagKinds []string
CreatedAt int64
UpdatedAt int64
Version int
LikeCount int
DownloadCount int
RelatedDatasets []ResourceIndexDO
RelatedProjects []ResourceIndexDO
}
type ModelMapper ¶
type ModelMapper interface {
Insert(ModelDO) (string, error)
Delete(*ResourceIndexDO) error
Get(string, string) (ModelDO, error)
GetByName(string, string) (ModelDO, error)
GetSummaryByName(string, string) (ResourceSummaryDO, error)
ListUsersModels(map[string][]string) ([]ModelSummaryDO, error)
ListSummary(map[string][]string) ([]ResourceSummaryDO, error)
ListAndSortByUpdateTime(string, *ResourceListDO) ([]ModelSummaryDO, int, error)
ListAndSortByFirstLetter(string, *ResourceListDO) ([]ModelSummaryDO, int, error)
ListAndSortByDownloadCount(string, *ResourceListDO) ([]ModelSummaryDO, int, error)
ListGlobalAndSortByUpdateTime(*GlobalResourceListDO) ([]ModelSummaryDO, int, error)
ListGlobalAndSortByFirstLetter(*GlobalResourceListDO) ([]ModelSummaryDO, int, error)
ListGlobalAndSortByDownloadCount(*GlobalResourceListDO) ([]ModelSummaryDO, int, error)
Search(do *GlobalResourceListDO, topNum int) ([]ResourceSummaryDO, int, error)
IncreaseDownload(ResourceIndexDO) error
AddLike(ResourceIndexDO) error
RemoveLike(ResourceIndexDO) error
AddRelatedDataset(*RelatedResourceDO) error
RemoveRelatedDataset(*RelatedResourceDO) error
AddRelatedProject(*ReverselyRelatedResourceInfoDO) error
RemoveRelatedProject(*ReverselyRelatedResourceInfoDO) error
UpdateProperty(*ModelPropertyDO) error
}
type ModelPropertyDO ¶
type ModelSummaryDO ¶
type QuestionSubmissionDO ¶
type RelatedResourceDO ¶
type RelatedResourceDO struct {
ResourceToUpdateDO
ResourceOwner string
ResourceId string
}
func ToRelatedResourceDO ¶ added in v1.3.2
func ToRelatedResourceDO(info *repository.RelatedResourceInfo) RelatedResourceDO
type ResourceIndexDO ¶
func ToResourceIndexDO ¶ added in v1.3.2
func ToResourceIndexDO(r *domain.ResourceIndex) ResourceIndexDO
type ResourceListDO ¶
func ToResourceListDO ¶ added in v1.3.2
func ToResourceListDO(r *repository.ResourceListOption) ResourceListDO
type ResourceObjectDO ¶
type ResourceSummaryDO ¶
func (*ResourceSummaryDO) ToProject ¶ added in v1.3.2
func (do *ResourceSummaryDO) ToProject() (s domain.ResourceSummary, err error)
type ResourceToUpdateDO ¶
func ToResourceToUpdateDO ¶ added in v1.3.2
func ToResourceToUpdateDO(info *repository.ResourceToUpdate) ResourceToUpdateDO
type ReverselyRelatedResourceInfoDO ¶
type ReverselyRelatedResourceInfoDO struct {
Promoter ResourceIndexDO
Resource ResourceIndexDO
}
type TagsMapper ¶
type TagsMapper interface {
List([]string) ([]DomainTagsDo, error)
}
type TrainingConfigDO ¶
type TrainingDetailDO ¶
type TrainingDetailDO struct {
TrainingConfigDO
Job TrainingJobInfoDO
JobDetail TrainingJobDetailDO
CreatedAt int64
}
type TrainingIndexDO ¶
type TrainingJobDetailDO ¶
type TrainingJobInfoDO ¶
type TrainingMapper ¶
type TrainingMapper interface {
Insert(*UserTrainingDO, int) (string, error)
Delete(*TrainingIndexDO) error
Get(*TrainingIndexDO) (TrainingDetailDO, error)
GetTrainingConfig(*TrainingIndexDO) (TrainingConfigDO, error)
GetLastTrainingConfig(*ResourceIndexDO) (TrainingConfigDO, error)
List(user, projectId string) ([]TrainingSummaryDO, int, error)
UpdateJobInfo(*TrainingIndexDO, *TrainingJobInfoDO) error
GetJobInfo(*TrainingIndexDO) (TrainingJobInfoDO, error)
UpdateJobDetail(*TrainingIndexDO, *TrainingJobDetailDO) error
GetJobDetail(*TrainingIndexDO) (TrainingJobDetailDO, string, error)
}
type TrainingSummaryDO ¶
type UserFinetuneDO ¶
type UserFinetuneDO struct {
FinetuneIndexDO
FinetuneConfigDO
CreatedAt int64
}
type UserFinetunesDO ¶
type UserFinetunesDO struct {
Expiry int64
Data []FinetuneSummaryDO
}
type UserLuoJiaRecordDO ¶
type UserLuoJiaRecordDO struct {
User string
LuoJiaRecordDO
}
type UserTrainingDO ¶
type UserTrainingDO struct {
Id string
Owner string
ProjectId string
TrainingConfigDO
CreatedAt int64
}
type WuKongPictureDO ¶
type WuKongPictureListOptionDO ¶
type WuKongPictureListOptionDO = repository.WuKongPictureListOption
type WuKongPictureMapper ¶
type WuKongPictureMapper interface {
GetVersion(string) (int, error)
ListLikesByUserName(string) ([]WuKongPictureDO, int, error)
ListPublicsByUserName(string) ([]WuKongPictureDO, int, error)
InsertIntoLikes(string, *WuKongPictureDO, int) (string, error)
InsertIntoPublics(string, *WuKongPictureDO, int) (string, error)
DeleteLike(string, string) error
DeletePublic(string, string) error
GetLikeByUserName(string, string) (WuKongPictureDO, error)
GetPublicByUserName(string, string) (WuKongPictureDO, error)
GetPublicsGlobal() ([]WuKongPictureDO, error)
UpdatePublicPicture(string, string, int, *WuKongPictureDO) error
}
type WuKongPictureMetaDO ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.