common

package
v0.0.0-...-f6bd42f Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2024 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadYAML

func LoadYAML[T any](filename string) (T, error)

Types

type Duration

type Duration struct {
	time.Duration
}

func (*Duration) UnmarshalText

func (d *Duration) UnmarshalText(text []byte) error

UnmarshalText implements encoding.TextUnmarshaler.

type Job

type Job struct {
	ID                 JobID
	TriggerExpressions []string
	TriggerValues      []string
	Command            string
	Status             JobStatus
	StatusMsg          string `json:",omitempty"`
	CreatedAt          time.Time
	UpdatedAt          time.Time

	Dir string `json:"-"`
}

func (Job) DirFS

func (j Job) DirFS() fs.FS

type JobID

type JobID int

type JobStatus

type JobStatus int
const (
	StatusNew JobStatus = iota
	StatusRunning
	StatusSucceeded
	StatusFailed
	StatusError
	StatusAll JobStatus = -1
)

func (JobStatus) Finished

func (s JobStatus) Finished() bool

func (JobStatus) HasLog

func (s JobStatus) HasLog() bool

func (JobStatus) MarshalText

func (s JobStatus) MarshalText() ([]byte, error)

MarshalText implements encoding.TextMarshaler.

func (JobStatus) String

func (s JobStatus) String() string

String implements fmt.Stringer.

func (*JobStatus) UnmarshalText

func (s *JobStatus) UnmarshalText(text []byte) error

UnmarshalText implements encoding.TextUnmarshaler.

Jump to

Keyboard shortcuts

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