codegen

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BoolTitle

func BoolTitle(b bool) string

func CheckDeps added in v0.1.0

func CheckDeps(deps []string) bool

func CreateDagGen

func CreateDagGen(g GenData, directory string) (string, error)

func MapToPythonDict added in v0.1.0

func MapToPythonDict(m map[string]interface{}) (string, error)

Function to convert a Go map to a Python dictionary string

func ToJSONString added in v0.1.0

func ToJSONString(v interface{}) (string, error)

Function to convert an interface to a JSON string

func ToMap added in v0.1.0

func ToMap(v interface{}) (map[string]interface{}, error)

func TransformTaskID added in v0.1.0

func TransformTaskID(taskID string) string

Function to transform the task ID

Types

type Args

type Args struct {
	Email         string
	DependsOnPast bool
	Retries       int
	RetryDelay    int
}

type Connection

type Connection struct {
	ConnectionID string
	Host         string
	Port         int
	Downstream   []string
}

type Dag

type Dag struct {
	ID          string
	Description string
	StartDate   StartDate
	Tags        []string
	DefaultArgs Args
}

type GenData

type GenData struct {
	DagDef        Dag
	Connections   []Connection
	PythonImports []string
	Tasks         []HttpTask
	PythonTask    []PythonTask
}

type HttpTask added in v0.1.6

type HttpTask struct {
	TaskID       string
	ConnectionId string
	Name         string
	Endpoint     string
	Data         interface{}
	Downstream   []string
	Upstream     []string
}

type PythonTask added in v0.1.6

type PythonTask struct {
	TaskID     string
	Name       string
	Data       interface{}
	Downstream []string
	Upstream   []string
}

type StartDate

type StartDate struct {
	Day   int
	Month int
	Year  int
}

Jump to

Keyboard shortcuts

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