models

package
v0.0.0-...-fc76e2f Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2015 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 ApiKey

type ApiKey struct {
	Id         int64     `sql:"AUTO_INCREMENT"`
	ClientName string    `sql:"size:100;not null"`
	ApiKey     string    `sql:"size:128;not null;unique_index"`
	CreatedAt  time.Time `sql:"DEFAULT:current_timestamp;not null"`
}

type Job

type Job struct {
	Id         int64     `sql:"AUTO_INCREMENT"`
	Command    string    `sql:"size:1000;not null"`
	Args       string    `sql:"size:1000"`
	Status     JobStatus `sql:"size:1;not null"`
	ExitStatus int       `sql:"size:4`
	CreatedAt  time.Time `sql:"DEFAULT:current_timestamp;not null"`
	FinishedAt time.Time
}

type JobMessage

type JobMessage struct {
	JobId     int64          `gorm:"primary_key" sql:"type:bigint"`
	Seq       int64          `gorm:"primary_key" sql:"type:bigint"`
	Type      JobMessageType `sql:"size:1;not null"`
	Message   string         `sql:"size:4000"`
	CreatedAt time.Time      `sql:"DEFAULT:current_timestamp;not null"`
}

type JobMessageType

type JobMessageType int
const (
	Normal JobMessageType = iota + 1
	Error
)

func (JobMessageType) String

func (i JobMessageType) String() string

type JobStatus

type JobStatus int
const (
	WaitingToRun JobStatus = iota + 1
	Running
	Finished
	CannotRun
)

func (JobStatus) String

func (i JobStatus) String() string

Jump to

Keyboard shortcuts

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