domain

package
v1.7.7 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DeleteSpaceEvent added in v1.5.1

type DeleteSpaceEvent struct {
	Time      int64  `json:"time"`
	Owner     string `json:"owner"`
	SpaceId   string `json:"space_id"`
	SpaceName string `json:"space_name"`
	DeletedBy string `json:"deleted_by"`
}

DeleteSpaceEvent

type Project

type Project struct {
	Id string

	Owner    domain.Account
	Type     domain.ProjType
	Protocol domain.ProtocolName
	Training domain.TrainingPlatform

	ProjectModifiableProperty

	RepoId string

	RelatedModels   domain.RelatedResources
	RelatedDatasets domain.RelatedResources

	CreatedAt int64
	UpdatedAt int64

	Version int

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

	Hardware  domain.Hardware
	BaseImage domain.BaseImage
}

func (*Project) GetComputeType added in v1.5.0

func (s *Project) GetComputeType() domain.ComputilityType

GetComputeType returns the compute type of the Space.

func (*Project) GetQuotaCount added in v1.5.0

func (s *Project) GetQuotaCount() int

GetQuotaCount returns the quota count of the Space.

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) PreCheck added in v1.5.0

func (m *Project) PreCheck() error

func (*Project) RelatedResources

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

func (*Project) ResourceIndex

func (p *Project) ResourceIndex() domain.ResourceIndex

func (*Project) ResourceObject

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

func (*Project) SetNoApplicationFile added in v1.5.0

func (s *Project) SetNoApplicationFile(noApplicationFile bool)

SetNoApplicationFile for set NoApplicationFile and Exception.

func (*Project) SetSpaceCommitId added in v1.5.0

func (s *Project) SetSpaceCommitId(commitId string)

SetSpaceCommitId for update space commitId.

type ProjectModifiableProperty

type ProjectModifiableProperty struct {
	Name               domain.ResourceName
	Desc               domain.ResourceDesc
	Title              domain.ResourceTitle
	CoverId            domain.CoverId
	RepoType           domain.RepoType
	Tags               []string
	TagKinds           []string
	Level              domain.ResourceLevel
	CommitId           string
	NoApplicationFile  bool
	Exception          domain.Exception
	CompPowerAllocated bool
}

type ProjectSummary

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

type SpaceEventProducer added in v1.5.1

type SpaceEventProducer interface {
	SendDeletedEvent(*DeleteSpaceEvent) error
}

type SpaceIndex added in v1.5.0

type SpaceIndex struct {
	Name  domain.ResourceName
	Owner domain.Account
	Id    domain.Identity
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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