models

package
v0.0.0-...-84116e0 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Agent

type Agent struct {
	UUID           string `gorm:"primaryKey"`
	Hostname       string
	KeyName        string
	Labels         pq.StringArray `gorm:"type:text[]"`
	Plans          pq.StringArray `gorm:"type:text[]"`
	Active         bool           `gorm:"default:true"`
	CreatedAt      time.Time
	UpdatedAt      time.Time
	LastAssignedAt time.Time
}

Agent model

func (Agent) TableName

func (Agent) TableName() string

TableName to ensure correct table naming

type Key

type Key struct {
	Name      string `gorm:"primaryKey"`
	PublicKey []byte
	CreatedAt time.Time
	UpdatedAt time.Time
	ExpiresAt time.Time
}

Key model

func (Key) TableName

func (Key) TableName() string

TableName to ensure correct table naming

type Run

type Run struct {
	UUID       string `gorm:"primaryKey"`
	Agent      string
	Plan       string         `gorm:"not null;default:null"`
	Labels     pq.StringArray `gorm:"type:text[]"`
	Payload    []byte
	Status     string
	AssignedAt time.Time `gorm:"default:null"`
	StartedAt  time.Time `gorm:"default:null"`
	FinishedAt time.Time `gorm:"default:null"`
	CreatedAt  time.Time
	UpdatedAt  time.Time
}

Run model

func (Run) TableName

func (Run) TableName() string

TableName to ensure correct table naming

Jump to

Keyboard shortcuts

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