Documentation
¶
Index ¶
- Variables
- func AuthoringRecordETag(machineID, version string) string
- func CloneMachine(rec *flow.AuthoringMachineRecord) (*flow.AuthoringMachineRecord, error)
- func CloneTimePtr(value *time.Time) *time.Time
- func DiffMachineDefinitions(base, target *flow.MachineDefinition) []flow.FSMAuthoringDiffChange
- func MachineFromRow(row MachineRow) (*flow.AuthoringMachineRecord, error)
- func NormalizeMachineRecord(rec *flow.AuthoringMachineRecord) (*flow.AuthoringMachineRecord, error)
- func ParseAuthoringVersion(value string) int
- func ParseCursorOffset(cursor string) int
- func VersionFromRow(row VersionRow) (*flow.AuthoringMachineRecord, error)
- func VersionSummary(record *flow.AuthoringMachineRecord) flow.FSMAuthoringVersionSummary
- type MachineRow
- type UnavailableStore
- func (s UnavailableStore) Delete(context.Context, string, string, bool) (bool, error)
- func (s UnavailableStore) List(context.Context, flow.AuthoringListOptions) (*flow.AuthoringListResult, error)
- func (s UnavailableStore) Load(context.Context, string) (*flow.AuthoringMachineRecord, error)
- func (s UnavailableStore) Save(context.Context, *flow.AuthoringMachineRecord, string) (*flow.AuthoringMachineRecord, error)
- type VersionRow
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 CloneMachine ¶
func CloneMachine(rec *flow.AuthoringMachineRecord) (*flow.AuthoringMachineRecord, error)
func DiffMachineDefinitions ¶
func DiffMachineDefinitions(base, target *flow.MachineDefinition) []flow.FSMAuthoringDiffChange
func MachineFromRow ¶
func MachineFromRow(row MachineRow) (*flow.AuthoringMachineRecord, error)
func NormalizeMachineRecord ¶
func NormalizeMachineRecord(rec *flow.AuthoringMachineRecord) (*flow.AuthoringMachineRecord, error)
func ParseAuthoringVersion ¶
func ParseCursorOffset ¶
func VersionFromRow ¶
func VersionFromRow(row VersionRow) (*flow.AuthoringMachineRecord, error)
func VersionSummary ¶
func VersionSummary(record *flow.AuthoringMachineRecord) flow.FSMAuthoringVersionSummary
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 {
}
func NewUnavailableStore ¶
func NewUnavailableStore(err error) UnavailableStore
func (UnavailableStore) List ¶
func (s UnavailableStore) List(context.Context, flow.AuthoringListOptions) (*flow.AuthoringListResult, error)
func (UnavailableStore) Load ¶
func (s UnavailableStore) Load(context.Context, string) (*flow.AuthoringMachineRecord, error)
func (UnavailableStore) Save ¶
func (s UnavailableStore) Save(context.Context, *flow.AuthoringMachineRecord, string) (*flow.AuthoringMachineRecord, error)
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)
Click to show internal directories.
Click to hide internal directories.