models

package
v0.0.20 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2025 License: Apache-2.0 Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewInternalError

func NewInternalError(err error) error

func NewInvalidInputError

func NewInvalidInputError(err error) error

func NewNotFoundError

func NewNotFoundError(err error) error

func NewResourceBusyError

func NewResourceBusyError(err error) error

func SetDefaultPermissions added in v0.0.7

func SetDefaultPermissions(instance Flow, permissions permV2Client.ResourcePermissions)

Types

type Cell

type Cell struct {
	Type           string         `json:"type,omitempty"`
	InPorts        []string       `json:"inPorts,omitempty"`
	OutPorts       []string       `json:"outPorts,omitempty"`
	Name           *string        `json:"name,omitempty"`
	Image          *string        `json:"image,omitempty"`
	OperatorId     *string        `json:"operatorId,omitempty"`
	Position       *CellPosition  `json:"position,omitempty"`
	Source         *CellLink      `json:"source,omitempty"`
	Target         *CellLink      `json:"target,omitempty"`
	Id             string         `json:"id,omitempty"`
	Config         *[]ConfigValue `json:"config,omitempty"`
	Cost           *int64         `json:"cost,omitempty"`
	DeploymentType *string        `json:"deploymentType,omitempty"`
}
type CellLink struct {
	Id     string `json:"id"`
	Magnet string `json:"magnet"`
	Port   string `json:"port"`
}

type CellPosition

type CellPosition struct {
	X float64 `json:"x"`
	Y float64 `json:"y"`
}

type ConfigValue added in v0.0.3

type ConfigValue struct {
	Name string `json:"name,omitempty"`
	Type string `json:"type,omitempty"`
}

type Flow

type Flow struct {
	Id          *primitive.ObjectID `bson:"_id,omitempty" json:"_id,omitempty"`
	Name        string              `json:"name,omitempty"`
	Description *string             `json:"description,omitempty"`
	Model       Model               `json:"model,omitempty"`
	Image       *string             `json:"image,omitempty"`
	UserId      string              `bson:"userId,omitempty" json:"userId,omitempty"`
	DateCreated time.Time           `bson:"dateCreated,omitempty" json:"dateCreated,omitempty"`
	DateUpdated time.Time           `bson:"dateUpdated,omitempty" json:"dateUpdated,omitempty"`
}

type FlowsResponse

type FlowsResponse struct {
	Flows []Flow `json:"flows"`
	Total int64  `json:"total"`
}

type InternalError

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

func (*InternalError) Error

func (e *InternalError) Error() string

func (*InternalError) Unwrap

func (e *InternalError) Unwrap() error

type InvalidInputError

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

func (*InvalidInputError) Error

func (e *InvalidInputError) Error() string

func (*InvalidInputError) Unwrap

func (e *InvalidInputError) Unwrap() error

type Model

type Model struct {
	Cells []Cell `json:"cells,omitempty"`
}

type NotFoundError

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

func (*NotFoundError) Error

func (e *NotFoundError) Error() string

func (*NotFoundError) Unwrap

func (e *NotFoundError) Unwrap() error

type ResourceBusyError

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

func (*ResourceBusyError) Error

func (e *ResourceBusyError) Error() string

func (*ResourceBusyError) Unwrap

func (e *ResourceBusyError) Unwrap() error

Jump to

Keyboard shortcuts

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