windmill

package
v0.45.6 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2025 License: Apache-2.0 Imports: 13 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrWindmillDisabled is returned when Windmill integration is disabled
	ErrWindmillDisabled = errors.New("windmill integration is disabled")

	// ErrMissingToken is returned when no API token is configured
	ErrMissingToken = errors.New("windmill API token is required")

	// ErrMissingWorkspace is returned when no workspace is configured
	ErrMissingWorkspace = errors.New("windmill workspace is required")

	// ErrInvalidFlowPath is returned when the flow path is invalid
	ErrInvalidFlowPath = errors.New("invalid flow path")

	// ErrFlowNotFound is returned when a flow is not found
	ErrFlowNotFound = errors.New("flow not found")
)

Functions

This section is empty.

Types

type Client

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

Client is a simple SDK for creating and managing Windmill flows

func NewWindmill

func NewWindmill(cfg entconfig.Config) (*Client, error)

NewWindmill creates a new Windmill client based on the provided configuration

func (*Client) CreateFlow

func (c *Client) CreateFlow(ctx context.Context, req CreateFlowRequest) (*CreateFlowResponse, error)

CreateFlow creates a new flow in Windmill and returns the flow path It wraps raw code into proper Windmill flow structure

func (*Client) CreateScheduledJob

CreateScheduledJob creates a new scheduled job in Windmill

func (*Client) GetFlow

func (c *Client) GetFlow(ctx context.Context, path string) (*api.Flow, error)

GetFlow retrieves a flow by path

func (*Client) UpdateFlow

func (c *Client) UpdateFlow(ctx context.Context, path string, req UpdateFlowRequest) error

UpdateFlow updates an existing flow in Windmill

type CreateFlowRequest

type CreateFlowRequest struct {
	Path        string                `json:"path"`
	Summary     string                `json:"summary,omitempty"`
	Description string                `json:"description,omitempty"`
	Value       []any                 `json:"value"`
	Schema      *map[string]any       `json:"schema,omitempty"`
	Language    enums.JobPlatformType `json:"language"`
}

CreateFlowRequest represents the request structure for creating a new flow

type CreateFlowResponse

type CreateFlowResponse struct {
	Path string `json:"path"`
}

CreateFlowResponse represents the response after creating a flow

type CreateScheduledJobRequest

type CreateScheduledJobRequest struct {
	Path     string `json:"path"`
	Schedule string `json:"schedule"`
	FlowPath string `json:"script_path"`
	Args     any    `json:"args,omitempty"`
	Summary  string `json:"summary,omitempty"`
	Enabled  *bool  `json:"enabled,omitempty"`
}

CreateScheduledJobRequest represents the request structure for creating a scheduled job

type CreateScheduledJobResponse

type CreateScheduledJobResponse struct {
	Path string `json:"path"`
}

CreateScheduledJobResponse represents the response after creating a scheduled job

type Flow

type Flow struct {
	Path      string    `json:"path"`
	Summary   string    `json:"summary,omitempty"`
	Value     any       `json:"value"`
	Schema    any       `json:"schema,omitempty"`
	CreatedAt time.Time `json:"created_at"`
	UpdatedAt time.Time `json:"edited_at"`
}

Flow represents a complete flow definition

type ScheduledJob

type ScheduledJob struct {
	Path      string    `json:"path"`
	Schedule  string    `json:"schedule"`
	FlowPath  string    `json:"script_path"`
	Args      any       `json:"args,omitempty"`
	Summary   string    `json:"summary,omitempty"`
	Enabled   bool      `json:"enabled"`
	CreatedAt time.Time `json:"created_at"`
	UpdatedAt time.Time `json:"edited_at"`
}

ScheduledJob represents a scheduled job in Windmill

type UpdateFlowRequest

type UpdateFlowRequest struct {
	Summary     string                  `json:"summary,omitempty"`
	Description string                  `json:"description,omitempty"`
	Value       []any                   `json:"value"`
	Schema      *map[string]interface{} `json:"schema,omitempty"`
	Language    enums.JobPlatformType   `json:"language"`
}

UpdateFlowRequest represents the request structure for updating an existing flow

Jump to

Keyboard shortcuts

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