mocks

package
v0.0.20 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CAMUNDA_MODULE_WORKER_TOPIC = "process_deployment"
View Source
var MOCK_MODULE_DELETE_INFO *model.ModuleDeleteInfo = nil
View Source
var WORKER_ID = "test"

Functions

func Keycloak

func Keycloak(ctx context.Context, wg *sync.WaitGroup) (url string)

func ListFilter added in v0.0.12

func ListFilter[T any](in []T, filter func(T) bool) (out []T)

func NewModuleWorker

func NewModuleWorker(ctx context.Context, wg *sync.WaitGroup, smartServiceRepoApi string, config configuration.Config, handler func(taskWorkerMsg ModuleWorkerMessage) (err error))

Types

type CamundaCompleteRequest

type CamundaCompleteRequest struct {
	WorkerId string `json:"workerId,omitempty"`
}

type CamundaErrMock added in v0.0.12

type CamundaErrMock struct {
	Err error
}

func (*CamundaErrMock) CheckInstanceReady added in v0.0.12

func (this *CamundaErrMock) CheckInstanceReady(smartServiceInstanceId string) (finished bool, missing bool, err error)

func (*CamundaErrMock) DeleteInstance added in v0.0.12

func (this *CamundaErrMock) DeleteInstance(instance model.HistoricProcessInstance) (err error)

func (*CamundaErrMock) DeployRelease added in v0.0.12

func (this *CamundaErrMock) DeployRelease(owner string, release model.SmartServiceReleaseExtended) (err error, isInvalidCamundaDeployment bool)

func (*CamundaErrMock) GetProcessInstanceBusinessKey added in v0.0.12

func (this *CamundaErrMock) GetProcessInstanceBusinessKey(processInstanceId string) (string, error, int)

func (*CamundaErrMock) GetProcessInstanceList added in v0.0.12

func (this *CamundaErrMock) GetProcessInstanceList() (result []model.HistoricProcessInstance, err error)

func (*CamundaErrMock) RemoveRelease added in v0.0.12

func (this *CamundaErrMock) RemoveRelease(id string) error

func (*CamundaErrMock) Start added in v0.0.12

func (this *CamundaErrMock) Start(result model.SmartServiceInstance) error

func (*CamundaErrMock) StartMaintenance added in v0.0.12

func (this *CamundaErrMock) StartMaintenance(releaseId string, procedure model.MaintenanceProcedure, id string, parameter []model.SmartServiceParameter) error

func (*CamundaErrMock) StopInstance added in v0.0.12

func (this *CamundaErrMock) StopInstance(smartServiceInstanceId string) error

type CamundaExternalTask

type CamundaExternalTask struct {
	Id                  string                     `json:"id,omitempty"`
	Variables           map[string]CamundaVariable `json:"variables,omitempty"`
	ActivityId          string                     `json:"activityId,omitempty"`
	Retries             int64                      `json:"retries"`
	ExecutionId         string                     `json:"executionId"`
	ProcessInstanceId   string                     `json:"processInstanceId"`
	ProcessDefinitionId string                     `json:"processDefinitionId"`
	TenantId            string                     `json:"tenantId"`
	Error               string                     `json:"errorMessage"`
}

type CamundaFetchRequest

type CamundaFetchRequest struct {
	WorkerId string         `json:"workerId,omitempty"`
	MaxTasks int64          `json:"maxTasks,omitempty"`
	Topics   []CamundaTopic `json:"topics,omitempty"`
}

type CamundaTopic

type CamundaTopic struct {
	Name         string `json:"topicName,omitempty"`
	LockDuration int64  `json:"lockDuration,omitempty"`
}

type CamundaVariable

type CamundaVariable struct {
	Type  string      `json:"type,omitempty"`
	Value interface{} `json:"value,omitempty"`
}

type ModuleWorkerMessage

type ModuleWorkerMessage = CamundaExternalTask

type Selectables

type Selectables struct {
	Response []model.Selectable
}

func NewSelectables

func NewSelectables(response []model.Selectable) *Selectables

func (*Selectables) Get

func (this *Selectables) Get(token auth.Token, searchedEntities []string, criteria []model.Criteria) (result []model.Selectable, err error, code int)

Jump to

Keyboard shortcuts

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