model

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2024 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddClusterNamespaceRequest

type AddClusterNamespaceRequest struct {
	Body struct {
		Name string `json:"name" validate:"required"`
	}

	Params struct {
		ClusterName string `params:"name" validate:"required"`
	}
}

func (*AddClusterNamespaceRequest) Bind

func (r *AddClusterNamespaceRequest) Bind(ctx *fiber.Ctx, v *validator.Validate) error

type AddFlowRequest

type AddFlowRequest struct {
	Name       string                    `json:"name" validate:"required"`
	Components []AddFlowRequestComponent `json:"components" validate:"min=1,dive"`
}

func (*AddFlowRequest) Bind

func (r *AddFlowRequest) Bind(ctx *fiber.Ctx, v *validator.Validate, components []Component) error

func (*AddFlowRequest) Validate

func (r *AddFlowRequest) Validate(components []Component) error

type AddFlowRequestComponent

type AddFlowRequestComponent struct {
	Key         string                            `json:"key" validate:"required"`
	Version     string                            `json:"-"`
	Arguments   map[string]any                    `json:"arguments"`
	Connections AddFlowRequestComponentConnection `json:"connections"`
}

type AddFlowRequestComponentConnection

type AddFlowRequestComponentConnection struct {
	Targets []uint `json:"targets"`
}

type AddFlowRunnerRequest

type AddFlowRunnerRequest struct {
	Body struct {
		Cluster   string `json:"cluster" validate:"required"`
		Namespace string `json:"namespace" validate:"required"`
	}

	Params struct {
		FlowName string `params:"name" validate:"required"`
	}
}

func (*AddFlowRunnerRequest) Bind

func (r *AddFlowRunnerRequest) Bind(ctx *fiber.Ctx, v *validator.Validate) error

type Cluster

type Cluster struct {
	Name   string `json:"name,omitempty"`
	Config any    `json:"config,omitempty"`
}

type ClusterNamespace

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

type Component

type Component struct {
	Version     string              `json:"version,omitempty" yaml:"version"`
	Image       string              `json:"-" yaml:"image"`
	Key         string              `json:"key,omitempty" yaml:"key"`
	Name        string              `json:"name,omitempty" yaml:"name"`
	Description string              `json:"description,omitempty" yaml:"description"`
	Trigger     *bool               `json:"trigger" yaml:"trigger"`
	Arguments   []ComponentArgument `json:"arguments,omitempty" yaml:"arguments"`
}

func (*Component) Validate

func (c *Component) Validate() error

type ComponentArgument

type ComponentArgument struct {
	Key         string                `json:"key,omitempty" yaml:"key"`
	Name        string                `json:"name,omitempty" yaml:"name"`
	Description string                `json:"description,omitempty" yaml:"description"`
	Type        ComponentArgumentType `json:"type,omitempty" yaml:"type"`
	Required    *bool                 `json:"required" yaml:"required"`
}

type ComponentArgumentType

type ComponentArgumentType string
const (
	ComponentArgumentTypeString ComponentArgumentType = "string"
	ComponentArgumentTypeNumber ComponentArgumentType = "number"
	ComponentArgumentTypeBool   ComponentArgumentType = "bool"
)

type ListClusterNamespacesRequest

type ListClusterNamespacesRequest struct {
	Params struct {
		ClusterName string `params:"name" validate:"required"`
	}
}

func (*ListClusterNamespacesRequest) Bind

func (r *ListClusterNamespacesRequest) Bind(ctx *fiber.Ctx, v *validator.Validate) error

type ListClusterNamespacesResponse

type ListClusterNamespacesResponse struct {
	Items []ClusterNamespace `json:"items"`
}

type ListClustersResponse

type ListClustersResponse struct {
	Items []Cluster `json:"items"`
}

type ListComponentsResponse

type ListComponentsResponse struct {
	Items []Component `json:"items"`
}

type ListFlowsResponse

type ListFlowsResponse struct {
	Items []flow.Flow `json:"items"`
}

Jump to

Keyboard shortcuts

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