enable issue tracking for the repo (#6)

1 file changed
tree: 5745f15ab4707011cedc7fef21158f9d5d697125
  1. .github/
  2. airflow/
  3. license-templates/
  4. .asf.yaml
  5. .pre-commit-config.yaml
  6. client_test.go
  7. go.mod
  8. README.md
README.md

Airflow Go client

Go Airflow OpenAPI client generated from openapi spec.

Usage

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

func main() {
	cli := airflow.NewAPIClient(&airflow.Configuration{
		Scheme:   "http",
		Host:     "localhost:28080",
		BasePath: "/api/v1",
	})

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

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

See README for full client API documentation.

Release process

Go client is versioned using semantic import versioning.

To release a new version 1.x.y, simply push a new tag to this repo named airflow/v1.x.y.

Major version upgrade requires changing package import path based on semantic import versioning, which needs to be done manually.