Skip to content

About

Apache Airflow - OpenApi Client for Go

Topics

Resources

Code of conduct

Security policy

Stars

220 stars

Watchers

22 watching

Forks

Repository files navigation

Airflow Go client

Go Airflow OpenAPI client generated from openapi spec.

Install

go get github.com/apache/airflow-client-go/airflow@latest

Usage

package main

import (
	"context"
	"fmt"
	"github.com/apache/airflow-client-go/airflow"
)

func main() {
	conf := airflow.NewConfiguration()
	conf.Host = "localhost:8080"
	conf.Scheme = "http"
	cli := airflow.NewAPIClient(conf)

	cred := airflow.BasicAuth{
		UserName: "username",
		Password: "password",
	}
	ctx := context.WithValue(context.Background(), airflow.ContextBasicAuth, cred)

	variable, _, err := cli.VariableApi.GetVariable(ctx, "foo").Execute()
	if err != nil {
		fmt.Println(err)
	} else {
		fmt.Println(variable)
	}
}

See README for full client API documentation.

About

Apache Airflow - OpenApi Client for Go

Topics

Resources

Code of conduct

Security policy

Stars

220 stars

Watchers

22 watching

Forks

Releases

Packages

Used by

Contributors

Languages