models

package
v0.0.0-...-f266d1f Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var All = []interface{}{
	&Atom{},
	&Callback{},
	&Job{},
	&Task{},
	&Trigger{},
}

Functions

This section is empty.

Types

type Atom

type Atom struct {
	ID        uuid.UUID  `gorm:"type:uuid;primaryKey"`
	Engine    AtomEngine `gorm:"index;not null"`
	Image     string     `gorm:"index;not null"`
	Command   string     `gorm:"command"`
	CreatedAt time.Time  `gorm:"not null"`
	UpdatedAt time.Time  `gorm:"not null"`
}

func (*Atom) Cmd

func (a *Atom) Cmd() []string

type AtomEngine

type AtomEngine string
const (
	AtomEngineDocker     AtomEngine = "docker"
	AtomEngineKubernetes AtomEngine = "kubernetes"
	AtomEnginePodman     AtomEngine = "podman"
)

type Atoms

type Atoms []*Atom

type Callback

type Callback struct {
	ID            uuid.UUID    `gorm:"type:uuid;primaryKey"`
	Type          CallbackType `gorm:"index;type:string;not null"`
	Configuration string       `gorm:"not null"`
	JobID         uuid.UUID    `gorm:"index;not null"`
	CreatedAt     time.Time    `gorm:"not null"`
	UpdatedAt     time.Time    `gorm:"not null"`
}

type CallbackType

type CallbackType string
const (
	CallbackTypeNotification CallbackType = "notification"
)

type Callbacks

type Callbacks []*Callback

type Job

type Job struct {
	ID        uuid.UUID `gorm:"type:uuid;primaryKey"`
	Alias     string    `gorm:"index"`
	TriggerID uuid.UUID `gorm:"type:uuid;index;not null"`
	CreatedAt time.Time `gorm:"not null"`
	UpdatedAt time.Time `gorm:"not null"`
}

type Jobs

type Jobs []*Job

type Task

type Task struct {
	ID        uuid.UUID  `gorm:"type:uuid;primaryKey"`
	JobID     uuid.UUID  `gorm:"type:uuid;index;not null"`
	AtomID    uuid.UUID  `gorm:"type:uuid;index;not null"`
	NextID    *uuid.UUID `gorm:"type:uuid;index"`
	CreatedAt time.Time  `gorm:"not null"`
	UpdatedAt time.Time  `gorm:"not null"`
}

type Tasks

type Tasks []*Task

type Trigger

type Trigger struct {
	ID            uuid.UUID   `gorm:"type:uuid;primaryKey"`
	Alias         string      `gorm:"index"`
	Type          TriggerType `gorm:"index;not null"`
	Configuration string
	CreatedAt     time.Time `gorm:"not null"`
	UpdatedAt     time.Time `gorm:"not null"`
}

type TriggerType

type TriggerType string
const (
	TriggerTypeCron TriggerType = "cron"
	TriggerTypeHTTP TriggerType = "http"
)

type Triggers

type Triggers []*Trigger

Jump to

Keyboard shortcuts

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