models

package
v0.0.0-...-04c1da9 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: Apache-2.0 Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Approval

type Approval struct {
	gorm.Model
	IsApproved  bool    `json:"is_approved"`
	TaskPod     TaskPod `json:"task_pod,omitempty"`
	TaskPodUUID string  `json:"task_pod_uuid"`
}

type Cluster

type Cluster struct {
	gorm.Model
	Name string `json:"name" `
}

type ResourceState

type ResourceState string
const (
	Untracked ResourceState = "untracked"
	Running   ResourceState = "running"
	Failed    ResourceState = "failed"
	Completed ResourceState = "completed"
)

type TFOResource

type TFOResource struct {
	UUID              string         `json:"uuid" gorm:"primaryKey"`
	CreatedBy         string         `json:"created_by"`
	CreatedAt         time.Time      `json:"created_at"`
	UpdatedBy         string         `json:"updated_by"`
	UpdatedAt         time.Time      `json:"updated_at"`
	DeletedBy         string         `json:"deleted_by"`
	DeletedAt         gorm.DeletedAt `gorm:"index" json:"deleted_at"`
	Namespace         string         `json:"namespace"`
	Name              string         `json:"name"`
	CurrentGeneration string         `json:"current_generation"`
	CurrentState      ResourceState  `json:"current_state"`

	// foreign key to a cluster
	Cluster   Cluster `json:"cluster,omitempty"`
	ClusterID uint    `json:"cluster_id"`
}

type TFOResourceSpec

type TFOResourceSpec struct {
	gorm.Model
	TFOResource     TFOResource `json:"tfo_resource,omitempty"`
	TFOResourceUUID string      `json:"tfo_resource_uuid"`
	Generation      string      `json:"generation"`
	ResourceSpec    string      `json:"resource_spec"`
	TaskToken       string      `json:"task_token"`
	Annotations     string      `json:"annotations"`
	Labels          string      `json:"labels"`
}

type TFOTaskLog

type TFOTaskLog struct {
	gorm.Model
	TaskPod     TaskPod `json:"task_pod,omitempty"`
	TaskPodUUID string  `json:"task_pod_uuid"`
	Message     string  `json:"message" gorm:"type:varchar(1048576)"`
	Size        uint64  `json:"size"`
}

type TaskPod

type TaskPod struct {
	UUID                string      `json:"uuid" gorm:"primaryKey"`
	TaskType            string      `json:"task_type"`
	Rerun               int         `json:"rerun"`
	Generation          string      `json:"generation"`
	InClusterGeneration string      `json:"in_cluster_generation"`
	TFOResource         TFOResource `json:"tfo_resource,omitempty"`
	TFOResourceUUID     string      `json:"tfo_resource_uuid"`
}

Jump to

Keyboard shortcuts

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