entity

package
v0.0.0-...-0f8d847 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2025 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Connection

type Connection struct {
	Pipes        []Pipeline
	Integrations []Integration
}

Connection is an object for configure pipeline.

type ConnectionType

type ConnectionType string

ConnectionType each third party destination are compatible with one of these methods it means we have to deliver data to the destinations with these methods https://github.com/ormushq/ormus/issues/9

const (
	EventStream ConnectionType = "event-stream"
	Storage     ConnectionType = "storage"
	ReversETL   ConnectionType = "reverse-ETL"
)

type DestinationCategory

type DestinationCategory string
const (
	Analytics      DestinationCategory = "analytics"
	Advertising    DestinationCategory = "advertising"
	CRM            DestinationCategory = "crm"
	EmailMarketing DestinationCategory = "email-marketing"
	Livechat       DestinationCategory = "livechat"
	Payments       DestinationCategory = "payments"
	Surveys        DestinationCategory = "Surveys"
)

type DestinationMetadata

type DestinationMetadata struct {
	ID         string
	Name       string          // webhook, Google Universal Analytics
	Slug       DestinationType // webhook, google-analytics
	Categories []DestinationCategory
}

type DestinationType

type DestinationType string
const (
	WebhookDestinationType DestinationType = "webhook"
)

type Integration

type Integration struct {
	ID             string
	SourceID       string
	Name           string
	Metadata       DestinationMetadata
	ConnectionType ConnectionType
	Enabled        bool
	Config         IntegrationConfig
	CreatedAt      time.Time
}

Integration is a connector that allows our app send data to an external service or application.

type IntegrationConfig

type IntegrationConfig map[string]any

type Pipeline

type Pipeline struct {
	// TODO: should we add integrations inside Pipeline?
	Integrations []Integration
}

type Project

type Project struct {
	ID          string     `json:"id"`
	TokenID     string     `json:"token_id"`
	CreatedAt   time.Time  `json:"created_at"`
	UpdatedAt   time.Time  `json:"updated_at"`
	Deleted     bool       `json:"deleted"`
	DeletedAt   *time.Time `json:"deleted_at"`
	Name        string     `json:"name"`
	Description string     `json:"description"`
	UserID      string     `json:"user_id"`
}

Project is the main object for managing different connections.

type Source

type Source struct {
	ID          string         `json:"id"`
	TokenID     string         `json:"token_id"`
	WriteKey    WriteKey       `json:"write_key"`
	Name        string         `json:"name"`
	Description string         `json:"description"`
	ProjectID   string         `json:"project_id"`
	OwnerID     string         `json:"owner_id"`
	Status      Status         `json:"status"`
	Metadata    SourceMetadata `json:"metadata"`
	Deleted     bool           `json:"deleted"`
	CreatedAt   time.Time      `json:"created_at"`
	UpdatedAt   time.Time      `json:"updated_at"`
	DeletedAt   *time.Time     `json:"deleted_at"`
}

TODO: need change feilds.

type SourceCategory

type SourceCategory string

type SourceMetadata

type SourceMetadata struct {
	ID       string         `json:"id"`
	Name     string         `json:"name"`
	Slug     string         `json:"slug"`
	Category SourceCategory `json:"category"`
}

type Status

type Status string
const (
	SourceStatusActive    Status = "active"
	SourceStatusNotActive Status = "not active"
)

type User

type User struct {
	ID        string     `json:"id"`
	CreatedAt time.Time  `json:"created_at"`
	UpdatedAt time.Time  `json:"updated_at"`
	DeletedAt *time.Time `json:"deleted_at"`
	Email     string     `json:"email"`
	Password  string     `json:"-"`
	IsActive  bool       `json:"is_active"`
}

type WriteKey

type WriteKey string // because we might change the format in future

Jump to

Keyboard shortcuts

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