Documentation ¶
Index ¶
- func ConvertError(err error) (out 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 NewInferenceRepository(mapper InferenceMapper) repository.Inference
- 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 NewProjectRepository(mapper ProjectMapper) repository.Project
- 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 InferenceDO
- type InferenceDetailDO
- type InferenceIndexDO
- type InferenceMapper
- type InferenceSummaryDO
- 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 ProjectDO
- type ProjectMapper
- type ProjectPropertyDO
- type ProjectResourceSummaryDO
- type ProjectSummaryDO
- 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 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 NewInferenceRepository ¶
func NewInferenceRepository(mapper InferenceMapper) repository.Inference
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 NewProjectRepository ¶
func NewProjectRepository(mapper ProjectMapper) repository.Project
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 }
type InferenceDO ¶
type InferenceDetailDO ¶
type InferenceDetailDO = domain.InferenceDetail
type InferenceIndexDO ¶
type InferenceIndexDO struct { Id string LastCommit string Project ResourceIndexDO }
type InferenceMapper ¶
type InferenceMapper interface { Insert(*InferenceDO, int) (string, error) Get(*InferenceIndexDO) (InferenceSummaryDO, error) UpdateDetail(*InferenceIndexDO, *InferenceDetailDO) error List(*ResourceIndexDO, string) ([]InferenceSummaryDO, int, error) }
type InferenceSummaryDO ¶
type InferenceSummaryDO struct { Id string InferenceDetailDO }
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 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 RelatedModels []ResourceIndexDO RelatedDatasets []ResourceIndexDO }
type ProjectMapper ¶
type ProjectMapper interface { Insert(ProjectDO) (string, error) Delete(*ResourceIndexDO) error Get(string, string) (ProjectDO, error) GetByName(string, string) (ProjectDO, error) GetSummary(string, string) (ProjectResourceSummaryDO, error) GetSummaryByName(string, string) (ResourceSummaryDO, error) ListUsersProjects(map[string][]string) ([]ProjectSummaryDO, error) ListAndSortByUpdateTime(string, *ResourceListDO) ([]ProjectSummaryDO, int, error) ListAndSortByFirstLetter(string, *ResourceListDO) ([]ProjectSummaryDO, int, error) ListAndSortByDownloadCount(string, *ResourceListDO) ([]ProjectSummaryDO, int, error) ListGlobalAndSortByUpdateTime(*GlobalResourceListDO) ([]ProjectSummaryDO, int, error) ListGlobalAndSortByFirstLetter(*GlobalResourceListDO) ([]ProjectSummaryDO, int, error) ListGlobalAndSortByDownloadCount(*GlobalResourceListDO) ([]ProjectSummaryDO, int, error) Search(do *GlobalResourceListDO, topNum int) ([]ResourceSummaryDO, int, error) IncreaseFork(ResourceIndexDO) error IncreaseDownload(ResourceIndexDO) error AddLike(ResourceIndexDO) error RemoveLike(ResourceIndexDO) error AddRelatedModel(*RelatedResourceDO) error RemoveRelatedModel(*RelatedResourceDO) error AddRelatedDataset(*RelatedResourceDO) error RemoveRelatedDataset(*RelatedResourceDO) error UpdateProperty(*ProjectPropertyDO) error }
type ProjectPropertyDO ¶
type ProjectResourceSummaryDO ¶
type ProjectResourceSummaryDO struct { ResourceSummaryDO Tags []string }
type ProjectSummaryDO ¶
type QuestionSubmissionDO ¶
type RelatedResourceDO ¶
type RelatedResourceDO struct { ResourceToUpdateDO ResourceOwner string ResourceId string }
type ResourceIndexDO ¶
type ResourceListDO ¶
type ResourceObjectDO ¶
type ResourceSummaryDO ¶
type 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 ¶
- access.go
- activity.go
- ai_question.go
- ai_question_do.go
- competition.go
- competition_do.go
- dataset.go
- dataset_update.go
- error.go
- finetune.go
- finetune_dos.go
- global_resource.go
- inference.go
- inference_dos.go
- like.go
- login.go
- luojia.go
- model.go
- model_update.go
- project.go
- project_update.go
- resource.go
- tags.go
- training.go
- training_dos.go
- wukong.go
- wukong_picture.go
Click to show internal directories.
Click to hide internal directories.