Documentation ¶
Index ¶
- Constants
- type AlgorithmConfig
- type Job
- type JobAlgorithmType
- type JobParticipant
- type JobParticipantStatus
- type JobStatus
- type JobType
- type Project
- type ProjectData
- type ProjectDataStatus
- type ProjectInvitation
- type ProjectInvitationStatus
- type ProjectParticipant
- type ProjectParticipantStatus
- type ProjectStatus
- type Site
Constants ¶
const ( JobParticipantStatusUnknown = iota JobParticipantStatusInitiator JobParticipantStatusPending JobParticipantStatusApproved JobParticipantStatusRejected )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AlgorithmConfig ¶
type AlgorithmConfig struct { TrainingValidationEnabled bool `json:"training_validation_enabled"` TrainingValidationSizePercent uint `json:"training_validation_percent"` TrainingComponentsToDeploy []string `json:"training_component_list_to_deploy"` }
AlgorithmConfig contains algorithm configuration settings for the job
func (*AlgorithmConfig) Scan ¶
func (c *AlgorithmConfig) Scan(v interface{}) error
type Job ¶
type Job struct { gorm.Model Name string `json:"name" gorm:"type:varchar(255)"` Description string `json:"description" gorm:"type:text"` UUID string `json:"uuid" gorm:"type:varchar(36)"` ProjectUUID string `json:"project_uuid" gorm:"type:varchar(36)"` Type JobType `json:"type"` Status JobStatus `json:"status"` StatusMessage string `gorm:"type:text"` AlgorithmType JobAlgorithmType AlgorithmConfig AlgorithmConfig `gorm:"type:text"` ModelName string `json:"model_name" gorm:"type:varchar(255)"` PredictingModelUUID string `gorm:"type:varchar(36)"` InitiatingSiteUUID string `gorm:"type:varchar(36)"` InitiatingSiteName string `gorm:"type:varchar(255)"` InitiatingSitePartyID uint InitiatingUser string `gorm:"type:varchar(255)"` FATEJobID string `gorm:"type:varchar(255);column:fate_job_id"` FATEJobStatus string `gorm:"type:varchar(36);column:fate_job_status"` FATEModelID string `gorm:"type:varchar(255);column:fate_model_id"` FATEModelVersion string `gorm:"type:varchar(255);column:fate_model_version"` Conf string `gorm:"type:text"` DSL string `gorm:"type:text"` RequestJson string `gorm:"type:text"` FinishedAt time.Time Repo repo.JobRepository `gorm:"-"` }
Job represents a FATE job
func (*Job) UpdateStatus ¶
UpdateStatus updates the job's status
func (*Job) UpdateStatusMessage ¶
UpdateStatusMessage updates the job's status message
type JobAlgorithmType ¶
type JobAlgorithmType uint8
JobAlgorithmType is the enum of the job algorithm
const ( JobAlgorithmTypeUnknown JobAlgorithmType = iota JobAlgorithmTypeHomoLR JobAlgorithmTypeHomoSBT )
type JobParticipant ¶
type JobParticipant struct { gorm.Model UUID string `gorm:"type:varchar(36)"` JobUUID string `gorm:"type:varchar(36)"` SiteUUID string `gorm:"type:varchar(36)"` SiteName string `gorm:"type:varchar(255)"` SitePartyID uint DataUUID string `gorm:"type:varchar(36)"` DataName string `gorm:"type:varchar(255)"` DataDescription string `gorm:"type:text"` DataTableName string `gorm:"type:varchar(255)"` DataTableNamespace string `gorm:"type:varchar(255)"` DataLabelName string `gorm:"type:varchar(255)"` Status JobParticipantStatus Repo repo.JobParticipantRepository `gorm:"-"` }
JobParticipant represents a site and its data for a job
func (*JobParticipant) Create ¶
func (p *JobParticipant) Create() error
Create initialize the participant info and create it in the repo
func (*JobParticipant) GetStatus ¶
func (p *JobParticipant) GetStatus() int
func (*JobParticipant) UpdateStatus ¶
func (p *JobParticipant) UpdateStatus(status JobParticipantStatus) error
UpdateStatus changes the participant's status
type JobParticipantStatus ¶
type JobParticipantStatus uint8
JobParticipantStatus is the status of this participant in the job
func (JobParticipantStatus) String ¶
func (s JobParticipantStatus) String() string
type Project ¶
type Project struct { gorm.Model UUID string `gorm:"type:varchar(36);index;unique"` Name string `gorm:"type:varchar(255);not null"` Description string `json:"description" gorm:"type:text"` AutoApprovalEnabled bool `json:"auto_approval_enabled"` Status ProjectStatus *valueobject.ProjectCreatorInfo Repo repo.ProjectRepository `json:"-" gorm:"-"` }
Project contains jobs, sites and their data for collaborating via FATE
type ProjectData ¶
type ProjectData struct { gorm.Model Name string `gorm:"type:varchar(255)"` Description string `gorm:"type:text"` UUID string `gorm:"type:varchar(36)"` ProjectUUID string `gorm:"type:varchar(36)"` DataUUID string `gorm:"type:varchar(36)"` SiteUUID string `gorm:"type:varchar(36)"` SiteName string `gorm:"type:varchar(255)"` SitePartyID uint Status ProjectDataStatus TableName string `gorm:"type:varchar(255)"` TableNamespace string `gorm:"type:varchar(255)"` CreationTime time.Time UpdateTime time.Time Repo repo.ProjectDataRepository `gorm:"-"` }
ProjectData is a data association from a site to a project
type ProjectDataStatus ¶
type ProjectDataStatus uint8
ProjectDataStatus is the status of the association
const ( ProjectDataStatusUnknown ProjectDataStatus = iota ProjectDataStatusDismissed ProjectDataStatusAssociated )
type ProjectInvitation ¶
type ProjectInvitation struct { gorm.Model UUID string `gorm:"type:varchar(36)"` ProjectUUID string `gorm:"type:varchar(36)"` SiteUUID string `gorm:"type:varchar(36)"` Status ProjectInvitationStatus }
ProjectInvitation is an invitation from a project owner to a site
type ProjectInvitationStatus ¶
type ProjectInvitationStatus uint8
ProjectInvitationStatus is the status of the invitation
const ( ProjectInvitationStatusCreated ProjectInvitationStatus = iota ProjectInvitationStatusSent ProjectInvitationStatusRevoked ProjectInvitationStatusAccepted ProjectInvitationStatusRejected )
type ProjectParticipant ¶
type ProjectParticipant struct { gorm.Model UUID string `json:"uuid" gorm:"type:varchar(36)"` ProjectUUID string `json:"project_uuid" gorm:"type:varchar(36)"` SiteUUID string `json:"site_uuid" gorm:"type:varchar(36)"` SiteName string `json:"site_name" gorm:"type:varchar(255)"` SitePartyID uint `json:"site_party_id"` SiteDescription string `json:"site_description"` Status ProjectParticipantStatus `json:"status"` }
ProjectParticipant is a site joining a project
type ProjectParticipantStatus ¶
type ProjectParticipantStatus uint8
ProjectParticipantStatus is the status of the current participant
const ( ProjectParticipantStatusUnknown ProjectParticipantStatus = iota ProjectParticipantStatusOwner ProjectParticipantStatusPending ProjectParticipantStatusJoined ProjectParticipantStatusRejected ProjectParticipantStatusLeft ProjectParticipantStatusDismissed ProjectParticipantStatusRevoked )
type ProjectStatus ¶
type ProjectStatus uint8
ProjectStatus is the status of a project
const ( ProjectStatusUnknown ProjectStatus = iota ProjectStatusManaged ProjectStatusPending ProjectStatusJoined ProjectStatusRejected ProjectStatusLeft ProjectStatusClosed ProjectStatusDismissed )
type Site ¶
type Site struct { gorm.Model UUID string `json:"uuid" gorm:"type:varchar(36);index;unique"` // Name is the site's name Name string `json:"name" gorm:"type:varchar(255);unique;not null"` // Description contains more text about this site Description string `json:"description" gorm:"type:text"` // PartyID is the id of this party PartyID uint `json:"party_id" gorm:"column:party_id"` // ExternalHost is the IP or hostname this site portal service is exposed ExternalHost string `json:"external_host" gorm:"type:varchar(255);column:external_ip"` // ExternalPort the port number this site portal service is exposed ExternalPort uint `json:"external_port" gorm:"column:external_port"` // HTTPS indicate whether the endpoint is over https HTTPS bool `json:"https"` // ServerName is used by fml manager to verify endpoint's certificate when HTTPS is enabled ServerName string `json:"server_name"` // LastRegisteredAt is the last time this site has tried to register to the manager LastRegisteredAt time.Time `json:"last_connected_at"` // Repo is the repository interface Repo repo.SiteRepository `json:"-" gorm:"-"` }
Site contains all the info for the current site