https://github.com/juju/go-oracle-cloud
Go client interfacing with the oracle IAAS cloud API.
https://github.com/juju/go-oracle-cloud
go golang iaas iaas-cloud oci oracle oracle-cloud rest rest-client
Last synced: 5 months ago
JSON representation
Go client interfacing with the oracle IAAS cloud API.
- Host: GitHub
- URL: https://github.com/juju/go-oracle-cloud
- Owner: juju
- License: other
- Created: 2017-01-23T12:10:10.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-05-10T16:29:53.000Z (over 8 years ago)
- Last Synced: 2025-04-06T18:52:12.296Z (6 months ago)
- Topics: go, golang, iaas, iaas-cloud, oci, oracle, oracle-cloud, rest, rest-client
- Language: Go
- Size: 617 KB
- Stars: 4
- Watchers: 4
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# go-oracle-cloud
Client library providing a simple interface with the oracle cloud IAAS rest api.
[](https://travis-ci.org/juju/go-oracle-cloud) [](https://godoc.org/github.com/juju/go-oracle-cloud) [](https://goreportcard.com/report/github.com/juju/go-oracle-cloud)
## Example client authentication
```go
package mainimport (
"fmt"
oracle "github.com/juju/go-oracle-cloud/api"
)func main() {
// create the configuration for the client
cfg := oracle.Config{
Username: "oracle@username.com",
Password: "oraclepassword",
Identify: "qbitq",
Endpoint: "https://api-z52.compute.us2.oraclecloud.com",
}// create a new client based on the configuration
cli, err := oracle.NewClient(cfg)
if err != nil {
fmt.Println(err)
return
}// authenticate with the client
err = cli.Authenticate()
if err != nil {
fmt.Println(err)
return
}// code
}```