export

package
v0.0.15 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2025 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	InfluxDB    = "influxdb"
	TimescaleDB = "timescaledb"
)
View Source
const (
	TypeDevice    = "deviceId"   //not handled
	TypeAnalytics = "operatorId" // Filter = "{{pipelineId}}:{{operatorId}}"; Topic = "analytics-{{operatorName}}"; EntityName = "{{operatorId}}"; ServiceName = "{{operatorName}}"
	TypeImport    = "import_id"  // Filter = "{{import.id}}"; Topic = "{{import.kafka_topic}}"; EntityName = "{{import.name}}"; ServiceName = "{{import.import_type_id}}"
)
View Source
const (
	S  = "s"
	MS = "ms"
)
View Source
const (
	Largest  = "largest"
	Smallest = "smallest"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ServingServiceUrl string `json:"serving_service_url"`
	WorkerParamPrefix string `json:"worker_param_prefix"`
	Debug             bool   `json:"debug"`
}

type Export

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

func New

func New(config Config, libConfig configuration.Config, auth *auth.Auth, smartServiceRepo SmartServiceRepo) *Export

func (*Export) Do

func (this *Export) Do(task model.CamundaExternalTask) (modules []model.Module, outputs map[string]interface{}, err error)

func (*Export) Undo

func (this *Export) Undo(modules []model.Module, reason error)

type ExportDatabase

type ExportDatabase struct {
	ID            string `gorm:"primary_key;type:varchar(255);column:id"`
	Name          string `gorm:"type:varchar(255)"`
	Description   string `gorm:"type:varchar(255)"`
	Type          string `gorm:"type:varchar(255)"`
	Deployment    string `gorm:"type:varchar(255)"`
	Url           string `gorm:"type:varchar(255)"`
	EwFilterTopic string `gorm:"type:varchar(255)"`
	UserId        string `gorm:"type:varchar(255)"`
	Public        bool   `gorm:"type:bool;DEFAULT:false"`
}

type Instance

type Instance struct {
	ID               uuid.UUID      `gorm:"primary_key;type:char(36);column:id"`
	Name             string         `gorm:"type:varchar(255)"`
	Description      string         `gorm:"type:varchar(255)"`
	EntityName       string         `gorm:"type:varchar(255)"`
	ServiceName      string         `gorm:"type:varchar(255)"`
	Topic            string         `gorm:"type:varchar(255)"`
	ApplicationId    uuid.UUID      `gorm:"type:char(36)"`
	Database         string         `gorm:"type:varchar(255)"`
	Measurement      string         `gorm:"type:varchar(255)"`
	Filter           string         `gorm:"type:varchar(255)"`
	FilterType       string         `gorm:"type:varchar(255)"`
	TimePath         string         `gorm:"type:varchar(255)"`
	TimePrecision    *string        `gorm:"type:varchar(255)"`
	UserId           string         `gorm:"type:varchar(255)"`
	Generated        bool           `gorm:"type:bool;DEFAULT:false"`
	RancherServiceId string         `gorm:"type:varchar(255)"`
	Offset           string         `gorm:"type:varchar(255)"`
	ExportDatabaseID string         `gorm:"type:varchar(255)"`
	ExportDatabase   ExportDatabase `gorm:"association_autoupdate:false;association_autocreate:false"`
	TimestampFormat  string         `gorm:"type:varchar(255)"`
	Values           []Value        `gorm:"foreignkey:InstanceID;association_foreignkey:ID"`
	CreatedAt        time.Time
	UpdatedAt        time.Time
}

Instance is the response from serving-service representing an existing export

type ServingRequest

type ServingRequest struct {
	FilterType       string                `json:"FilterType,omitempty" validate:"required"`
	Filter           string                `json:"Filter,omitempty" validate:"required"`
	Name             string                `json:"Name,omitempty" validate:"required"`
	EntityName       string                `json:"EntityName,omitempty" validate:"required"`
	ServiceName      string                `json:"ServiceName,omitempty" validate:"required"`
	Description      string                `json:"Description,omitempty"`
	Topic            string                `json:"Topic,omitempty" validate:"required"`
	TimePath         string                `json:"TimePath,omitempty"`
	TimePrecision    string                `json:"TimePrecision,omitempty"`
	Generated        bool                  `json:"generated,omitempty"`
	Offset           string                `json:"Offset,omitempty" validate:"required"`
	ForceUpdate      bool                  `json:"ForceUpdate,omitempty"`
	Values           []ServingRequestValue `json:"Values,omitempty"`
	ExportDatabaseID string                `json:"ExportDatabaseID,omitempty"`
	TimestampFormat  string                `json:"TimestampFormat,omitempty"`
}

ServingRequest is a request to the serving-service to create a export (represented by Instance)

type ServingRequestValue

type ServingRequestValue struct {
	Name string `json:"Name,omitempty"`
	Type string `json:"Type,omitempty"`
	Path string `json:"Path,omitempty"`
	Tag  bool   `json:"Tag"`
}

type SmartServiceRepo

type SmartServiceRepo interface {
	GetInstanceUser(instanceId string) (userId string, err error)
}

type Value

type Value struct {
	InstanceID uuid.UUID `gorm:"type:char(36)"`
	Name       string    `gorm:"type:varchar(255)"`
	Type       string    `gorm:"type:varchar(255)"`
	Path       string    `gorm:"type:varchar(255)"`
	Tag        bool      `gorm:"type:bool;DEFAULT:false"`
}

Jump to

Keyboard shortcuts

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