domain

package
v0.0.0-...-d7fecdb Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 10, 2023 License: Apache-2.0 Imports: 9 Imported by: 6

Documentation

Index

Constants

View Source
const (
	AIQuestionStatusStart = "start"
	AIQuestionStatusEnd   = "end"
)
View Source
const (
	RepoTypePublic  = "public"
	RepoTypePrivate = "private"
	RepoTypeOnline  = "online"
)
View Source
const (
	ResourceProject = "project"
	ResourceDataset = "dataset"
	ResourceModel   = "model"

	SortTypeUpdateTime    = "update_time"
	SortTypeFirstLetter   = "first_letter"
	SortTypeDownloadCount = "download_count"
)

Variables

View Source
var (
	ActivityTypeFork   = activityType(activityTypeFork)
	ActivityTypeLike   = activityType(activityTypeLike)
	ActivityTypeCreate = activityType(activityTypeCreate)
	ActivityTypeDelete = activityType(activityTypeDelete)
)
View Source
var (
	BigmodelVQA         = BigmodelType(bigmodelVQA)
	BigmodelPanGu       = BigmodelType(bigmodelPanGu)
	BigmodelLuoJia      = BigmodelType(bigmodelLuoJia)
	BigmodelWuKong      = BigmodelType(bigmodelWuKong)
	BigmodelCodeGeex    = BigmodelType(bigmodelCodeGeex)
	BigmodelGenPicture  = BigmodelType(bigmodelGenPicture)
	BigmodelDescPicture = BigmodelType(bigmodelDescPicture)
)
View Source
var (
	CompetitionPhaseFinal       = competitionPhase("final")
	CompetitionPhasePreliminary = competitionPhase("preliminary")
)
View Source
var (
	ResourceTypeProject = resourceType(ResourceProject)
	ResourceTypeModel   = resourceType(ResourceModel)
	ResourceTypeDataset = resourceType(ResourceDataset)
)

Functions

func Init

func Init(cfg *Config)

func IsSameDomainValue

func IsSameDomainValue(a, b DomainValue) bool

func NewComputeFlavorVersion

func NewComputeFlavorVersion(flaver string, t string, version string) (ComputeFlavor, ComputeVersion, error)

Types

type Account

type Account interface {
	Account() string
}

Account

func NewAccount

func NewAccount(v string) (Account, error)

type Activity

type Activity struct {
	Type ActivityType
	Time int64

	RepoType RepoType

	ResourceObject
}

func (Activity) IsPublic

func (r Activity) IsPublic() bool

type ActivityType

type ActivityType interface {
	ActivityType() string
}

ActivityType

func NewActivityType

func NewActivityType(v string) (ActivityType, error)

type BigmodelType

type BigmodelType string

BigmodelType

type ChoiceQuestion

type ChoiceQuestion struct {
	Desc    string
	Answer  string
	Options []string
}

type City

type City interface {
	City() string
}

City

func NewCity

func NewCity(v string) (City, error)

type Competition

type Competition struct {
	CompetitionSummary

	Doc        URL
	Forum      Forum
	DatasetDoc URL
	DatasetURL URL
	Winners    Winners

	Type    CompetitionType
	Phase   CompetitionPhase
	Enabled bool
}

type CompetitionBonus

type CompetitionBonus interface {
	CompetitionBonus() int
}

CompetitionBonus

func NewCompetitionBonus

func NewCompetitionBonus(v int) (CompetitionBonus, error)

type CompetitionDesc

type CompetitionDesc interface {
	CompetitionDesc() string
}

CompetitionDesc

func NewCompetitionDesc

func NewCompetitionDesc(v string) (CompetitionDesc, error)

type CompetitionDuration

type CompetitionDuration interface {
	CompetitionDuration() string
}

CompetitionDuration

func NewCompetitionDuration

func NewCompetitionDuration(v string) (CompetitionDuration, error)

type CompetitionHost

type CompetitionHost interface {
	CompetitionHost() string
}

func NewCompetitionHost

func NewCompetitionHost(v string) (CompetitionHost, error)

type CompetitionIdentity

type CompetitionIdentity interface {
	CompetitionIdentity() string
}

CompetitionIdentity

func NewcompetitionIdentity

func NewcompetitionIdentity(v string) (CompetitionIdentity, error)

type CompetitionIndex

type CompetitionIndex struct {
	Id    string
	Phase CompetitionPhase
}

type CompetitionName

type CompetitionName interface {
	CompetitionName() string
}

CompetitionName

func NewCompetitionName

func NewCompetitionName(v string) (CompetitionName, error)

type CompetitionPhase

type CompetitionPhase interface {
	CompetitionPhase() string
	IsFinal() bool
}

CompetitionPhase

func NewCompetitionPhase

func NewCompetitionPhase(v string) (CompetitionPhase, error)

type CompetitionRepo

type CompetitionRepo struct {
	TeamId     string
	Individual Account

	Owner Account
	Repo  ResourceName
}

type CompetitionScoreOrder

type CompetitionScoreOrder interface {
	IsBetterThanB(a, b float32) bool
}

func NewCompetitionScoreOrder

func NewCompetitionScoreOrder(b bool) CompetitionScoreOrder

type CompetitionStatus

type CompetitionStatus interface {
	CompetitionStatus() string
	IsDone() bool
}

CompetitionStatus

func NewCompetitionStatus

func NewCompetitionStatus(v string) (CompetitionStatus, error)

type CompetitionSubmission

type CompetitionSubmission struct {
	Id string

	TeamId     string
	Individual Account

	SubmitAt int64
	OBSPath  string
	Status   string
	Score    float32
}

func (*CompetitionSubmission) IsSuccess

func (info *CompetitionSubmission) IsSuccess() bool

func (*CompetitionSubmission) IsTeamWork

func (r *CompetitionSubmission) IsTeamWork() bool

func (*CompetitionSubmission) Key

func (r *CompetitionSubmission) Key() string

type CompetitionSubmissionInfo

type CompetitionSubmissionInfo struct {
	Id     string
	Status string
	Score  float32
}

func (*CompetitionSubmissionInfo) IsSuccess

func (info *CompetitionSubmissionInfo) IsSuccess() bool

type CompetitionSummary

type CompetitionSummary struct {
	Id         string
	Name       CompetitionName
	Desc       CompetitionDesc
	Host       CompetitionHost
	Bonus      CompetitionBonus
	Status     CompetitionStatus
	Duration   CompetitionDuration
	Poster     URL
	ScoreOrder CompetitionScoreOrder
}

type CompetitionTeam

type CompetitionTeam struct {
	Id   string
	Name TeamName
}

type CompetitionType

type CompetitionType interface {
	CompetitionType() string
}

CompetitionType

func NewCompetitionType

func NewCompetitionType(v string) (CompetitionType, error)

type Competitor

type Competitor struct {
	CompetitorInfo

	Team     CompetitionTeam
	TeamRole TeamRole
}

type CompetitorInfo

type CompetitorInfo struct {
	Account  Account
	Name     CompetitorName
	City     City
	Email    Email
	Phone    Phone
	Identity CompetitionIdentity
	Province Province
	Detail   map[string]string
}

type CompetitorName

type CompetitorName interface {
	CompetitorName() string
}

CompetitorName

func NewCompetitorName

func NewCompetitorName(v string) (CompetitorName, error)

type CompetitorSummary

type CompetitorSummary struct {
	IsCompetitor bool
	TeamId       string
	TeamRole     TeamRole
}

type CompletionQuestion

type CompletionQuestion struct {
	Desc   string
	Info   string
	Answer string
}

type Compute

type Compute struct {
	Type    ComputeType
	Flavor  ComputeFlavor
	Version ComputeVersion
}

type ComputeFlavor

type ComputeFlavor interface {
	ComputeFlavor() string
}

ComputeFlavor

type ComputeType

type ComputeType interface {
	ComputeType() string
}

ComputeType

func NewComputeType

func NewComputeType(v string) (ComputeType, error)

type ComputeVersion

type ComputeVersion interface {
	ComputeVersion() string
}

ComputeVersion

func NewComputeVersion

func NewComputeVersion(v string) (ComputeVersion, error)

type Config

type Config struct {
	MaxBioLength          int `json:"max_bio_length"`
	MaxNameLength         int `json:"max_name_length"`
	MinNameLength         int `json:"min_name_length"`
	MaxTitleLength        int `json:"max_title_length"`
	MinTitleLength        int `json:"min_title_length"`
	MaxDescLength         int `json:"max_desc_length"`
	MaxNicknameLength     int `json:"max_nickname_length"`
	MaxRelatedResourceNum int `json:"max_related_resource_num"`

	Covers           []string `json:"covers"            required:"true"`
	Protocols        []string `json:"protocols"         required:"true"`
	ProjectType      []string `json:"project_type"      required:"true"`
	TrainingPlatform []string `json:"training_platform" required:"true"`
	AvatarURL        []string `json:"avatar_url"        required:"true"`

	MaxTrainingNameLength int `json:"max_training_name_length"`
	MinTrainingNameLength int `json:"min_training_name_length"`
	MaxTrainingDescLength int `json:"max_training_desc_length"`

	MaxFinetuneNameLength int `json:"max_finetune_name_length"`
	MinFinetuneNameLength int `json:"min_finetune_name_length"`

	WuKongPictureMaxDescLength int `json:"wukong_picture_max_desc_length"`

	// Key is the finetue model name
	Finetunes map[string]FinetuneParameterConfig `json:"finetunes"`
	// contains filtered or unexported fields
}
var DomainConfig Config

func (*Config) HasAvatarURL

func (cfg *Config) HasAvatarURL(v string) bool

func (*Config) SetDefault

func (cfg *Config) SetDefault()

func (*Config) Validate

func (r *Config) Validate() error

type CoverId

type CoverId interface {
	CoverId() string
}

TrainingPlatform

func NewConverId

func NewConverId(v string) (CoverId, error)

type CustomizedKey

type CustomizedKey interface {
	CustomizedKey() string
}

CustomizedKey

func NewCustomizedKey

func NewCustomizedKey(v string) (CustomizedKey, error)

type CustomizedValue

type CustomizedValue interface {
	CustomizedValue() string
}

CustomizedValue

func NewCustomizedValue

func NewCustomizedValue(v string) (CustomizedValue, error)

type Dataset

type Dataset struct {
	Id string

	Owner    Account
	Protocol ProtocolName

	DatasetModifiableProperty

	RepoId string

	CreatedAt int64
	UpdatedAt int64

	Version int

	// following fileds is not under the controlling of version
	LikeCount     int
	DownloadCount int

	RelatedModels   RelatedResources
	RelatedProjects RelatedResources
}

func (*Dataset) IsPrivate

func (d *Dataset) IsPrivate() bool

func (*Dataset) RelatedResources

func (d *Dataset) RelatedResources() []ResourceObjects

func (*Dataset) ResourceIndex

func (d *Dataset) ResourceIndex() ResourceIndex

func (*Dataset) ResourceObject

func (d *Dataset) ResourceObject() (ResourceObject, RepoType)

type DatasetModifiableProperty

type DatasetModifiableProperty struct {
	Name     ResourceName
	Desc     ResourceDesc
	Title    ResourceTitle
	RepoType RepoType
	Tags     []string
	TagKinds []string
}

type DatasetSummary

type DatasetSummary struct {
	Id            string
	Owner         Account
	Name          ResourceName
	Desc          ResourceDesc
	Title         ResourceTitle
	Tags          []string
	UpdatedAt     int64
	LikeCount     int
	DownloadCount int
}

type Directory

type Directory interface {
	Directory() string
	IsRootDir() bool
}

Directory

func NewDirectory

func NewDirectory(v string) (Directory, error)

type DomainTags

type DomainTags struct {
	Name   string
	Domain string `json:"domain"`
	Items  []Tags `json:"items"`
}

func (*DomainTags) GetKindsOfTags

func (t *DomainTags) GetKindsOfTags(tags []string) []string

type DomainValue

type DomainValue interface {
	DomainValue() string
}

DomainValue

type Email

type Email interface {
	Email() string
}

Email

func NewEmail

func NewEmail(v string) (Email, error)

type FilePath

type FilePath interface {
	FilePath() string
}

FilePath

func NewFilePath

func NewFilePath(v string) (FilePath, error)

type Finetune

type Finetune struct {
	Id        string
	CreatedAt int64

	FinetuneConfig

	// following fileds is not under the controlling of version
	Job       FinetuneJobInfo
	JobDetail FinetuneJobDetail
}

type FinetuneConfig

type FinetuneConfig struct {
	Name  FinetuneName
	Param FinetuneParameter
}

type FinetuneIndex

type FinetuneIndex struct {
	Id    string
	Owner Account
}

type FinetuneJob

type FinetuneJob struct {
	FinetuneJobInfo

	Status string
}

type FinetuneJobDetail

type FinetuneJobDetail struct {
	Error    string
	Status   string
	Duration int
}

type FinetuneJobInfo

type FinetuneJobInfo struct {
	JobId    string
	Endpoint string
}

type FinetuneName

type FinetuneName interface {
	FinetuneName() string
}

FinetuneName

func NewFinetuneName

func NewFinetuneName(v string) (FinetuneName, error)

type FinetuneParameter

type FinetuneParameter interface {
	Model() string
	Task() string
	Hyperparameters() map[string]string
}

func NewFinetuneParameter

func NewFinetuneParameter(model, task string, hyperparameters map[string]string) (
	FinetuneParameter, error,
)

type FinetuneParameterConfig

type FinetuneParameterConfig struct {
	Tasks           []string `json:"tasks"           required:"true"`
	Hyperparameters []string `json:"hyperparameters" required:"true"`
}

type FinetuneSummary

type FinetuneSummary struct {
	Id        string
	Name      FinetuneName
	CreatedAt int64

	FinetuneJobDetail
}

type FinetuneUserInfo

type FinetuneUserInfo struct {
	Expiry int64
}

type Forum

type Forum interface {
	Forum() string
}

Forum

func NewForum

func NewForum(v string) (Forum, error)

type Inference

type Inference struct {
	InferenceInfo

	// following fileds is not under the controlling of version
	InferenceDetail
}

type InferenceDetail

type InferenceDetail struct {
	// Expiry stores the time when the inference instance will exit.
	Expiry int64

	// Error stores the message when the reference instance starts failed
	Error string

	// AccessURL stores the url to access the inference service.
	AccessURL string
}

type InferenceIndex

type InferenceIndex struct {
	Project    ResourceIndex
	Id         string
	LastCommit string
}

type InferenceInfo

type InferenceInfo struct {
	InferenceIndex

	ProjectName   ResourceName
	ResourceLevel string
	Requester     string
}

type Input

type Input struct {
	Key CustomizedKey
	ResourceRef
}

type InputeFilePath

type InputeFilePath interface {
	InputeFilePath() string
}

InputFilePath

func NewInputeFilePath

func NewInputeFilePath(v string) (InputeFilePath, error)

type JobDetail

type JobDetail struct {
	Status     string
	Error      string
	LogPath    string
	AimPath    string
	OutputPath string
	Duration   int
}

type JobInfo

type JobInfo struct {
	Endpoint  string
	JobId     string
	LogDir    string
	OutputDir string
	AimDir    string
}

type KeyValue

type KeyValue struct {
	Key   CustomizedKey
	Value CustomizedValue
}

type Like

type Like struct {
	CreatedAt int64

	ResourceObject
}

type Login

type Login struct {
	Account Account
	Info    string
	Email   Email
	UserId  string
}

type LuoJiaRecord

type LuoJiaRecord struct {
	Id        string
	CreatedAt int64
}

type LuoJiaRecordIndex

type LuoJiaRecordIndex struct {
	User Account
	Id   string
}

type Model

type Model struct {
	Id string

	Owner    Account
	Protocol ProtocolName

	ModelModifiableProperty

	RepoId string

	RelatedDatasets RelatedResources

	CreatedAt int64
	UpdatedAt int64

	Version int

	// following fileds is not under the controlling of version
	LikeCount       int
	DownloadCount   int
	RelatedProjects RelatedResources
}

func (*Model) IsPrivate

func (m *Model) IsPrivate() bool

func (*Model) MaxRelatedResourceNum

func (m *Model) MaxRelatedResourceNum() int

func (*Model) RelatedResources

func (m *Model) RelatedResources() []ResourceObjects

func (*Model) ResourceIndex

func (m *Model) ResourceIndex() ResourceIndex

func (*Model) ResourceObject

func (m *Model) ResourceObject() (ResourceObject, RepoType)

type ModelModifiableProperty

type ModelModifiableProperty struct {
	Name     ResourceName
	Desc     ResourceDesc
	Title    ResourceTitle
	RepoType RepoType
	Tags     []string
	TagKinds []string
}

type ModelSummary

type ModelSummary struct {
	Id            string
	Owner         Account
	Name          ResourceName
	Desc          ResourceDesc
	Title         ResourceTitle
	Tags          []string
	UpdatedAt     int64
	LikeCount     int
	DownloadCount int
}

type Password

type Password interface {
	Password() string
}

Password

func NewPassword

func NewPassword(s string) (Password, error)

type Phone

type Phone interface {
	Phone() string
}

Phone

func NewPhone

func NewPhone(v string) (Phone, error)

type ProjType

type ProjType interface {
	ProjType() string
}

ProjType

func NewProjType

func NewProjType(v string) (ProjType, error)

type Project

type Project struct {
	Id string

	Owner    Account
	Type     ProjType
	Protocol ProtocolName
	Training TrainingPlatform

	ProjectModifiableProperty

	RepoId string

	RelatedModels   RelatedResources
	RelatedDatasets RelatedResources

	CreatedAt int64
	UpdatedAt int64

	Version int

	// following fileds is not under the controlling of version
	LikeCount     int
	ForkCount     int
	DownloadCount int
}

func (*Project) IsOnline

func (p *Project) IsOnline() bool

func (*Project) IsPrivate

func (p *Project) IsPrivate() bool

func (*Project) MaxRelatedResourceNum

func (p *Project) MaxRelatedResourceNum() int

func (*Project) RelatedResources

func (p *Project) RelatedResources() []ResourceObjects

func (*Project) ResourceIndex

func (p *Project) ResourceIndex() ResourceIndex

func (*Project) ResourceObject

func (p *Project) ResourceObject() (ResourceObject, RepoType)

type ProjectModifiableProperty

type ProjectModifiableProperty struct {
	Name     ResourceName
	Desc     ResourceDesc
	Title    ResourceTitle
	CoverId  CoverId
	RepoType RepoType
	Tags     []string
	TagKinds []string
	Level    ResourceLevel
}

type ProjectSummary

type ProjectSummary struct {
	Id            string
	Owner         Account
	Name          ResourceName
	Desc          ResourceDesc
	Title         ResourceTitle
	Level         ResourceLevel
	CoverId       CoverId
	Tags          []string
	UpdatedAt     int64
	LikeCount     int
	ForkCount     int
	DownloadCount int
}

type ProtocolName

type ProtocolName interface {
	ProtocolName() string
}

ProtocolName

func NewProtocolName

func NewProtocolName(v string) (ProtocolName, error)

type Province

type Province interface {
	Province() string
}

Province

func NewProvince

func NewProvince(v string) (Province, error)

type Question

type Question interface {
	Question() string
}

Question

func NewQuestion

func NewQuestion(v string) (Question, error)

type QuestionSubmission

type QuestionSubmission struct {
	Id      string
	Account Account
	Date    string
	Status  string
	Expiry  int64
	Score   int
	Times   int
	Version int
}

type QuestionSubmissionInfo

type QuestionSubmissionInfo struct {
	Account Account
	Score   int
}

type RelatedResources

type RelatedResources []ResourceIndex

func (RelatedResources) Count

func (r RelatedResources) Count() int

func (RelatedResources) Has

func (r RelatedResources) Has(index *ResourceIndex) bool

type RepoDownloadedEvent

type RepoDownloadedEvent struct {
	Account Account
	Name    string
	RepoId  string
	Obj     ResourceObject
}

type RepoType

type RepoType interface {
	RepoType() string
}

RepoType

func NewRepoType

func NewRepoType(v string) (RepoType, error)

type ResourceDesc

type ResourceDesc interface {
	ResourceDesc() string

	DomainValue
}

ResourceDesc

func NewResourceDesc

func NewResourceDesc(v string) (ResourceDesc, error)

type ResourceIndex

type ResourceIndex struct {
	Owner Account
	Id    string
}

type ResourceLevel

type ResourceLevel interface {
	ResourceLevel() string
	Int() int
}

ResourceLevel

func NewResourceLevel

func NewResourceLevel(v string) ResourceLevel

func NewResourceLevelByNum

func NewResourceLevelByNum(v int) ResourceLevel

type ResourceLikedEvent

type ResourceLikedEvent struct {
	Account Account
	Obj     ResourceObject
}

type ResourceName

type ResourceName interface {
	ResourceName() string
	FirstLetterOfName() byte
}

Name

func NewResourceName

func NewResourceName(v string) (ResourceName, error)

type ResourceObject

type ResourceObject struct {
	Type ResourceType

	ResourceIndex
}

ResourceObject

func (*ResourceObject) String

func (r *ResourceObject) String() string

type ResourceObjects

type ResourceObjects struct {
	Type    ResourceType
	Objects []ResourceIndex
}

type ResourceRef

type ResourceRef struct {
	User   Account
	Type   ResourceType
	RepoId string
	File   InputeFilePath
}

type ResourceSummary

type ResourceSummary struct {
	Owner    Account
	Name     ResourceName
	Id       string
	RepoId   string
	RepoType RepoType
}

func (*ResourceSummary) IsOnline

func (s *ResourceSummary) IsOnline() bool

func (*ResourceSummary) IsPrivate

func (s *ResourceSummary) IsPrivate() bool

func (*ResourceSummary) IsPublic

func (s *ResourceSummary) IsPublic() bool

func (*ResourceSummary) ResourceIndex

func (s *ResourceSummary) ResourceIndex() ResourceIndex

type ResourceTitle

type ResourceTitle interface {
	ResourceTitle() string
	DomainValue
}

ResourceTitle

func NewResourceTitle

func NewResourceTitle(v string) (ResourceTitle, error)

type ResourceType

type ResourceType interface {
	ResourceType() string
}

ResourceType

func NewResourceType

func NewResourceType(v string) (ResourceType, error)

type ReverselyRelatedResourceInfo

type ReverselyRelatedResourceInfo struct {
	Promoter *ResourceIndex
	Resource *ResourceIndex
}

type SortType

type SortType interface {
	SortType() string
}

SortType

func NewSortType

func NewSortType(v string) (SortType, error)

type Tags

type Tags struct {
	Kind  string   `json:"kind"`
	Items []string `json:"items"`
}

type TeamName

type TeamName interface {
	TeamName() string
}

TeamName

func NewTeamName

func NewTeamName(v string) (TeamName, error)

type TeamRole

type TeamRole interface {
	TeamRole() string
	IsLeader() bool
}

TeamRole

func NewTeamRole

func NewTeamRole(v string) (TeamRole, error)

type TrainingConfig

type TrainingConfig struct {
	ProjectName   ResourceName
	ProjectRepoId string

	Name TrainingName
	Desc TrainingDesc

	CodeDir  Directory
	BootFile FilePath

	Hyperparameters []KeyValue
	Env             []KeyValue
	Inputs          []Input
	EnableOutput    bool
	EnableAim       bool

	Compute Compute
}

type TrainingCreatedEvent

type TrainingCreatedEvent struct {
	Account        Account
	TrainingIndex  TrainingIndex
	TrainingInputs []Input
}

training

type TrainingDesc

type TrainingDesc interface {
	TrainingDesc() string
}

TrainingDesc

func NewTrainingDesc

func NewTrainingDesc(v string) (TrainingDesc, error)

type TrainingIndex

type TrainingIndex struct {
	Project    ResourceIndex
	TrainingId string
}

type TrainingName

type TrainingName interface {
	TrainingName() string
}

TrainingName

func NewTrainingName

func NewTrainingName(v string) (TrainingName, error)

type TrainingPlatform

type TrainingPlatform interface {
	TrainingPlatform() string
}

TrainingPlatform

func NewTrainingPlatform

func NewTrainingPlatform(v string) (TrainingPlatform, error)

type TrainingSummary

type TrainingSummary struct {
	Id        string
	Name      TrainingName
	Desc      TrainingDesc
	Error     string
	Status    string
	Duration  int
	CreatedAt int64
}

type URL

type URL interface {
	URL() string
}

URL

func NewURL

func NewURL(v string) (URL, error)

type UserActivity

type UserActivity struct {
	Owner Account

	Activity
}

UserActivity

type UserLike

type UserLike struct {
	Owner Account

	Like
}

type UserLuoJiaRecord

type UserLuoJiaRecord struct {
	User Account

	LuoJiaRecord
}

type UserSignedInEvent

type UserSignedInEvent struct {
	Account Account
}

type UserTraining

type UserTraining struct {
	Id        string
	Owner     Account
	ProjectId string

	TrainingConfig

	CreatedAt int64

	// following fileds is not under the controlling of version
	Job       JobInfo
	JobDetail JobDetail
}

type Winners

type Winners interface {
	Winners() string
}

Winners

func NewWinners

func NewWinners(v string) (Winners, error)

type WuKongPicture

type WuKongPicture struct {
	Id        string
	Owner     Account
	OBSPath   string
	Level     WuKongPictureLevel
	Diggs     []string
	DiggCount int
	Version   int
	CreatedAt string

	WuKongPictureMeta
}

type WuKongPictureDesc

type WuKongPictureDesc interface {
	WuKongPictureDesc() string
}

WuKongPictureDesc

func NewWuKongPictureDesc

func NewWuKongPictureDesc(v string) (WuKongPictureDesc, error)

type WuKongPictureLevel

type WuKongPictureLevel interface {
	WuKongPictureLevel() string
	Int() int
	IsOfficial() bool
}

wukong level

func NewWuKongPictureLevel

func NewWuKongPictureLevel(v string) WuKongPictureLevel

func NewWuKongPictureLevelByNum

func NewWuKongPictureLevelByNum(v int) WuKongPictureLevel

type WuKongPictureMeta

type WuKongPictureMeta struct {
	Style string
	Desc  WuKongPictureDesc
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL