Categorygithub.com/aiven/go-client-codegen
modulepackage
0.18.0
Repository: https://github.com/aiven/go-client-codegen.git
Documentation: pkg.go.dev

# README

go-client-codegen

go-client-codegen is an automatically code generated Aiven Go Client from the Aiven API specification.

Warning: this client is under heavy development.

Setup

go get github.com/aiven/go-client-codegen

Configuration and Usage

Via Environment Variables

NameTypeDescription
AIVEN_TOKENstringAiven API Authentication Token
AIVEN_WEB_URLstringAiven API URL
AIVEN_USER_AGENTstringUser Agent
AIVEN_DEBUGboolDebug Output Flag (stderr)

Via Constructor Options

import "github.com/aiven/go-client-codegen"

client, err := aiven.NewClient(DebugOpt(true), UserAgentOpt("foo"))
if err != nil {
	return err
}

services, err := client.ServiceList(ctx, "bar-project")

See CONTRIBUTING.md for instructions on how to contribute to the development of go-client-codegen.

License

go-client-codegen is licensed under the Apache license, version 2.0. Full license text is available in the LICENSE file.

Please note that the project explicitly does not require a CLA (Contributor License Agreement) from its contributors.

Contact

Bug reports and patches are very welcome, please post them as GitHub issues and pull requests at https://github.com/aiven/go-client-codegen. To report any possible vulnerabilities or other serious issues please see our security policy.

# Packages

No description provided by the author

# Functions

DebugOpt whether should the client run in debug mode.
DoerOpt replaces underlying http client in aivenClient.
HostOpt API host url.
IsAlreadyExists returns true if the error message and error code that indicates that entity already exists.
IsNilOrNotFound returns true for nil and 404 error.
IsNotFound returns true if the specified error has status 404.
NewClient creates a new Aiven client.
TokenOpt runs the client with the given token.
UserAgentOpt sets User-Agent header.
Version returns aiven-go-client version string.

# Structs

Error represents an Aiven API Error.
OperationIDKey is the key used to store the operation ID in the context.

# Interfaces

No description provided by the author
Doer aka http.Client.

# Type aliases

Option is a function that configures the client.