mocks

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2024 License: Apache-2.0 Imports: 20 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 NewConsumer

func NewConsumer(errHandler func(err error)) (sender func(topic string, message []byte), consumer controller.Consumer)

func NewModuleWorker

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

func NewProducer

func NewProducer(receiver func(topic string, key string, message []byte) error) controller.ProducerFactory

Types

type CamundaCompleteRequest

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

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 Permissions

type Permissions struct {
	// contains filtered or unexported fields
}

func NewPermissions

func NewPermissions() *Permissions

func (*Permissions) CheckAccess

func (this *Permissions) CheckAccess(token auth.Token, topic string, id string, right string) (bool, error)

func (*Permissions) GetResourceRights

func (this *Permissions) GetResourceRights(token string, topic string, id string) (rights permissions.ResourceRights, err error)

func (*Permissions) Query

func (this *Permissions) Query(token string, query permissions.QueryMessage, result interface{}) (err error, code int)

func (*Permissions) SetQueryFindResponses

func (this *Permissions) SetQueryFindResponses(queryFindResponses map[string]map[string]interface{})

func (*Permissions) SetResourceRights

func (this *Permissions) SetResourceRights(token string, topic string, id string, rights permissions.ResourceRights, kafkaKey string) error

type ProducerMock

type ProducerMock struct {
	Receiver func(topic string, key string, message []byte) error
	Topic    string
}

func (*ProducerMock) Produce

func (this *ProducerMock) Produce(key string, message []byte) error

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