Azion Go SDK
The Azion SDK for Go facilitates the use of the Azion API services by providing a set of tools that make the development of Go applications smoother.
Requirements
For using the Go SDK, you need to:
- Have Go 1.17 or later installed.
- Have a go project with a
main.go
file created. - Initialize a Go module with
go mod init <name>
.
Downloading and installing Azion SDK
The Azion API Go SDK is available on GitHub.
- On your go project’s root directory, open the terminal and run:
Or simply:
Implementation
This is a complete practical example that can be copied and pasted to your main.go
file.
After that, you need to run the project with:
Creating an Edge DNS zone
Explaining the example
Learn about the implementation of the Azion API SDK by analyzing the steps of the creation of a new Edge DNS zone.
Instantiating a Client
The Go client abstracts away the complexity of the underlying service or API, making it easier for developers to integrate with it.
To instantiate a client, you have to:
- Import the package you want to use. In this example, you’ll create a new Edge DNS zone.
- Instantiate the client:
Creating an Edge DNS zone
Take a look at the creation of an Edge DNS zone using the SDK:
Available APIs
The Azion SDK offers management to the following services: