model

package
v1.5.0-main Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2026 License: Apache-2.0 Imports: 2 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	DeltaGenerationPending    = "pending"
	DeltaGenerationInProgress = "in_progress"
	DeltaGenerationSucceeded  = "succeeded"
	DeltaGenerationFailed     = "failed"
	DeltaGenerationRejected   = "rejected"

	DeltaPrepareWaiting  = "waiting"
	DeltaPrepareFailing  = "failing"
	DeltaPrepareComplete = "complete"
	DeltaPrepareFailed   = "failed"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DeltaGeneration

type DeltaGeneration struct {
	OrgID           uuid.UUID `gorm:"type:uuid;primaryKey"`
	ImageRepository string    `gorm:"type:text;primaryKey"`
	SourceDigest    string    `gorm:"type:text;primaryKey"`
	TargetDigest    string    `gorm:"type:text;primaryKey"`

	DeltaRef        *string
	SizeBytes       *int64
	Status          string `gorm:"type:text"`
	LastVerifiedAt  *time.Time
	GeneratedAt     *time.Time
	ResourceVersion int64
	Phase           *string
	UpdatedAt       time.Time
}

func (DeltaGeneration) TableName

func (DeltaGeneration) TableName() string

type DeltaPrepare

type DeltaPrepare struct {
	ID                      uuid.UUID `gorm:"type:uuid;primaryKey"`
	OrgID                   uuid.UUID `gorm:"type:uuid;index"`
	Kind                    string    `gorm:"type:text"`
	Name                    string    `gorm:"type:text"`
	TemplateVersion         *string   `gorm:"type:text"`
	Generation              *int64
	SourceResourceVersion   int64
	Deadline                *time.Time
	CreatedAt               time.Time
	PendingGenerationsCount int    `gorm:"not null;default:0"`
	Status                  string `gorm:"type:text"`
	ResourceVersion         int64
}

func (*DeltaPrepare) MatchesTarget

func (p *DeltaPrepare) MatchesTarget(templateVersion *string, generation *int64) bool

MatchesTarget compares the desired fleet template or standalone device generation. SourceResourceVersion is checked separately when ordering prepare events.

func (DeltaPrepare) TableName

func (DeltaPrepare) TableName() string

type DeltaPrepareGeneration

type DeltaPrepareGeneration struct {
	PrepareID       uuid.UUID `gorm:"type:uuid;primaryKey"`
	OrgID           uuid.UUID `gorm:"type:uuid;primaryKey"`
	ImageRepository string    `gorm:"type:text;primaryKey"`
	SourceDigest    string    `gorm:"type:text;primaryKey"`
	TargetDigest    string    `gorm:"type:text;primaryKey"`
	Completed       bool      `gorm:"not null;default:false"`
}

DeltaPrepareGeneration is the join row that attaches a DeltaPrepare to the DeltaGeneration keys it is waiting on. Completed prevents a redelivered terminal-generation notification from decrementing the prepare again.

func (DeltaPrepareGeneration) TableName

func (DeltaPrepareGeneration) TableName() string

Jump to

Keyboard shortcuts

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