Commit Graph

517 Commits

Author SHA1 Message Date
Anit Gandhi e534d34652 load balancers: add new enable_backend_keepalive field 2020-03-16 17:48:22 -04:00
Ben Tranter 4acd72d5f8
Merge pull request #308 from bentranter/update-readme-with-new-client-init
Update README to use NewFromToken
2020-03-16 14:58:24 -04:00
Ben Tranter e1575cffe0
Expand documentation for NewClient
Also adds a reference to the godoc for the (now old) NewClient method.
2020-03-16 11:30:42 -04:00
Ben Tranter 014c98ed83
Merge branch 'master' into update-readme-with-new-client-init 2020-03-16 10:58:15 -04:00
Ben Tranter d3c5fa5e6c
Prefix package name to example
Co-Authored-By: Andrew Starr-Bochicchio <andrewsomething@users.noreply.github.com>
2020-03-16 10:58:07 -04:00
Hilary (hilz) Holz 37c786e29d
Merge pull request #315 from bentranter/add-missing-changelog-entry
Add missing CHANGELOG.md entry
2020-03-10 10:01:06 -07:00
Ben Tranter 8722bfd666
Add missing CHANGELOG.md entry 2020-03-10 11:34:05 -04:00
Verónica López c20b5c546f
Merge pull request #314 from rbutler/rbutler/310-changelog-update
Add BillingHistory to changelog, sync with releases
2020-03-05 16:39:18 -05:00
Ryan Butler d8a991f8cf Add BillingHistory to changelog, sync with releases 2020-03-04 20:39:52 -06:00
Verónica López c60f0e9be6
Merge pull request #310 from rbutler/rbutler/billing-history
Add BillingHistory service and List endpoint
2020-03-04 21:25:52 -05:00
Verónica López e1c78bb450
Merge branch 'master' into rbutler/billing-history 2020-03-04 21:19:51 -05:00
Verónica López b41f7b17af
Merge pull request #313 from bentranter/clean-up-changelog-entries
Remove duplicate entry from the changelog
2020-03-04 17:34:25 -05:00
Ben Tranter 59724d0fba
Remove duplicate entry from the changelog 2020-03-04 17:26:04 -05:00
Verónica López b171daeb6f
Merge pull request #312 from zbarahal-do/zbarahal/godo_release_mysql_auth
Create a release candidate for mysql auth
2020-03-04 15:12:05 -05:00
Verónica López 40cf77f3ae
Merge branch 'master' into zbarahal/godo_release_mysql_auth 2020-03-04 15:04:01 -05:00
Zach Barahal 77c9b5a7d9 Create a release candidate for mysql auth 2020-03-04 11:56:45 -08:00
Verónica López 0932ad0689
Merge pull request #311 from zbarahal-do/zbarahal/redo_user_auth
Add Reset MySQL Auth
2020-03-04 14:49:53 -05:00
Zach Barahal 96c8d47040 Fixup whitespace 2020-03-04 11:26:37 -08:00
Zach Barahal c7cb2154b4 Add the pending change 2020-03-04 11:26:31 -08:00
Zach Barahal 3bea0c6884 Add reset user auth routes to db service 2020-03-04 11:26:26 -08:00
Ryan Butler 00e865c4e4 fixup! Add BillingHistory service and List endpoint 2020-03-02 10:45:56 -06:00
Zach Gershman 38ed6ff2ed
Merge pull request #309 from digitalocean/next-release
release for v1.31.0
2020-02-28 11:31:36 -08:00
Ryan Butler 33604ba0d1
Merge branch 'master' into rbutler/billing-history 2020-02-28 13:22:14 -06:00
Ryan Butler b1cd87eaa4 Add BillingHistory service and List endpoint 2020-02-28 13:09:24 -06:00
Zach Gershman b4f4e5db08 release for v1.31.0 2020-02-28 09:44:27 -08:00
Ben Tranter d208c5132e
Update README to use NewFromToken 2020-02-28 11:36:05 -05:00
Zach Gershman 4f85dbd19c
Merge pull request #307 from bentranter/add-missing-changelog-entry
Add missing CHANGELOG entry
2020-02-28 08:21:53 -08:00
Ben Tranter 4846c9c39a
Add missing CHANGELOG entry 2020-02-28 11:15:38 -05:00
Ryan Butler ca789800d2
Add GetCSV and GetPDF methods to InvoiceService (#305)
* Add GetCSV and GetPDF methods to InvoiceService

Co-authored-by: Zach Gershman <zachgersh@users.noreply.github.com>
2020-02-28 08:06:47 -08:00
Ben Tranter 40dd0cc93a
Add NewFromToken convenience method to init client (#304)
* Add NewFromToken convenience method to init client

Fixes #296

Adds a new convenience method for creating a new instance of `godo` from
just an API token.

Usage

Right now, it takes quite a few steps to create a `godo` instance:

```go
type TokenSource struct {
	AccessToken string
}

func (t *TokenSource) Token() (*oauth2.Token, error) {
	token := &oauth2.Token{
		AccessToken: t.AccessToken,
	}
	return token, nil
}

func main() {
	tokenSource := &TokenSource{
		AccessToken: pat,
	}

	oauthClient := oauth2.NewClient(context.Background(), tokenSource)
	client := godo.NewClient(oauthClient)
}
```

Now, it takes just a single line:

```go
func main() {
	client := godo.NewFromToken("my-token")
}
```

The intention of this is to make initializing new clients easier. It
also has an additional benefit of not forcing users to have to import
the `golang.org/x/oauth2` dependency just to initialize new `godo`
instances.

* Add NewFromToken convenience method to init client

Fixes #296

Adds a new convenience method for creating a new instance of `godo` from
just an API token.

Usage

Right now, it takes quite a few steps to create a `godo` instance:

```go
type TokenSource struct {
	AccessToken string
}

func (t *TokenSource) Token() (*oauth2.Token, error) {
	token := &oauth2.Token{
		AccessToken: t.AccessToken,
	}
	return token, nil
}

func main() {
	tokenSource := &TokenSource{
		AccessToken: pat,
	}

	oauthClient := oauth2.NewClient(context.Background(), tokenSource)
	client := godo.NewClient(oauthClient)
}
```

Now, it takes just a single line:

```go
func main() {
	client := godo.NewFromToken("my-token")
}
```

The intention of this is to make initializing new clients easier. It
also has an additional benefit of not forcing users to have to import
the `golang.org/x/oauth2` dependency just to initialize new `godo`
instances.

* Remove our own tokenSource type

It turns out you can use an `oauth2.Config` as a token source, so this
removes our own tokenSource type in favour of that one.

Co-authored-by: Zach Gershman <zachgersh@users.noreply.github.com>
2020-02-28 07:58:11 -08:00
Ben Tranter 821c71dce3
Merge pull request #306 from kamaln7/registry/export-server
Export the DO registry hostname as a const
2020-02-27 10:20:15 -05:00
Kamal Nasser a043fa7499 export the DO registry hostname as a const 2020-02-27 15:49:52 +02:00
Verónica López db948ca548
Merge pull request #301 from rbutler/list-invoices
Add invoices: Get, List, and GetSummary methods
2020-02-18 14:25:56 -05:00
Ryan Butler c9580eac29 add invoices to unreleased changelog 2020-02-14 11:05:08 -06:00
Ryan Butler c120b33dab
Merge branch 'master' into list-invoices 2020-02-13 13:18:19 -06:00
Hilary (hilz) Holz 6582617070
Merge pull request #302 from zbarahal-do/revert-298-modify_mysql_user_auth
Revert "Add reset database user auth method"
2020-02-12 13:02:57 -08:00
zbarahal-do 5cce04113f
Revert "Add reset database user auth method" 2020-02-11 17:36:15 -08:00
Ryan Butler 86ea9fd282 Add invoices - including Get, List, and GetSummary methods 2020-02-11 14:51:29 -06:00
Hilary (hilz) Holz f16bb6067e
Merge pull request #299 from velp/master
Fix param expiry_seconds for kubernetes.GetCredentials request
2020-02-11 11:48:13 -08:00
Vadim Ponomarev cf9588a39d
Merge branch 'master' into master 2020-02-11 14:15:02 +03:00
Vadim Ponomarev 2940d1e406
Fix tests to use testify 2020-02-11 14:14:40 +03:00
Ben Tranter f9210adc86
Merge pull request #298 from zbarahal-do/modify_mysql_user_auth
Add reset database user auth method
2020-02-10 17:19:37 -05:00
zbarahal-do b9d04de0d1
Merge branch 'master' into modify_mysql_user_auth 2020-02-10 14:03:55 -08:00
Zach Barahal 95198efc07 Fixup whitespace 2020-02-10 13:24:36 -08:00
Vadim Ponomarev 12c5a5c9d7
Fix param expiry_seconds for kubernetes.GetCredentials request 2020-02-07 22:02:26 +03:00
Zach Barahal 7dafeb6206 Add the pending change 2020-02-06 20:01:11 -08:00
Zach Barahal 673d3397b7 Add reset user auth routes to db service 2020-02-04 17:23:29 -08:00
Hilary (hilz) Holz 62d1a5e41e
Merge pull request #297 from hilary/master
v1.30.0
2020-02-03 18:58:23 -08:00
Hilary Holz 723a9729c9 v1.30.0 2020-02-03 18:49:57 -08:00
Zach Gershman fce6cf4fb4
Merge pull request #293 from digitalocean/doks-node-pool-labels
doks: node pool labels
2020-01-27 08:00:58 -08:00