model

package
v0.3.0-alpha.4 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func All

func All() []interface{}

All builds all models. Models are enumerated such that each are listed after all the other models on which they may depend.

Types

type Analysis

type Analysis = model.Analysis

type Application

type Application struct {
	Model
	BucketOwner
	Name              string `gorm:"index;unique;not null"`
	Description       string
	Review            *Review `gorm:"constraint:OnDelete:CASCADE"`
	Repository        JSON    `gorm:"type:json"`
	Binary            string
	Facts             []Fact `gorm:"constraint:OnDelete:CASCADE"`
	Comments          string
	Tasks             []Task     `gorm:"constraint:OnDelete:CASCADE"`
	Tags              []Tag      `gorm:"many2many:ApplicationTags"`
	Identities        []Identity `gorm:"many2many:ApplicationIdentity;constraint:OnDelete:CASCADE"`
	BusinessServiceID *uint      `gorm:"index"`
	BusinessService   *BusinessService
	OwnerID           *uint         `gorm:"index"`
	Owner             *Stakeholder  `gorm:"foreignKey:OwnerID"`
	Contributors      []Stakeholder `gorm:"many2many:ApplicationContributors;constraint:OnDelete:CASCADE"`
	Analyses          []Analysis    `gorm:"constraint:OnDelete:CASCADE"`
	MigrationWaveID   *uint         `gorm:"index"`
	MigrationWave     *MigrationWave
	Ticket            *Ticket      `gorm:"constraint:OnDelete:CASCADE"`
	Assessments       []Assessment `gorm:"constraint:OnDelete:CASCADE"`
}

type ApplicationTag

type ApplicationTag struct {
	ApplicationID uint        `gorm:"primaryKey"`
	TagID         uint        `gorm:"primaryKey"`
	Source        string      `gorm:"primaryKey;not null"`
	Application   Application `gorm:"constraint:OnDelete:CASCADE"`
	Tag           Tag         `gorm:"constraint:OnDelete:CASCADE"`
}

ApplicationTag represents a row in the join table for the many-to-many relationship between Applications and Tags.

func (ApplicationTag) TableName

func (ApplicationTag) TableName() string

TableName must return "ApplicationTags" to ensure compatibility with the autogenerated join table name.

type Archetype

type Archetype struct {
	Model
	Name              string
	Description       string
	Comments          string
	Review            *Review            `gorm:"constraint:OnDelete:CASCADE"`
	Assessments       []Assessment       `gorm:"constraint:OnDelete:CASCADE"`
	CriteriaTags      []Tag              `gorm:"many2many:ArchetypeCriteriaTags"`
	Tags              []Tag              `gorm:"many2many:ArchetypeTags"`
	Stakeholders      []Stakeholder      `gorm:"many2many:ArchetypeStakeholders;constraint:OnDelete:CASCADE"`
	StakeholderGroups []StakeholderGroup `gorm:"many2many:ArchetypeStakeholderGroups;constraint:OnDelete:CASCADE"`
}

type Assessment

type Assessment struct {
	Model
	ApplicationID     *uint `gorm:"uniqueIndex:AssessmentA"`
	Application       *Application
	ArchetypeID       *uint `gorm:"uniqueIndex:AssessmentB"`
	Archetype         *Archetype
	QuestionnaireID   uint `gorm:"uniqueIndex:AssessmentA;uniqueIndex:AssessmentB"`
	Questionnaire     Questionnaire
	Sections          JSON               `gorm:"type:json"`
	Thresholds        JSON               `gorm:"type:json"`
	RiskMessages      JSON               `gorm:"type:json"`
	Stakeholders      []Stakeholder      `gorm:"many2many:AssessmentStakeholders;constraint:OnDelete:CASCADE"`
	StakeholderGroups []StakeholderGroup `gorm:"many2many:AssessmentStakeholderGroups;constraint:OnDelete:CASCADE"`
}

type Bucket

type Bucket = model.Bucket

type BucketOwner

type BucketOwner = model.BucketOwner

type BusinessService

type BusinessService = model.BusinessService

type Dependency

type Dependency = model.Dependency

type DependencyCyclicError

type DependencyCyclicError = model.DependencyCyclicError

type Fact

type Fact = model.Fact

type File

type File = model.File

type Identity

type Identity = model.Identity

type Import

type Import = model.Import

type ImportSummary

type ImportSummary = model.ImportSummary

type ImportTag

type ImportTag = model.ImportTag

type Incident

type Incident = model.Incident

type Issue

type Issue = model.Issue

type JSON

type JSON = []byte

JSON field (data) type.

type JobFunction

type JobFunction = model.JobFunction

type MigrationWave

type MigrationWave struct {
	Model
	Name              string             `gorm:"uniqueIndex:MigrationWaveA"`
	StartDate         time.Time          `gorm:"uniqueIndex:MigrationWaveA"`
	EndDate           time.Time          `gorm:"uniqueIndex:MigrationWaveA"`
	Applications      []Application      `gorm:"constraint:OnDelete:SET NULL"`
	Stakeholders      []Stakeholder      `gorm:"many2many:MigrationWaveStakeholders;constraint:OnDelete:CASCADE"`
	StakeholderGroups []StakeholderGroup `gorm:"many2many:MigrationWaveStakeholderGroups;constraint:OnDelete:CASCADE"`
}

type Model

type Model = model.Model

type Proxy

type Proxy = model.Proxy

type Questionnaire

type Questionnaire struct {
	Model
	UUID         *string `gorm:"uniqueIndex"`
	Name         string  `gorm:"unique"`
	Description  string
	Required     bool
	Sections     JSON         `gorm:"type:json"`
	Thresholds   JSON         `gorm:"type:json"`
	RiskMessages JSON         `gorm:"type:json"`
	Assessments  []Assessment `gorm:"constraint:OnDelete:CASCADE"`
}

type Review

type Review struct {
	Model
	BusinessCriticality uint   `gorm:"not null"`
	EffortEstimate      string `gorm:"not null"`
	ProposedAction      string `gorm:"not null"`
	WorkPriority        uint   `gorm:"not null"`
	Comments            string
	ApplicationID       *uint `gorm:"uniqueIndex"`
	Application         *Application
	ArchetypeID         *uint `gorm:"uniqueIndex"`
	Archetype           *Archetype
}

type Rule

type Rule = model.Rule

type RuleSet

type RuleSet = model.RuleSet

type Setting

type Setting = model.Setting

type Stakeholder

type Stakeholder struct {
	Model
	Name             string             `gorm:"not null;"`
	Email            string             `gorm:"index;unique;not null"`
	Groups           []StakeholderGroup `gorm:"many2many:StakeholderGroupStakeholder;constraint:OnDelete:CASCADE"`
	BusinessServices []BusinessService  `gorm:"constraint:OnDelete:SET NULL"`
	JobFunctionID    *uint              `gorm:"index"`
	JobFunction      *JobFunction
	Owns             []Application   `gorm:"foreignKey:OwnerID;constraint:OnDelete:SET NULL"`
	Contributes      []Application   `gorm:"many2many:ApplicationContributors;constraint:OnDelete:CASCADE"`
	MigrationWaves   []MigrationWave `gorm:"many2many:MigrationWaveStakeholders;constraint:OnDelete:CASCADE"`
	Assessments      []Assessment    `gorm:"many2many:AssessmentStakeholders;constraint:OnDelete:CASCADE"`
	Archetypes       []Archetype     `gorm:"many2many:ArchetypeStakeholders;constraint:OnDelete:CASCADE"`
}

type StakeholderGroup

type StakeholderGroup struct {
	Model
	Name           string `gorm:"index;unique;not null"`
	Username       string
	Description    string
	Stakeholders   []Stakeholder   `gorm:"many2many:StakeholderGroupStakeholder;constraint:OnDelete:CASCADE"`
	MigrationWaves []MigrationWave `gorm:"many2many:MigrationWaveStakeholderGroups;constraint:OnDelete:CASCADE"`
	Assessments    []Assessment    `gorm:"many2many:AssessmentStakeholderGroups;constraint:OnDelete:CASCADE"`
	Archetypes     []Archetype     `gorm:"many2many:ArchetypeStakeholderGroups;constraint:OnDelete:CASCADE"`
}

type TTL

type TTL = model.TTL

type Tag

type Tag = model.Tag

type TagCategory

type TagCategory = model.TagCategory

type Target

type Target = model.Target

type Task

type Task = model.Task

type TaskGroup

type TaskGroup = model.TaskGroup

type TaskReport

type TaskReport = model.TaskReport

type TechDependency

type TechDependency = model.TechDependency

type Ticket

type Ticket = model.Ticket

type Tracker

type Tracker = model.Tracker

Jump to

Keyboard shortcuts

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