commit | b77ba90b877e5236fd109d263a0ce9f534461c91 | [log] [tgz] |
---|---|---|
author | Ilia Lazebnik <Ilia.lazebnik@gmail.com> | Fri Jan 21 09:59:43 2022 +0200 |
committer | GitHub <noreply@github.com> | Fri Jan 21 13:29:43 2022 +0530 |
tree | 55d1a5131c11c89976e9b247fceca98e3a954d95 | |
parent | b125451e80fd4da7038ceaea7654c885d155fb46 [diff] |
Update to latest Spec (#15) * update to latest * update to latest
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.