commit | 4f1b26e4a5d0bbeb55ce4fd5d72079597e7875bb | [log] [tgz] |
---|---|---|
author | Ilia Lazebnik <Ilia.lazebnik@gmail.com> | Mon May 09 23:46:51 2022 +0300 |
committer | GitHub <noreply@github.com> | Mon May 09 22:46:51 2022 +0200 |
tree | ad29dd25dd240bf5652bbf69c3578e3509be28c1 | |
parent | 92f8091a0f810d57d8c5dd9753f4e836a487eb93 [diff] |
re-generate according to spec (#23)
Go Airflow OpenAPI client generated from openapi spec.
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.
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.