commit | 275741a25d9594b77a9110d194fdebbc2e7f51b8 | [log] [tgz] |
---|---|---|
author | Ash Berlin-Taylor <ash_github@firemirror.com> | Fri Mar 26 12:36:42 2021 +0000 |
committer | GitHub <noreply@github.com> | Fri Mar 26 12:36:42 2021 +0000 |
tree | 0251a8ea82888347f05d24856253a96df7744670 | |
parent | b3eb67a3623e036738e769fb2c23ecdf31f32d19 [diff] |
Prepare for rename default branch to main (#8)
Go Airflow OpenAPI client generated from openapi spec.
package main
import (
"context"
"fmt"
"github.com/apache/airflow-client-go/airflow"
)
func main() {
cli := airflow.NewAPIClient(&airflow.Configuration{
Scheme: "http",
Host: "localhost:8080",
BasePath: "/api/v1",
})
cred := airflow.BasicAuth{
UserName: "username",
Password: "password",
}
ctx := context.WithValue(context.Background(), airflow.ContextBasicAuth, cred)
variable, _, err := cli.VariableApi.GetVariable(ctx, "foo")
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.