model

package
v0.2.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Settings = &settings.Settings
)

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 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"`
	MigrationWaveID   *uint         `gorm:"index"`
	MigrationWave     *MigrationWave
}

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 Bucket

type Bucket = v3.Bucket

type BucketOwner

type BucketOwner = v3.BucketOwner

type BusinessService

type BusinessService struct {
	Model
	Name          string `gorm:"index;unique;not null"`
	Description   string
	Applications  []Application `gorm:"constraint:OnDelete:SET NULL"`
	StakeholderID *uint         `gorm:"index"`
	Stakeholder   *Stakeholder
}

type Dependency

type Dependency = v3.Dependency

type DependencyCyclicError

type DependencyCyclicError = v3.DependencyCyclicError

Errors

type Fact

type Fact = v3.Fact

type File

type File = v3.File

type Identity

type Identity = v3.Identity

type Import

type Import = v3.Import

type ImportSummary

type ImportSummary = v3.ImportSummary

type ImportTag

type ImportTag = v3.ImportTag

type IssueType

type IssueType = v3.IssueType

type JSON

type JSON = []byte

JSON field (data) type.

type JobFunction

type JobFunction struct {
	Model
	Username     string
	Name         string        `gorm:"index;unique;not null"`
	Stakeholders []Stakeholder `gorm:"constraint:OnDelete:SET NULL"`
}

type Metadata

type Metadata = v3.Metadata

type MigrationWave

type MigrationWave struct {
	Model
	Name              string
	StartDate         time.Time
	EndDate           time.Time
	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 = v3.Model

Unchanged models imported from previous migration.

type Project

type Project = v3.Project

type Proxy

type Proxy = v3.Proxy

type Review

type Review = v3.Review

type RuleBundle

type RuleBundle = v3.RuleBundle

type RuleSet

type RuleSet = v3.RuleSet

type Setting

type Setting = v3.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"`
}

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"`
}

type TTL

type TTL = v3.TTL

type Tag

type Tag = v3.Tag

type TagCategory

type TagCategory = v3.TagCategory

type Task

type Task = v3.Task

type TaskGroup

type TaskGroup = v3.TaskGroup

type TaskReport

type TaskReport = v3.TaskReport

type Ticket

type Ticket = v3.Ticket

type Tracker

type Tracker = v3.Tracker

Jump to

Keyboard shortcuts

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