datamodel

package
v0.1.0-alpha Latest Latest
Warning

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

Go to latest
Published: May 13, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseDynamic

type BaseDynamic struct {
	UID        uuid.UUID      `gorm:"type:uuid;primary_key;<-:create"` // allow read and create
	CreateTime time.Time      `gorm:"autoCreateTime:nano"`
	UpdateTime time.Time      `gorm:"autoUpdateTime:nano"`
	DeleteTime gorm.DeletedAt `sql:"index"`
}

BaseDynamic contains common columns for all tables with dynamic UUID as primary key generated when creating

func (*BaseDynamic) BeforeCreate

func (base *BaseDynamic) BeforeCreate(db *gorm.DB) error

BeforeCreate will set a UUID rather than numeric ID.

type BaseStatic

type BaseStatic struct {
	UID        uuid.UUID      `gorm:"type:uuid;primary_key;<-:create"` // allow read and create
	CreateTime time.Time      `gorm:"autoCreateTime:nano"`
	UpdateTime time.Time      `gorm:"autoUpdateTime:nano"`
	DeleteTime gorm.DeletedAt `sql:"index"`
}

BaseStatic contains common columns for all tables with static UUID as primary key

type ConnectionType

type ConnectionType connectorPB.ConnectionType

ConnectionType is an alias type for Protobuf enum ConnectionType

func (*ConnectionType) Scan

func (c *ConnectionType) Scan(value interface{}) error

Scan function for custom GORM type ConnectionType

func (ConnectionType) Value

func (c ConnectionType) Value() (driver.Value, error)

Value function for custom GORM type ConnectionType

type Connector

type Connector struct {
	BaseDynamic
	ID                     string
	Owner                  string
	ConnectorDefinitionUID uuid.UUID
	Description            sql.NullString
	Tombstone              bool
	Configuration          datatypes.JSON `gorm:"type:jsonb"`
	ConnectorType          ConnectorType  `sql:"type:valid_connector_type"`
}

Connector is the data model of the connector table

type ConnectorDefinition

type ConnectorDefinition struct {
	BaseStatic
	ID                   string
	Title                string
	DockerRepository     string
	DockerImageTag       string
	DocumentationURL     string
	Icon                 string
	Tombstone            bool
	Public               bool
	Custom               bool
	ReleaseDate          *time.Time
	Spec                 datatypes.JSON `gorm:"type:jsonb"`
	ResourceRequirements datatypes.JSON `gorm:"type:jsonb"`
	ConnectorType        ConnectorType  `sql:"type:valid_connector_type"`
	ConnectionType       ConnectionType `sql:"type:valid_connection_type"`
	ReleaseStage         ReleaseStage   `sql:"type:valid_release_stage"`
}

ConnectorDefinition is the data model of the connector_definition table

type ConnectorType

type ConnectorType connectorPB.ConnectorType

ConnectorType is an alias type for Protobuf enum ConnectorType

func (*ConnectorType) Scan

func (c *ConnectorType) Scan(value interface{}) error

Scan function for custom GORM type ConnectorType

func (ConnectorType) Value

func (c ConnectorType) Value() (driver.Value, error)

Value function for custom GORM type ConnectorType

type ReleaseStage

type ReleaseStage connectorPB.ReleaseStage

ReleaseStage is an alias type for Protobuf enum ReleaseStage

func (*ReleaseStage) Scan

func (r *ReleaseStage) Scan(value interface{}) error

Scan function for custom GORM type ReleaseStage

func (ReleaseStage) Value

func (r ReleaseStage) Value() (driver.Value, error)

Value function for custom GORM type ReleaseStage

Jump to

Keyboard shortcuts

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