models

package
v0.11.1 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DataFile

type DataFile struct {
	CID           string    `gorm:"primaryKey;column:cid;type:varchar(255);not null"` // column name specified to avoid GORM default snake case
	WalletAddress string    `gorm:"type:varchar(42);not null"`
	Filename      string    `gorm:"type:varchar(255);not null"`
	JobInputs     []Job     `gorm:"many2many:job_inputs;foreignKey:CID;references:BacalhauJobID"`
	JobOutputs    []Job     `gorm:"many2many:job_outputs;foreignKey:CID;references:BacalhauJobID"`
	Timestamp     time.Time `gorm:""`
}

type Flow

type Flow struct {
	CID           string `gorm:"primaryKey;column:cid;type:varchar(255);not null"` // column name specified to avoid GORM default snake case
	Jobs          []Job  `gorm:"foreignKey:FlowID"`
	Name          string `gorm:"type:varchar(255);"`
	WalletAddress string `gorm:"type:varchar(42);not null"`
}

type InputOutput

type InputOutput struct {
	ID         uint   `gorm:"primaryKey"`
	JobID      uint   `gorm:"column:job_id;type:int;not null"`
	KeyName    string `gorm:"column:key_name;type:varchar(255);not null"`
	Class      string `gorm:"column:class;type:varchar(255);not null"`
	DatafileID uint   `gorm:"column:datafile_id;type:int;not null;foreignKey"`
}

type Job

type Job struct {
	BacalhauJobID string     `gorm:"primaryKey;type:varchar(255);not null"`
	State         string     `gorm:"type:varchar(255);default:'processing'"`
	Error         string     `gorm:"type:text;default:''"`
	WalletAddress string     `gorm:"type:varchar(255)"`
	ToolID        string     `gorm:"type:varchar(255);not null;index"`
	Tool          Tool       `gorm:"foreignKey:ToolID"`
	FlowID        string     `gorm:"type:varchar(255);not null;index"`
	Flow          Flow       `gorm:"foreignKey:FlowID"`
	Inputs        []DataFile `gorm:"many2many:job_inputs;foreignKey:BacalhauJobID;references:CID"`
	Outputs       []DataFile `gorm:"many2many:job_outputs;foreignKey:BacalhauJobID;references:CID"`
}

type Tool

type Tool struct {
	CID           string         `gorm:"primaryKey;column:cid;type:varchar(255);not null"` // column name specified to avoid GORM default snake case
	Name          string         `gorm:"type:text;not null;unique"`
	WalletAddress string         `gorm:"type:varchar(42);not null"`
	ToolJson      datatypes.JSON `gorm:"type:json"`
}

type User

type User struct {
	WalletAddress string `gorm:"primaryKey;type:varchar(42);not null" json:"walletAddress"`
}

Jump to

Keyboard shortcuts

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