orm

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Begin int8 = iota
	Suspend
	Success
	Failure
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Checkpoint

type Checkpoint struct {
	Id        string    `gorm:"column:id;primary_key"`
	Uid       string    `gorm:"column:uid"`
	Name      string    `gorm:"column:name;NOT NULL"`
	RecoverId string    `gorm:"column:recover_id"`
	ParentUid string    `gorm:"column:parent_uid"`
	RootUid   string    `gorm:"column:root_uid"`
	Scope     uint8     `gorm:"column:scope;NOT NULL"`
	Snapshot  []byte    `gorm:"column:snapshot"`
	CreatedAt time.Time `gorm:"type:datetime;column:created_at;"`
	UpdatedAt time.Time `gorm:"type:datetime;column:updated_at;"`
}

func (*Checkpoint) GetId

func (c *Checkpoint) GetId() string

func (*Checkpoint) GetName

func (c *Checkpoint) GetName() string

func (*Checkpoint) GetParentUid

func (c *Checkpoint) GetParentUid() string

func (*Checkpoint) GetRecoverId

func (c *Checkpoint) GetRecoverId() string

func (*Checkpoint) GetRootUid

func (c *Checkpoint) GetRootUid() string

func (*Checkpoint) GetScope

func (c *Checkpoint) GetScope() uint8

func (*Checkpoint) GetSnapshot

func (c *Checkpoint) GetSnapshot() []byte

func (*Checkpoint) GetUid

func (c *Checkpoint) GetUid() string

type Flow

type Flow struct {
	Id         string `gorm:"primaryKey;type:char(36)"`
	Name       string
	Status     int8
	CreatedAt  *time.Time
	UpdatedAt  *time.Time
	FinishedAt *time.Time
}

type Persistence

type Persistence interface {
	InjectPersistence() error
}

func NewPersistPlugin

func NewPersistPlugin(db *gorm.DB) Persistence

type Process

type Process struct {
	Id         string `gorm:"primaryKey;type:char(36)"`
	Name       string
	Status     int8
	FlowId     string `gorm:"type:char(36)"`
	CreatedAt  *time.Time
	UpdatedAt  *time.Time
	FinishedAt *time.Time
}

type RecoverRecord

type RecoverRecord struct {
	RootUid   string    `gorm:"column:root_uid;NOT NULL"`
	RecoverId string    `gorm:"column:recover_id;primary_key"`
	Status    uint8     `gorm:"column:status;NOT NULL"`
	Name      string    `gorm:"column:name;NOT NULL"`
	CreatedAt time.Time `gorm:"type:datetime;column:created_at;"`
	UpdatedAt time.Time `gorm:"type:datetime;column:updated_at;"`
}

func (*RecoverRecord) GetName

func (r *RecoverRecord) GetName() string

func (*RecoverRecord) GetRecoverId

func (r *RecoverRecord) GetRecoverId() string

func (*RecoverRecord) GetRootUid

func (r *RecoverRecord) GetRootUid() string

func (*RecoverRecord) GetStatus

func (r *RecoverRecord) GetStatus() uint8

type Step

type Step struct {
	Id         string `gorm:"primaryKey;type:char(36)"`
	Name       string
	Status     int8
	ProcId     string `gorm:"type:char(36)"`
	FlowId     string `gorm:"type:char(36)"`
	CreatedAt  *time.Time
	UpdatedAt  *time.Time
	FinishedAt *time.Time
}

type SuspendPlugin

type SuspendPlugin interface {
	InjectSuspend() error
}

func NewSuspendPlugin

func NewSuspendPlugin(db *gorm.DB) SuspendPlugin

Jump to

Keyboard shortcuts

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