client

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseNode

type BaseNode struct {
	Id           string         `json:"id,omitempty"`
	Type         string         `json:"type"`
	Inputs       []string       `json:"inputs,omitempty"`
	Title        string         `json:"title,omitempty"`
	Description  string         `json:"description,omitempty"`
	UserConfig   map[string]any `json:"user_config"`
	GenerationId int64          `json:"generation_id"`
}

Represents a source, processor or destination.

type Client

type Client interface {
	Pipeline(id string) (*Pipeline, error)
	CreatePipeline(pipeline *Pipeline) (*Pipeline, error)
	UpdatePipeline(pipeline *Pipeline) (*Pipeline, error)
	DeletePipeline(id string) error

	Source(pipelineId string, id string) (*Source, error)
	CreateSource(pipelineId string, component *Source) (*Source, error)
	UpdateSource(pipelineId string, component *Source) (*Source, error)
	DeleteSource(pipelineId string, id string) error

	Destination(pipelineId string, id string) (*Destination, error)
	CreateDestination(pipelineId string, component *Destination) (*Destination, error)
	UpdateDestination(pipelineId string, component *Destination) (*Destination, error)
	DeleteDestination(pipelineId string, id string) error

	Processor(pipelineId string, id string) (*Processor, error)
	CreateProcessor(pipelineId string, component *Processor) (*Processor, error)
	UpdateProcessor(pipelineId string, component *Processor) (*Processor, error)
	DeleteProcessor(pipelineId string, id string) error
}

func NewClient

func NewClient(endpoint string, authKey string, headers map[string]string) Client

type Destination

type Destination struct {
	BaseNode
}

type Pipeline

type Pipeline struct {
	Id        string     `json:"id,omitempty"`
	Title     string     `json:"title"`
	CreatedAt *time.Time `json:"created_at,omitempty"`
}

Represents a Pipeline.

type Processor

type Processor struct {
	BaseNode
	Outputs []struct {
		Id    string `json:"id"`
		Label string `json:"label"`
	} `json:"outputs,omitempty"`
}

type Source

type Source struct {
	BaseNode
	GatewayRouteId string `json:"gateway_route_id,omitempty"`
}

Jump to

Keyboard shortcuts

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