model

package
v0.0.0-...-a20aad9 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const RFC3339Milli = "2006-01-02T15:04:05.000Z07:00"

Custom format since it's not found in the time module. Time in RFC3339 format, but with milliseconds (including zero digits)

Variables

Functions

func FromStorageBpmnResource

func FromStorageBpmnResource(bpmnResource storage.BpmnResource) string

Convert storage bpmn resource to GraphQL bpmn resource containing the base64 encoded BPMN XML file.

func Map

func Map[T, U any](slice []T, f func(T) U) []U

Convert slice of values T to slice of values U by applying function f.

TODO: replace with stdlib equivalent once, if ever, available.

func ToStoragePagination

func ToStoragePagination(pagination *Pagination) *storage.Pagination

Convert GraphQL pagination to storage pagination. Nil value is preserved.

func VariableFilterToStorageFilter

func VariableFilterToStorageFilter(filter *VariableFilter) *storage.Filter

Convert GraphQL variable filter to storage filter. Nil value is preserved.

Types

type AuditLog

type AuditLog struct {
	ElementID   string `json:"elementId"`
	ElementType string `json:"elementType"`
	Intent      string `json:"intent"`
	Position    int64  `json:"position"`
	Time        string `json:"time"`
}

func FromStorageAuditLog

func FromStorageAuditLog(auditLog storage.AuditLog) *AuditLog

Convert storage audit log to GraphQL audit log.

type FilterType

type FilterType string
const (
	FilterTypeIs       FilterType = "IS"
	FilterTypeIsNot    FilterType = "IS_NOT"
	FilterTypeContains FilterType = "CONTAINS"
)

func (FilterType) IsValid

func (e FilterType) IsValid() bool

func (FilterType) MarshalGQL

func (e FilterType) MarshalGQL(w io.Writer)

func (FilterType) String

func (e FilterType) String() string

func (*FilterType) UnmarshalGQL

func (e *FilterType) UnmarshalGQL(v interface{}) error

type Incident

type Incident struct {
	IncidentKey  int64     `json:"incidentKey"`
	InstanceKey  int64     `json:"instanceKey"`
	ElementID    string    `json:"elementId"`
	ErrorType    string    `json:"errorType"`
	ErrorMessage string    `json:"errorMessage"`
	State        string    `json:"state"`
	Time         string    `json:"time"`
	Instance     *Instance `json:"instance"`
}

func FromStorageIncident

func FromStorageIncident(incident storage.Incident) *Incident

Convert storage incident to GraphQL incident.

type Instance

type Instance struct {
	StartTime   string              `json:"startTime"`
	EndTime     *string             `json:"endTime,omitempty"`
	InstanceKey int64               `json:"instanceKey"`
	ProcessKey  int64               `json:"processKey"`
	Version     int64               `json:"version"`
	Status      string              `json:"status"`
	AuditLogs   *PaginatedAuditLogs `json:"auditLogs"`
	Incidents   *PaginatedIncidents `json:"incidents"`
	Jobs        *PaginatedJobs      `json:"jobs"`
	Variables   *PaginatedVariables `json:"variables"`
	Process     *Process            `json:"process"`
}

func FromStorageInstance

func FromStorageInstance(instance storage.Instance) *Instance

Convert storage instance to GraphQL instance.

type Job

type Job struct {
	ElementID   string    `json:"elementId"`
	InstanceKey int64     `json:"instanceKey"`
	Key         int64     `json:"key"`
	Type        string    `json:"type"`
	Retries     int64     `json:"retries"`
	Worker      string    `json:"worker"`
	State       string    `json:"state"`
	Time        string    `json:"time"`
	Instance    *Instance `json:"instance"`
}

func FromStorageJob

func FromStorageJob(job storage.Job) *Job

Convert storage job to GraphQL job.

type PaginatedAuditLogs

type PaginatedAuditLogs struct {
	Items      []*AuditLog `json:"items"`
	TotalCount int64       `json:"totalCount"`
}

type PaginatedIncidents

type PaginatedIncidents struct {
	Items      []*Incident `json:"items"`
	TotalCount int64       `json:"totalCount"`
}

type PaginatedInstances

type PaginatedInstances struct {
	Items      []*Instance `json:"items"`
	TotalCount int64       `json:"totalCount"`
}

type PaginatedJobs

type PaginatedJobs struct {
	Items      []*Job `json:"items"`
	TotalCount int64  `json:"totalCount"`
}

type PaginatedProcesses

type PaginatedProcesses struct {
	Items      []*Process `json:"items"`
	TotalCount int64      `json:"totalCount"`
}

type PaginatedVariables

type PaginatedVariables struct {
	Items      []*Variable `json:"items"`
	TotalCount int64       `json:"totalCount"`
}

type Pagination

type Pagination struct {
	Offset int64 `json:"offset"`
	Limit  int64 `json:"limit"`
}

type Process

type Process struct {
	BpmnResource   string              `json:"bpmnResource"`
	BpmnProcessID  string              `json:"bpmnProcessId"`
	DeploymentTime string              `json:"deploymentTime"`
	Instances      *PaginatedInstances `json:"instances"`
	ProcessKey     int64               `json:"processKey"`
	Version        int64               `json:"version"`
}

func FromStorageProcess

func FromStorageProcess(process storage.Process) *Process

Convert storage process to GraphQL process.

type Variable

type Variable struct {
	Name  string `json:"name"`
	Value string `json:"value"`
	Time  string `json:"time"`
}

func FromStorageVariable

func FromStorageVariable(variable storage.Variable) *Variable

Convert storage variable to GraphQL variable.

type VariableFilter

type VariableFilter struct {
	Name string     `json:"name"`
	Type FilterType `json:"type"`
}

Jump to

Keyboard shortcuts

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