lib

package
v0.0.0-...-a129a73 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2018 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const CAMUNDA_VARIABLES_PAYLOAD = "payload"

Variables

This section is empty.

Functions

func CamundaError

func CamundaError(task messages.CamundaTask, msg string)

func CamundaWorker

func CamundaWorker()

func CheckExecutionAccess

func CheckExecutionAccess(token JwtImpersonate, resource string) (err error)

func CloseProducer

func CloseProducer()

func CompleteCamundaTask

func CompleteCamundaTask(msg string) (err error)

func ExecuteCamundaTask

func ExecuteCamundaTask(task messages.CamundaTask)

func ExecuteNextCamundaTask

func ExecuteNextCamundaTask() (wait bool)

func GetCamundaTask

func GetCamundaTask() (tasks []messages.CamundaTask, err error)

func GetDeviceInstance

func GetDeviceInstance(token JwtImpersonate, deviceInstanceId string) (result model.DeviceInstance, err error)

func GetDeviceService

func GetDeviceService(token JwtImpersonate, serviceId string) (result model.Service, err error)

func GetWorkerId

func GetWorkerId() string

func InitConsumer

func InitConsumer()

func InitProducer

func InitProducer() sarama.AsyncProducer

func Produce

func Produce(topic string, message string)

func SetCamundaRetry

func SetCamundaRetry(taskid string)

func ToBpmnRequest

func ToBpmnRequest(task messages.CamundaTask) (request messages.BpmnMsg, err error)

Types

type Envelope

type Envelope struct {
	DeviceId  string      `json:"device_id"`
	ServiceId string      `json:"service_id"`
	Value     interface{} `json:"value"`
}

type JwtImpersonate

type JwtImpersonate string

func EnsureAccess

func EnsureAccess() (token JwtImpersonate, err error)

func GetUserToken

func GetUserToken(user string) (token JwtImpersonate, err error)

func (JwtImpersonate) Get

func (this JwtImpersonate) Get(url string) (resp *http.Response, err error)

func (JwtImpersonate) GetJSON

func (this JwtImpersonate) GetJSON(url string, result interface{}) (err error)

func (JwtImpersonate) Post

func (this JwtImpersonate) Post(url string, contentType string, body io.Reader) (resp *http.Response, err error)

func (JwtImpersonate) PostJSON

func (this JwtImpersonate) PostJSON(url string, body interface{}, result interface{}) (err error)

type KeycloakClaims

type KeycloakClaims struct {
	RealmAccess RealmAccess `json:"realm_access"`
	jwt.StandardClaims
}

type OpenidToken

type OpenidToken struct {
	AccessToken      string    `json:"access_token"`
	ExpiresIn        float64   `json:"expires_in"`
	RefreshExpiresIn float64   `json:"refresh_expires_in"`
	RefreshToken     string    `json:"refresh_token"`
	TokenType        string    `json:"token_type"`
	RequestTime      time.Time `json:"-"`
}

type RealmAccess

type RealmAccess struct {
	Roles []string `json:"roles"`
}

type RoleMapping

type RoleMapping struct {
	Name string `json:"name"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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