commit | 92f8091a0f810d57d8c5dd9753f4e836a487eb93 | [log] [tgz] |
---|---|---|
author | SK <450723+senthilkumarkj@users.noreply.github.com> | Wed Mar 02 02:12:09 2022 -0800 |
committer | GitHub <noreply@github.com> | Wed Mar 02 11:12:09 2022 +0100 |
tree | 7300858e85546aa2f560825831414c61bb98decb | |
parent | b4038df2d354cbd8a43bed8904e6a092f99a1331 [diff] |
Fix typo and add LICENSE to airflow folder too. (#19) Previous commit failed to publish the documentation at https://pkg.go.dev/github.com/apache/airflow-client-go/airflow due to my typo in the filename. Sigh. Adding the license in the airflow folder too, as it is the real module that gets pulled.
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.