Documentation ¶
Index ¶
- func IsErrorConcurrentUpdating(err error) bool
- func IsErrorDuplicateCreating(err error) bool
- func IsErrorResourceNotExists(err error) bool
- type AIQuestion
- type Activity
- type ActivityFindOption
- type Competition
- type CompetitionInfo
- type CompetitionListOption
- type CompetitionSummary
- type Dataset
- type DatasetPropertyUpdateInfo
- type ErrorConcurrentUpdating
- type ErrorDuplicateCreating
- type ErrorResourceNotExists
- type ExcendMaximumPageNumError
- type Finetune
- type GlobalResourceListOption
- type Like
- type LikeFindOption
- type Login
- type LuoJia
- type Model
- type ModelPropertyUpdateInfo
- type RelatedResourceInfo
- type ResourceListOption
- type ResourceSearchOption
- type ResourceSearchResult
- type ResourceSummaryListOption
- type ResourceToUpdate
- type Tags
- type Training
- type UserDatasetsInfo
- type UserFinetunes
- type UserModelsInfo
- type UserResourceListOption
- type WuKong
- type WuKongPicture
- type WuKongPictureListOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AIQuestion ¶
type AIQuestion interface { GetResult(string) ([]domain.QuestionSubmissionInfo, error) GetCompetitorAndSubmission(string, domain.Account) ( isCompetitor bool, highestScore int, submission domain.QuestionSubmission, err error, ) SaveCompetitor(string, *domain.CompetitorInfo) error GetQuestions(pool string, choice, completion []int) ( []domain.ChoiceQuestion, []domain.CompletionQuestion, error, ) GetSubmission(qid string, user domain.Account, date string) ( domain.QuestionSubmission, error, ) SaveSubmission(qid string, v *domain.QuestionSubmission) (string, error) }
type Activity ¶
type Activity interface { Save(*domain.UserActivity) error Find(domain.Account, ActivityFindOption) ([]domain.Activity, error) }
type ActivityFindOption ¶
type ActivityFindOption struct { }
type Competition ¶
type Competition interface { List(*CompetitionListOption) ([]CompetitionSummary, error) Get(*domain.CompetitionIndex, domain.Account) ( CompetitionInfo, domain.CompetitorSummary, error, ) GetTeam(*domain.CompetitionIndex, domain.Account) ([]domain.Competitor, error) GetResult(*domain.CompetitionIndex) ( order domain.CompetitionScoreOrder, teams []domain.CompetitionTeam, results []domain.CompetitionSubmission, err error, ) GetSubmisstions(*domain.CompetitionIndex, domain.Account) ( domain.CompetitionRepo, []domain.CompetitionSubmission, error, ) SaveSubmission(*domain.CompetitionIndex, *domain.CompetitionSubmission) (string, error) UpdateSubmission(*domain.CompetitionIndex, *domain.CompetitionSubmissionInfo) error GetCompetitorAndSubmission(*domain.CompetitionIndex, domain.Account) ( bool, []domain.CompetitionSubmissionInfo, error, ) SaveCompetitor(*domain.CompetitionIndex, *domain.CompetitorInfo) error AddRelatedProject(*domain.CompetitionIndex, *domain.CompetitionRepo) error }
type CompetitionInfo ¶
type CompetitionInfo struct { domain.Competition CompetitorCount int }
type CompetitionListOption ¶
type CompetitionListOption struct { Status domain.CompetitionStatus Phase domain.CompetitionPhase Competitor domain.Account }
type CompetitionSummary ¶
type CompetitionSummary struct { domain.CompetitionSummary CompetitorCount int }
type Dataset ¶
type Dataset interface { Save(*domain.Dataset) (domain.Dataset, error) Delete(*domain.ResourceIndex) error Get(domain.Account, string) (domain.Dataset, error) GetByName(domain.Account, domain.ResourceName) (domain.Dataset, error) GetSummaryByName(domain.Account, domain.ResourceName) (domain.ResourceSummary, error) FindUserDatasets([]UserResourceListOption) ([]domain.DatasetSummary, error) ListSummary([]ResourceSummaryListOption) ([]domain.ResourceSummary, error) ListAndSortByUpdateTime(domain.Account, *ResourceListOption) (UserDatasetsInfo, error) ListAndSortByFirstLetter(domain.Account, *ResourceListOption) (UserDatasetsInfo, error) ListAndSortByDownloadCount(domain.Account, *ResourceListOption) (UserDatasetsInfo, error) ListGlobalAndSortByUpdateTime(*GlobalResourceListOption) (UserDatasetsInfo, error) ListGlobalAndSortByFirstLetter(*GlobalResourceListOption) (UserDatasetsInfo, error) ListGlobalAndSortByDownloadCount(*GlobalResourceListOption) (UserDatasetsInfo, error) Search(*ResourceSearchOption) (ResourceSearchResult, error) AddLike(*domain.ResourceIndex) error RemoveLike(*domain.ResourceIndex) error AddRelatedProject(*domain.ReverselyRelatedResourceInfo) error RemoveRelatedProject(*domain.ReverselyRelatedResourceInfo) error AddRelatedModel(*domain.ReverselyRelatedResourceInfo) error RemoveRelatedModel(*domain.ReverselyRelatedResourceInfo) error UpdateProperty(*DatasetPropertyUpdateInfo) error IncreaseDownload(*domain.ResourceIndex) error }
type DatasetPropertyUpdateInfo ¶
type DatasetPropertyUpdateInfo struct { ResourceToUpdate Property domain.DatasetModifiableProperty }
type ErrorConcurrentUpdating ¶
type ErrorConcurrentUpdating struct {
// contains filtered or unexported fields
}
ErrorConcurrentUpdating
func NewErrorConcurrentUpdating ¶
func NewErrorConcurrentUpdating(err error) ErrorConcurrentUpdating
type ErrorDuplicateCreating ¶
type ErrorDuplicateCreating struct {
// contains filtered or unexported fields
}
ErrorDuplicateCreating
func NewErrorDuplicateCreating ¶
func NewErrorDuplicateCreating(err error) ErrorDuplicateCreating
type ErrorResourceNotExists ¶
type ErrorResourceNotExists struct {
// contains filtered or unexported fields
}
ErrorResourceNotExists
func NewErrorResourceNotExists ¶
func NewErrorResourceNotExists(err error) ErrorResourceNotExists
type ExcendMaximumPageNumError ¶ added in v1.3.1
type ExcendMaximumPageNumError struct {
// contains filtered or unexported fields
}
func NewExcendMaximumPageNumError ¶ added in v1.3.1
func NewExcendMaximumPageNumError(err error) ExcendMaximumPageNumError
type Finetune ¶
type Finetune interface { Save(domain.Account, *domain.Finetune, int) (string, error) Get(*domain.FinetuneIndex) (domain.Finetune, error) Delete(*domain.FinetuneIndex) error List(user domain.Account) (UserFinetunes, error) GetJob(*domain.FinetuneIndex) (domain.FinetuneJob, error) SaveJob(*domain.FinetuneIndex, *domain.FinetuneJobInfo) error UpdateJobDetail(*domain.FinetuneIndex, *domain.FinetuneJobDetail) error }
type GlobalResourceListOption ¶
type GlobalResourceListOption struct { Level domain.ResourceLevel Tags []string TagKinds []string ResourceListOption }
type LikeFindOption ¶
type LikeFindOption struct { }
type LuoJia ¶
type LuoJia interface { Save(*domain.UserLuoJiaRecord) (domain.LuoJiaRecord, error) List(domain.Account) ([]domain.LuoJiaRecord, error) }
type Model ¶
type Model interface { Save(*domain.Model) (domain.Model, error) Delete(*domain.ResourceIndex) error Get(domain.Account, string) (domain.Model, error) GetByName(domain.Account, domain.ResourceName) (domain.Model, error) GetSummaryByName(domain.Account, domain.ResourceName) (domain.ResourceSummary, error) FindUserModels([]UserResourceListOption) ([]domain.ModelSummary, error) ListSummary([]ResourceSummaryListOption) ([]domain.ResourceSummary, error) ListAndSortByUpdateTime(domain.Account, *ResourceListOption) (UserModelsInfo, error) ListAndSortByFirstLetter(domain.Account, *ResourceListOption) (UserModelsInfo, error) ListAndSortByDownloadCount(domain.Account, *ResourceListOption) (UserModelsInfo, error) ListGlobalAndSortByUpdateTime(*GlobalResourceListOption) (UserModelsInfo, error) ListGlobalAndSortByFirstLetter(*GlobalResourceListOption) (UserModelsInfo, error) ListGlobalAndSortByDownloadCount(*GlobalResourceListOption) (UserModelsInfo, error) Search(*ResourceSearchOption) (ResourceSearchResult, error) AddLike(*domain.ResourceIndex) error RemoveLike(*domain.ResourceIndex) error AddRelatedDataset(*RelatedResourceInfo) error RemoveRelatedDataset(*RelatedResourceInfo) error AddRelatedProject(*domain.ReverselyRelatedResourceInfo) error RemoveRelatedProject(*domain.ReverselyRelatedResourceInfo) error UpdateProperty(*ModelPropertyUpdateInfo) error IncreaseDownload(*domain.ResourceIndex) error }
type ModelPropertyUpdateInfo ¶
type ModelPropertyUpdateInfo struct { ResourceToUpdate Property domain.ModelModifiableProperty }
type RelatedResourceInfo ¶
type RelatedResourceInfo struct { ResourceToUpdate RelatedResource domain.ResourceIndex }
type ResourceListOption ¶
type ResourceSearchOption ¶
type ResourceSearchResult ¶
type ResourceSearchResult struct { Top []domain.ResourceSummary Total int }
type ResourceSummaryListOption ¶
type ResourceSummaryListOption struct { Owner domain.Account Name domain.ResourceName }
type ResourceToUpdate ¶
type Training ¶
type Training interface { Save(*domain.UserTraining, int) (string, error) Get(*domain.TrainingIndex) (domain.UserTraining, error) Delete(*domain.TrainingIndex) error List(user domain.Account, projectId string) ([]domain.TrainingSummary, int, error) GetTrainingConfig(*domain.TrainingIndex) (domain.TrainingConfig, error) GetLastTrainingConfig(*domain.ResourceIndex) (domain.TrainingConfig, error) SaveJob(*domain.TrainingIndex, *domain.JobInfo) error GetJob(*domain.TrainingIndex) (domain.JobInfo, error) UpdateJobDetail(*domain.TrainingIndex, *domain.JobDetail) error GetJobDetail(*domain.TrainingIndex) (domain.JobDetail, string, error) }
type UserDatasetsInfo ¶
type UserDatasetsInfo struct { Datasets []domain.DatasetSummary Total int }
type UserFinetunes ¶
type UserFinetunes struct { domain.FinetuneUserInfo Version int Data []domain.FinetuneSummary }
type UserModelsInfo ¶
type UserModelsInfo struct { Models []domain.ModelSummary Total int }
type UserResourceListOption ¶
type WuKongPicture ¶
type WuKongPicture interface { GetVersion(domain.Account) (int, error) ListLikesByUserName(domain.Account) ([]domain.WuKongPicture, int, error) ListPublicsByUserName(domain.Account) ([]domain.WuKongPicture, int, error) SaveLike(domain.Account, *domain.WuKongPicture, int) (string, error) SavePublic(*domain.WuKongPicture, int) (string, error) DeleteLike(domain.Account, string) error DeletePublic(domain.Account, string) error GetLikeByUserName(domain.Account, string) (domain.WuKongPicture, error) GetPublicByUserName(domain.Account, string) (domain.WuKongPicture, error) GetPublicsGlobal() ([]domain.WuKongPicture, error) GetOfficialPublicsGlobal() ([]domain.WuKongPicture, error) UpdatePublicPicture(domain.Account, string, int, *domain.WuKongPicture) error }
type WuKongPictureListOption ¶
Click to show internal directories.
Click to hide internal directories.