Documentation
¶
Index ¶
- Constants
- Variables
- func CandlepinContentGpgKeyUrl(orgID string, repoConfigUUID string) *string
- func CleanupURL(url string) string
- func ContentSummaryToContentCounts(summary *zest.ContentSummaryResponse) (ContentCountsType, ContentCountsType, ContentCountsType)
- func IsValidCoverageDemandMatchStatus(status string) bool
- func IsValidCoverageMatchStatus(status string) bool
- func IsValidUserPreferenceLabel(label string) bool
- func RepoConfigGpgKeyURL(orgID string, repoConfigUUID string) *string
- func ValidateUserPreferenceValue(label, value string) error
- type Base
- type ContentCountsType
- type CoverageDemandSignal
- type CoverageReport
- type CoverageReportPackage
- type CoverageUpload
- type Domain
- type EcosystemCoverageSummary
- type EcosystemCoverageSummaryEntry
- type Environment
- type Error
- type LightwellAdvisory
- type LightwellAdvisoryNotification
- type MavenPackage
- type Memo
- type ModuleStream
- type ModuleStreamProfiles
- type PackageGroup
- type Repository
- func (r *Repository) AfterFind(tx *gorm.DB) error
- func (r *Repository) AfterSave(tx *gorm.DB) error
- func (r *Repository) BeforeCreate(tx *gorm.DB) (err error)
- func (in *Repository) DeepCopy() *Repository
- func (in *Repository) DeepCopyInto(out *Repository)
- func (r *Repository) MapForUpdate() map[string]interface{}
- type RepositoryConfiguration
- func (rc *RepositoryConfiguration) AfterFind(tx *gorm.DB) error
- func (rc *RepositoryConfiguration) AfterSave(tx *gorm.DB) error
- func (rc *RepositoryConfiguration) BeforeCreate(tx *gorm.DB) error
- func (rc *RepositoryConfiguration) BeforeUpdate(tx *gorm.DB) error
- func (rc *RepositoryConfiguration) DedupeVersions(tx *gorm.DB) error
- func (rc *RepositoryConfiguration) DeepCopy() *RepositoryConfiguration
- func (rc *RepositoryConfiguration) DeepCopyInto(out *RepositoryConfiguration)
- func (rc *RepositoryConfiguration) IsCommunity() bool
- func (rc *RepositoryConfiguration) IsRedHat() bool
- func (rc *RepositoryConfiguration) MapForUpdate() map[string]interface{}
- func (rc *RepositoryConfiguration) ReplaceEmptyValues(tx *gorm.DB) error
- func (rc *RepositoryConfiguration) SetLabel(tx *gorm.DB) error
- type RepositoryEnvironment
- type RepositoryModuleStream
- type RepositoryPackageGroup
- type RepositoryRpm
- type Rpm
- type Snapshot
- type TaskInfo
- type TaskInfoRepositoryConfiguration
- type Template
- type TemplateRepositoryConfiguration
- type Upload
- type UserPreference
Constants ¶
const ( CoverageDemandMatchStatusNone = "none" CoverageDemandMatchStatusPartial = "partial" CoverageDemandSourceProspectDriven = "prospect-driven" )
const ( CoverageMatchStatusExact = "exact" CoverageMatchStatusPartial = "partial" CoverageMatchStatusNone = "none" )
const ( UserPreferenceLightwellNotificationEnabled = "lightwell-notification-enabled" UserPreferenceLightwellNotificationMinimum = "lightwell-notification-minimum" )
Valid user preference labels
const TableNameCoverageDemandSignals = "coverage_demand_signals"
const TableNameCoverageReportPackages = "coverage_report_packages"
const TableNameCoverageReports = "coverage_reports"
const TableNameCoverageUploads = "coverage_uploads"
const TableNameDomain = "domains"
const TableNameEnvironment = "environments"
const TableNameEnvironmentsRepositories = "repositories_environments"
const TableNameMavenPackages = "maven_packages"
const TableNameMemo = "memos"
const TableNameModuleStream = "module_streams"
const TableNamePackageGroup = "package_groups"
const TableNamePackageGroupsRepositories = "repositories_package_groups"
const TableNameRpm = "rpms"
const TableNameRpmsRepositories = "repositories_rpms"
const TableNameSnapshot = "snapshots"
const TableNameTemplatesRepositoryConfigurations = "templates_repository_configurations"
const TableNameUserPreferences = "user_preferences"
Variables ¶
var ValidUserPreferenceLabels = map[string]bool{ UserPreferenceLightwellNotificationEnabled: true, UserPreferenceLightwellNotificationMinimum: true, }
ValidUserPreferenceLabels is the set of accepted preference labels
var ValidUserPreferenceValues = map[string]map[string]bool{ UserPreferenceLightwellNotificationEnabled: { "true": true, "false": true, }, UserPreferenceLightwellNotificationMinimum: { "critical": true, "high": true, "medium": true, "low": true, }, }
ValidUserPreferenceValues maps labels to their accepted values. Labels with an empty set accept any non-empty value.
Functions ¶
func CleanupURL ¶
CleanupURL removes leading and trailing whitespace and adds trailing slash
func ContentSummaryToContentCounts ¶
func ContentSummaryToContentCounts(summary *zest.ContentSummaryResponse) (ContentCountsType, ContentCountsType, ContentCountsType)
func IsValidUserPreferenceLabel ¶
IsValidUserPreferenceLabel reports whether label is an accepted preference label
func RepoConfigGpgKeyURL ¶
func ValidateUserPreferenceValue ¶
ValidateUserPreferenceValue checks that value is valid for the given label
Types ¶
type Base ¶
type Base struct {
UUID string `gorm:"primary_key" json:"uuid"`
CreatedAt time.Time
UpdatedAt time.Time
}
func (*Base) DeepCopyInto ¶
type ContentCountsType ¶
func (*ContentCountsType) Scan ¶
func (cc *ContentCountsType) Scan(src interface{}) error
type CoverageDemandSignal ¶
type CoverageDemandSignal struct {
UUID string `json:"uuid" gorm:"primary_key;column:uuid"`
CreatedAt time.Time `json:"created_at" gorm:"not null"`
Ecosystem string `json:"ecosystem" gorm:"not null"`
Name string `json:"name" gorm:"not null"`
Version string `json:"version" gorm:"not null"`
Namespace *string `json:"namespace,omitempty"`
MatchStatus string `json:"match_status" gorm:"not null"`
Source string `json:"source" gorm:"not null"`
}
func (*CoverageDemandSignal) BeforeCreate ¶
func (d *CoverageDemandSignal) BeforeCreate(*gorm.DB) error
func (*CoverageDemandSignal) TableName ¶
func (*CoverageDemandSignal) TableName() string
type CoverageReport ¶
type CoverageReport struct {
UUID string `json:"uuid" gorm:"primary_key;column:uuid"`
CreatedAt time.Time `json:"created_at" gorm:"not null"`
OrgID string `json:"org_id" gorm:"not null"`
AccountID *string `json:"account_id,omitempty"`
Status string `json:"status" gorm:"not null"`
InputFormat *string `json:"input_format,omitempty"`
Total *int `json:"total,omitempty"`
ExactMatches *int `json:"exact_matches,omitempty"`
PartialMatches *int `json:"partial_matches,omitempty"`
Unmatched *int `json:"unmatched,omitempty"`
EcosystemCoverageSummary *EcosystemCoverageSummary `json:"ecosystem_coverage_summary,omitempty" gorm:"type:jsonb"`
CatalogSnapshotAt *time.Time `json:"catalog_snapshot_at,omitempty"`
AnalysisTaskError *string `json:"analysis_task_error,omitempty"`
AnalysisTaskUUID *string `json:"analysis_task_uuid,omitempty"`
CompletedAt *time.Time `json:"completed_at,omitempty"`
}
func (*CoverageReport) BeforeCreate ¶
func (cr *CoverageReport) BeforeCreate(*gorm.DB) error
func (*CoverageReport) MapForUpdate ¶
func (cr *CoverageReport) MapForUpdate() map[string]interface{}
func (*CoverageReport) TableName ¶
func (*CoverageReport) TableName() string
type CoverageReportPackage ¶
type CoverageReportPackage struct {
UUID string `json:"uuid" gorm:"primary_key;column:uuid"`
CoverageReportUUID string `json:"coverage_report_uuid" gorm:"not null"`
Ecosystem string `json:"ecosystem" gorm:"not null"`
Name string `json:"name" gorm:"not null"`
Version string `json:"version" gorm:"not null"`
Namespace *string `json:"namespace,omitempty"`
MatchStatus string `json:"match_status" gorm:"not null"`
}
func (*CoverageReportPackage) BeforeCreate ¶
func (p *CoverageReportPackage) BeforeCreate(*gorm.DB) error
func (*CoverageReportPackage) TableName ¶
func (*CoverageReportPackage) TableName() string
type CoverageUpload ¶
type CoverageUpload struct {
UUID string `json:"uuid" gorm:"primary_key;column:uuid"`
StorageKey string `json:"storage_key" gorm:"not null"`
Sha256 string `json:"sha256" gorm:"not null"`
SizeBytes int64 `json:"size_bytes" gorm:"not null"`
CreatedAt time.Time `json:"created_at" gorm:"not null"`
}
func (*CoverageUpload) BeforeCreate ¶
func (u *CoverageUpload) BeforeCreate(*gorm.DB) error
func (*CoverageUpload) TableName ¶
func (*CoverageUpload) TableName() string
type Domain ¶
type Domain struct {
DomainName string `json:"domain_name" gorm:"not null"`
OrgId string `json:"org_id" gorm:"not null"`
}
Domain model keeps track of the mapping between org id and the generated domain name
type EcosystemCoverageSummary ¶
type EcosystemCoverageSummary []EcosystemCoverageSummaryEntry
func (*EcosystemCoverageSummary) Scan ¶
func (s *EcosystemCoverageSummary) Scan(src interface{}) error
type Environment ¶
type Environment struct {
Base
ID string `json:"id" gorm:"not null"`
Name string `json:"name" gorm:"not null"`
Description string `json:"description"`
Repositories []Repository `gorm:"many2many:repositories_environments"`
}
RepositoryEnvironment model for the gorm object of the database which represents an environment which belongs to one repository.
func (*Environment) BeforeCreate ¶
func (r *Environment) BeforeCreate(tx *gorm.DB) (err error)
BeforeCreate hook performs validations and sets UUID of RepositoryEnvironment
func (*Environment) DeepCopy ¶
func (in *Environment) DeepCopy() *Environment
DeepCopy clone a RepositoryEnvironment struct
func (*Environment) DeepCopyInto ¶
func (in *Environment) DeepCopyInto(out *Environment)
type LightwellAdvisory ¶
type LightwellAdvisory struct {
Base
RepoName string `json:"repo_name" gorm:"not null"`
AdvisoryID string `json:"advisory_id" gorm:"not null"`
Severity string `json:"severity" gorm:"type:varchar(255)"`
Details string `json:"details"`
ReferenceURLs pq.StringArray `json:"reference_urls" gorm:"type:text[]"`
PackageName string `json:"package_name"`
FixedVersion string `json:"fixed_version"`
FixedVersions pq.StringArray `json:"fixed_versions" gorm:"type:text[]"`
RepositoryConfigurationUUID string `json:"repository_configuration_uuid" gorm:"not null"`
Checksum string `json:"checksum"`
}
func (*LightwellAdvisory) BeforeCreate ¶
func (la *LightwellAdvisory) BeforeCreate(tx *gorm.DB) error
func (*LightwellAdvisory) BeforeUpdate ¶
func (la *LightwellAdvisory) BeforeUpdate(tx *gorm.DB) error
func (*LightwellAdvisory) TableName ¶
func (*LightwellAdvisory) TableName() string
type LightwellAdvisoryNotification ¶
type LightwellAdvisoryNotification struct {
Base
RepositoryConfigurationUUID string `json:"repository_configuration_uuid" gorm:"not null"`
AdvisoryID string `json:"advisory_id" gorm:"not null"`
PackageName string `json:"package_name"`
OrgID string `json:"org_id" gorm:"not null;default:''"`
}
func (*LightwellAdvisoryNotification) BeforeCreate ¶
func (lan *LightwellAdvisoryNotification) BeforeCreate(tx *gorm.DB) error
func (*LightwellAdvisoryNotification) TableName ¶
func (*LightwellAdvisoryNotification) TableName() string
type MavenPackage ¶
type MavenPackage struct {
UUID string `json:"uuid" gorm:"primary_key;column:uuid"`
GroupID string `json:"group_id" gorm:"column:group_id;not null"`
Name string `json:"name" gorm:"column:name;not null"`
Summary *string `json:"summary,omitempty" gorm:"column:summary"`
License *string `json:"license,omitempty" gorm:"column:license"`
ProjectURL *string `json:"project_url,omitempty" gorm:"column:project_url"`
Author *string `json:"author,omitempty" gorm:"column:author"`
}
func (*MavenPackage) BeforeCreate ¶
func (m *MavenPackage) BeforeCreate(db *gorm.DB) (err error)
func (*MavenPackage) TableName ¶
func (*MavenPackage) TableName() string
type Memo ¶
type Memo struct {
UUID string `json:"uuid" gorm:"primary_key"`
Key string `json:"key" gorm:"uniqueIndex;not null"`
Memo json.RawMessage `json:"memo" gorm:"type:jsonb;not null;default:'{}'"`
}
Memo model holds one-off pieces of data that can be read and updated
type ModuleStream ¶
type ModuleStream struct {
Base
Name string `json:"name" gorm:"not null"`
Stream string `json:"stream"`
Version string `json:"version" gorm:"type:text"`
Context string `json:"context"`
Arch string `json:"arch"`
Summary string `json:"summary"`
Description string `json:"description"`
PackageNames pq.StringArray `json:"package_names" gorm:"type:text"`
Packages pq.StringArray `json:"packages" gorm:"type:text"`
Profiles ModuleStreamProfiles `json:"profiles" gorm:"type:jsonb,not null,default:{}"`
HashValue string `json:"hash" gorm:"not null"`
Repositories []Repository `gorm:"many2many:repositories_module_streams"`
}
func (*ModuleStream) BeforeCreate ¶
func (r *ModuleStream) BeforeCreate(tx *gorm.DB) (err error)
BeforeCreate hook performs validations and sets UUID of RepositoryPackageGroup
func (*ModuleStream) DeepCopy ¶
func (in *ModuleStream) DeepCopy() *ModuleStream
func (*ModuleStream) DeepCopyInto ¶
func (in *ModuleStream) DeepCopyInto(out *ModuleStream)
func (*ModuleStream) ToHashString ¶
func (r *ModuleStream) ToHashString() string
type ModuleStreamProfiles ¶
func (*ModuleStreamProfiles) Scan ¶
func (p *ModuleStreamProfiles) Scan(src interface{}) error
type PackageGroup ¶
type PackageGroup struct {
Base
ID string `json:"id" gorm:"not null"`
Name string `json:"name" gorm:"not null"`
Description string `json:"description"`
PackageList pq.StringArray `json:"packagelist" gorm:"type:text"`
HashValue string `json:"hashvalue"`
Repositories []Repository `gorm:"many2many:repositories_package_groups"`
}
RepositoryPackageGroup model for the gorm object of the database which represent a package group which belong to one repository.
func (*PackageGroup) BeforeCreate ¶
func (r *PackageGroup) BeforeCreate(tx *gorm.DB) (err error)
BeforeCreate hook performs validations and sets UUID of RepositoryPackageGroup
func (*PackageGroup) DeepCopy ¶
func (in *PackageGroup) DeepCopy() *PackageGroup
DeepCopy clone a RepositoryPackageGroup struct
func (*PackageGroup) DeepCopyInto ¶
func (in *PackageGroup) DeepCopyInto(out *PackageGroup)
type Repository ¶
type Repository struct {
Base
URL string `gorm:"unique;default:null"`
RepomdChecksum string `gorm:"default:null"`
Public bool
LastIntrospectionTime *time.Time `gorm:"default:null"`
LastIntrospectionSuccessTime *time.Time `gorm:"default:null"`
LastIntrospectionUpdateTime *time.Time `gorm:"default:null"`
LastIntrospectionError *string `gorm:"default:null"`
LastIntrospectionStatus string `gorm:"default:Pending"`
PackageCount int `gorm:"default:0;not null"`
BuildCount int `gorm:"default:0;not null"`
VersionCount int `gorm:"default:0;not null"`
FailedIntrospectionsCount int `gorm:"default:0;not null"`
RepositoryConfigurations []RepositoryConfiguration `gorm:"foreignKey:RepositoryUUID"`
Rpms []Rpm `gorm:"many2many:repositories_rpms"`
PackageGroups []PackageGroup `gorm:"many2many:repositories_package_groups"`
Origin string `gorm:"default:external;not null"`
ContentType string `gorm:"default:rpm;not null"`
SecurityLevel string `gorm:"default:null"`
PublishedDistURL string `gorm:"column:published_distribution_url;default:null"`
PublishedDistBasePath string `gorm:"column:published_distribution_base_path;default:null"`
}
https://stackoverflow.com/questions/43587610/preventing-null-or-empty-string-values-in-the-db
func (*Repository) BeforeCreate ¶
func (r *Repository) BeforeCreate(tx *gorm.DB) (err error)
func (*Repository) DeepCopy ¶
func (in *Repository) DeepCopy() *Repository
func (*Repository) DeepCopyInto ¶
func (in *Repository) DeepCopyInto(out *Repository)
func (*Repository) MapForUpdate ¶
func (r *Repository) MapForUpdate() map[string]interface{}
type RepositoryConfiguration ¶
type RepositoryConfiguration struct {
Base
Name string `json:"name" gorm:"default:null"`
Versions pq.StringArray `json:"version" gorm:"type:text[],default:null"`
Arch string `json:"arch" gorm:"default:''"`
GpgKey string `json:"gpg_key" gorm:"default:''"`
Label string `json:"label" gorm:"default:''"`
MetadataVerification bool `json:"metadata_verification" gorm:"default:false"`
ModuleHotfixes bool `json:"module_hotfixes" gorm:"default:false"`
AccountID string `json:"account_id" gorm:"default:null"`
OrgID string `json:"org_id" gorm:"default:null"`
RepositoryUUID string `json:"repository_uuid" gorm:"not null"`
Repository Repository `json:"repository,omitempty"`
Snapshot bool `json:"snapshot"`
DeletedAt gorm.DeletedAt `json:"deleted_at"`
LastSnapshotUUID string `json:"last_snapshot_uuid" gorm:"default:null"`
LastSnapshot *Snapshot `json:"last_snapshot,omitempty" gorm:"foreignKey:last_snapshot_uuid"`
LastSnapshotTaskUUID string `json:"last_snapshot_task_uuid" gorm:"default:null"`
LastSnapshotTask *TaskInfo `json:"last_snapshot_task" gorm:"foreignKey:last_snapshot_task_uuid"`
FailedSnapshotCount int64 `json:"failed_snapshot_count" gorm:"default:0"`
FeatureName string `json:"feature_name" gorm:"default:null"` // Comma-separated; entitlement matches any token
ExtendedRelease string `json:"extended_release" gorm:"default:null"`
ExtendedReleaseVersion string `json:"extended_release_version" gorm:"default:null"`
Partner bool `json:"partner" gorm:"default:false"`
}
func (*RepositoryConfiguration) AfterFind ¶
func (rc *RepositoryConfiguration) AfterFind(tx *gorm.DB) error
func (*RepositoryConfiguration) AfterSave ¶
func (rc *RepositoryConfiguration) AfterSave(tx *gorm.DB) error
func (*RepositoryConfiguration) BeforeCreate ¶
func (rc *RepositoryConfiguration) BeforeCreate(tx *gorm.DB) error
BeforeCreate perform validations and sets UUID of Repository Configurations
func (*RepositoryConfiguration) BeforeUpdate ¶
func (rc *RepositoryConfiguration) BeforeUpdate(tx *gorm.DB) error
BeforeUpdate perform validations of Repository Configurations
func (*RepositoryConfiguration) DedupeVersions ¶
func (rc *RepositoryConfiguration) DedupeVersions(tx *gorm.DB) error
func (*RepositoryConfiguration) DeepCopy ¶
func (rc *RepositoryConfiguration) DeepCopy() *RepositoryConfiguration
func (*RepositoryConfiguration) DeepCopyInto ¶
func (rc *RepositoryConfiguration) DeepCopyInto(out *RepositoryConfiguration)
func (*RepositoryConfiguration) IsCommunity ¶
func (rc *RepositoryConfiguration) IsCommunity() bool
func (*RepositoryConfiguration) IsRedHat ¶
func (rc *RepositoryConfiguration) IsRedHat() bool
func (*RepositoryConfiguration) MapForUpdate ¶
func (rc *RepositoryConfiguration) MapForUpdate() map[string]interface{}
When updating a model with gorm, we want to explicitly update any field that is set to empty string. We always fetch the object and then update it before saving so every update is the full model of user changeable fields. So OrgId and account Id are excluded
func (*RepositoryConfiguration) ReplaceEmptyValues ¶
func (rc *RepositoryConfiguration) ReplaceEmptyValues(tx *gorm.DB) error
type RepositoryEnvironment ¶
type RepositoryEnvironment struct {
RepositoryUUID string `json:"repository_uuid" gorm:"not null"`
EnvironmentUUID string `json:"environment_uuid" gorm:"not null"`
}
func (*RepositoryEnvironment) BeforeCreate ¶
func (r *RepositoryEnvironment) BeforeCreate(db *gorm.DB) (err error)
func (*RepositoryEnvironment) TableName ¶
func (r *RepositoryEnvironment) TableName() string
type RepositoryModuleStream ¶
type RepositoryModuleStream struct {
RepositoryUUID string `json:"repository_uuid" gorm:"not null"`
ModuleStreamUUID string `json:"package_group_uuid" gorm:"not null"`
}
func (*RepositoryModuleStream) BeforeCreate ¶
func (r *RepositoryModuleStream) BeforeCreate(db *gorm.DB) (err error)
func (*RepositoryModuleStream) TableName ¶
func (r *RepositoryModuleStream) TableName() string
type RepositoryPackageGroup ¶
type RepositoryPackageGroup struct {
RepositoryUUID string `json:"repository_uuid" gorm:"not null"`
PackageGroupUUID string `json:"package_group_uuid" gorm:"not null"`
}
func (*RepositoryPackageGroup) BeforeCreate ¶
func (r *RepositoryPackageGroup) BeforeCreate(db *gorm.DB) (err error)
func (*RepositoryPackageGroup) TableName ¶
func (r *RepositoryPackageGroup) TableName() string
type RepositoryRpm ¶
type RepositoryRpm struct {
RepositoryUUID string `json:"repository_uuid" gorm:"not null"`
RpmUUID string `json:"rpm_uuid" gorm:"not null"`
}
func (*RepositoryRpm) BeforeCreate ¶
func (r *RepositoryRpm) BeforeCreate(db *gorm.DB) (err error)
func (*RepositoryRpm) TableName ¶
func (r *RepositoryRpm) TableName() string
type Rpm ¶
type Rpm struct {
Base
Name string `json:"name" gorm:"not null"`
Arch string `json:"arch" gorm:"not null"`
Version string `json:"version" gorm:"not null"`
Release string `json:"release" gorm:"null"`
// Epoch is a way to define weighted dependencies based
// on version numbers. It's default value is 0 and this
// is assumed if an Epoch directive is not listed in the RPM SPEC file.
// https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/packaging_and_distributing_software/advanced-topics#packaging-epoch_epoch-scriplets-and-triggers
Epoch int32 `json:"epoch" gorm:"default:0;not null"`
Summary string `json:"summary" gorm:"not null"`
Checksum string `json:"checksum" gorm:"not null"`
Repositories []Repository `gorm:"many2many:repositories_rpms"`
}
RepositoryRpm model for the gorm object of the database which represent a RPM package which belong to one repository.
func (*Rpm) BeforeCreate ¶
BeforeCreate hook performs validations and sets UUID of RepositoryRpm
func (*Rpm) DeepCopyInto ¶
type Snapshot ¶
type Snapshot struct {
Base
DeletedAt gorm.DeletedAt `json:"deleted_at"`
VersionHref string `json:"version_href" gorm:"not null"`
PublicationHref string `json:"publication_href" gorm:"not null"`
DistributionPath string `json:"distribution_path" gorm:"not null"`
RepositoryPath string `json:"repository_path" gorm:"not null"` // Path to access the repository, includes domain
DistributionHref string `json:"distribution_href" gorm:"not null"`
RepositoryConfigurationUUID string `json:"repository_configuration_uuid" gorm:"not null"`
RepositoryConfiguration RepositoryConfiguration
ContentCounts ContentCountsType `json:"content_counts" gorm:"not null,default:{}"`
AddedCounts ContentCountsType `json:"added_counts" gorm:"not null,default:{}"`
RemovedCounts ContentCountsType `json:"removed_counts" gorm:"not null,default:{}"`
DetectedOSVersion string `json:"detected_os_version" gorm:"not null"`
Published bool `json:"published" gorm:"default:false"`
}
type TaskInfo ¶
type TaskInfo struct {
Id uuid.UUID `gorm:"primary_key;column:id"`
Typename string `gorm:"column:type"` // "introspect" or "snapshot"
Payload json.RawMessage `gorm:"type:jsonb"`
OrgId string
AccountId string
ObjectUUID uuid.UUID
ObjectType *string
Dependencies pq.StringArray `gorm:"->;column:t_dependencies;type:text[]"`
Dependents pq.StringArray `gorm:"->;column:t_dependents;type:text[]"`
Token uuid.UUID
Queued *time.Time `gorm:"column:queued_at"`
Started *time.Time `gorm:"column:started_at"`
Finished *time.Time `gorm:"column:finished_at"`
Error *string
Status string
RequestID string
Retries int
NextRetryTime *time.Time
Priority int
CancelAttempted bool
}
Shared by DAO and queue packages GORM only used in DAO to read from table
type Template ¶
type Template struct {
Base
Name string `gorm:"not null;default:null"`
OrgID string `gorm:"default:null"`
Description string `gorm:"default:null"`
Date time.Time `gorm:"default:null"`
Version string `gorm:"default:null"`
Arch string `gorm:"default:null"`
ExtendedRelease string `json:"extended_release" gorm:"default:null"`
ExtendedReleaseVersion string `json:"extended_release_version" gorm:"default:null"`
DeletedAt gorm.DeletedAt `json:"deleted_at"`
CreatedBy string
LastUpdatedBy string
UseLatest bool
RHSMEnvironmentCreated bool `json:"rhsm_environment_created" gorm:"column:rhsm_environment_created"`
LastUpdateSnapshotError *string `gorm:"default:null"`
LastUpdateTaskUUID string `json:"last_update_task_uuid" gorm:"default:null"`
LastUpdateTask *TaskInfo `json:"last_update_task" gorm:"foreignKey:last_update_task_uuid"`
TemplateRepositoryConfigurations []TemplateRepositoryConfiguration `gorm:"foreignKey:TemplateUUID"`
}
func (*Template) BeforeCreate ¶
BeforeCreate perform validations and sets UUID of Template
func (*Template) BeforeUpdate ¶
BeforeUpdate perform validations and sets UUID of Template
func (*Template) MapForUpdate ¶
type TemplateRepositoryConfiguration ¶
type TemplateRepositoryConfiguration struct {
RepositoryConfigurationUUID string `json:"repository_configuration_uuid" gorm:"not null"`
TemplateUUID string `json:"template_uuid" gorm:"not null"`
SnapshotUUID string `json:"snapshot_uuid" gorm:"not null"`
Snapshot Snapshot `json:"snapshot" gorm:"foreignkey:SnapshotUUID"`
DistributionHref string `json:"distribution_href"`
DeletedAt gorm.DeletedAt `json:"deleted_at"`
}
func (*TemplateRepositoryConfiguration) AfterFind ¶
func (t *TemplateRepositoryConfiguration) AfterFind(tx *gorm.DB) error
func (*TemplateRepositoryConfiguration) AfterSave ¶
func (t *TemplateRepositoryConfiguration) AfterSave(tx *gorm.DB) error
func (*TemplateRepositoryConfiguration) BeforeCreate ¶
func (t *TemplateRepositoryConfiguration) BeforeCreate(db *gorm.DB) (err error)
func (*TemplateRepositoryConfiguration) TableName ¶
func (t *TemplateRepositoryConfiguration) TableName() string
type Upload ¶
type UserPreference ¶
type UserPreference struct {
Base
OrgID string `gorm:"not null"`
UserID string `gorm:"not null"`
Label string `gorm:"not null"`
Value string `gorm:"not null"`
}
UserPreference stores a single user preference as a label/value pair
func (*UserPreference) BeforeCreate ¶
func (up *UserPreference) BeforeCreate(tx *gorm.DB) error
func (*UserPreference) BeforeUpdate ¶
func (up *UserPreference) BeforeUpdate(tx *gorm.DB) error
func (*UserPreference) TableName ¶
func (up *UserPreference) TableName() string
Source Files
¶
- base.go
- coverage_demand_signal.go
- coverage_report.go
- coverage_report_package.go
- coverage_upload.go
- domain.go
- environment.go
- lightwell_advisory.go
- lightwell_advisory_notification.go
- maven_packages.go
- memo.go
- module_stream.go
- package_group.go
- repository.go
- repository_configuration.go
- repository_environment.go
- repository_module_stream.go
- repository_package_group.go
- repository_rpm.go
- rpm.go
- snapshot.go
- task_info.go
- template.go
- template_repository_configuration.go
- uploads.go
- user_preference.go