workflowauthoring

package
v0.146.0 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrAuthoringRecordRequired = errors.New("authoring record required")
	ErrMachineIDRequired       = errors.New("machine_id required")
)

Functions

func AuthoringRecordETag

func AuthoringRecordETag(machineID, version string) string

func CloneTimePtr

func CloneTimePtr(value *time.Time) *time.Time

func DiffMachineDefinitions

func DiffMachineDefinitions(base, target *flow.MachineDefinition) []flow.FSMAuthoringDiffChange

func MachineFromRow

func MachineFromRow(row MachineRow) (*flow.AuthoringMachineRecord, error)

func ParseAuthoringVersion

func ParseAuthoringVersion(value string) int

func ParseCursorOffset

func ParseCursorOffset(cursor string) int

func VersionFromRow

func VersionFromRow(row VersionRow) (*flow.AuthoringMachineRecord, error)

Types

type MachineRow

type MachineRow struct {
	bun.BaseModel `bun:"table:workflow_authoring_machines"`

	MachineID           string     `bun:"machine_id,pk" json:"machine_id"`
	Name                string     `bun:"name,notnull" json:"name"`
	Version             string     `bun:"version,notnull" json:"version"`
	ETag                string     `bun:"etag,notnull" json:"e_tag"`
	Draft               string     `bun:"draft,notnull" json:"draft"`
	Diagnostics         string     `bun:"diagnostics,notnull" json:"diagnostics"`
	UpdatedAt           time.Time  `bun:"updated_at,notnull" json:"updated_at"`
	PublishedAt         *time.Time `bun:"published_at" json:"published_at"`
	PublishedDefinition string     `bun:"published_definition" json:"published_definition"`
	DeletedAt           *time.Time `bun:"deleted_at" json:"deleted_at"`
}

func MachineRowFromRecord

func MachineRowFromRecord(rec *flow.AuthoringMachineRecord) (MachineRow, error)

type UnavailableStore

type UnavailableStore struct {
	Err error
}

func NewUnavailableStore

func NewUnavailableStore(err error) UnavailableStore

func (UnavailableStore) Delete

func (UnavailableStore) Load

type VersionRow

type VersionRow struct {
	bun.BaseModel `bun:"table:workflow_authoring_versions"`

	MachineID           string     `bun:"machine_id,pk" json:"machine_id"`
	Version             string     `bun:"version,pk" json:"version"`
	Name                string     `bun:"name,notnull" json:"name"`
	ETag                string     `bun:"etag,notnull" json:"e_tag"`
	Draft               string     `bun:"draft,notnull" json:"draft"`
	Diagnostics         string     `bun:"diagnostics,notnull" json:"diagnostics"`
	UpdatedAt           time.Time  `bun:"updated_at,notnull" json:"updated_at"`
	PublishedAt         *time.Time `bun:"published_at" json:"published_at"`
	PublishedDefinition string     `bun:"published_definition" json:"published_definition"`
	DeletedAt           *time.Time `bun:"deleted_at" json:"deleted_at"`
}

func VersionRowFromRecord

func VersionRowFromRecord(rec *flow.AuthoringMachineRecord) (VersionRow, error)

Jump to

Keyboard shortcuts

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