@@ -15,14 +15,13 @@ import (
1515 "context"
1616 "encoding/json"
1717 "fmt"
18+ "github.com/google/go-querystring/query"
1819 "io"
1920 "net/http"
2021 "reflect"
2122 "runtime"
2223 "strings"
2324 "time"
24-
25- "github.com/google/go-querystring/query"
2625)
2726
2827var _ = time .Second
@@ -271,7 +270,10 @@ func (s *Service) AccountUpdate(ctx context.Context, o AccountUpdateOpts) (*Acco
271270 return & account , s .Patch (ctx , & account , fmt .Sprintf ("/account" ), o )
272271}
273272
274- // Delete account. Note that this action cannot be undone.
273+ // Delete account. Note that this action cannot be undone. Note: This
274+ // endpoint requires the HTTP_HEROKU_PASSWORD or
275+ // HTTP_HEROKU_PASSWORD_BASE64 header be set correctly for the user
276+ // account.
275277func (s * Service ) AccountDelete (ctx context.Context ) (* Account , error ) {
276278 var account Account
277279 return & account , s .Delete (ctx , & account , fmt .Sprintf ("/account" ))
@@ -295,7 +297,10 @@ func (s *Service) AccountUpdateByUser(ctx context.Context, accountIdentity strin
295297 return & account , s .Patch (ctx , & account , fmt .Sprintf ("/users/%v" , accountIdentity ), o )
296298}
297299
298- // Delete account. Note that this action cannot be undone.
300+ // Delete account. Note that this action cannot be undone. Note: This
301+ // endpoint requires the HTTP_HEROKU_PASSWORD or
302+ // HTTP_HEROKU_PASSWORD_BASE64 header be set correctly for the user
303+ // account.
299304func (s * Service ) AccountDeleteByUser (ctx context.Context , accountIdentity string ) (* Account , error ) {
300305 var account Account
301306 return & account , s .Delete (ctx , & account , fmt .Sprintf ("/users/%v" , accountIdentity ))
@@ -1133,9 +1138,10 @@ type App struct {
11331138 WebURL string `json:"web_url" url:"web_url,key"` // web URL of app
11341139}
11351140type AppCreateOpts struct {
1136- Name * string `json:"name,omitempty" url:"name,omitempty,key"` // unique name of app
1137- Region * string `json:"region,omitempty" url:"region,omitempty,key"` // unique identifier of region
1138- Stack * string `json:"stack,omitempty" url:"stack,omitempty,key"` // unique name of stack
1141+ FeatureFlags []* string `json:"feature_flags,omitempty" url:"feature_flags,omitempty,key"` // unique name of app feature
1142+ Name * string `json:"name,omitempty" url:"name,omitempty,key"` // unique name of app
1143+ Region * string `json:"region,omitempty" url:"region,omitempty,key"` // unique identifier of region
1144+ Stack * string `json:"stack,omitempty" url:"stack,omitempty,key"` // unique name of stack
11391145}
11401146
11411147// Create a new app.
@@ -2132,8 +2138,7 @@ type EnterpriseAccountDailyUsageInfoResult []EnterpriseAccountDailyUsage
21322138
21332139// Retrieves usage for an enterprise account for a range of days. Start
21342140// and end dates can be specified as query parameters using the date
2135- // format YYYY-MM-DD.
2136- // The enterprise account identifier can be found
2141+ // format YYYY-MM-DD. The enterprise account identifier can be found
21372142// from the [enterprise account
21382143// list](https://devcenter.heroku.com/articles/platform-api-reference#ent
21392144// erprise-account-list).
@@ -2246,8 +2251,7 @@ type EnterpriseAccountMonthlyUsageInfoResult []EnterpriseAccountMonthlyUsage
22462251// Retrieves usage for an enterprise account for a range of months.
22472252// Start and end dates can be specified as query parameters using the
22482253// date format YYYY-MM. If no end date is specified, one month of usage
2249- // is returned.
2250- // The enterprise account identifier can be found from the
2254+ // is returned. The enterprise account identifier can be found from the
22512255// [enterprise account
22522256// list](https://devcenter.heroku.com/articles/platform-api-reference#ent
22532257// erprise-account-list).
@@ -4094,82 +4098,6 @@ func (s *Service) SpaceTransferTransfer(ctx context.Context, spaceIdentity strin
40944098 return & spaceTransfer , s .Post (ctx , & spaceTransfer , fmt .Sprintf ("/spaces/%v/transfer" , spaceIdentity ), o )
40954099}
40964100
4097- // [SSL Endpoint](https://devcenter.heroku.com/articles/ssl-endpoint) is
4098- // a public address serving custom SSL cert for HTTPS traffic to a
4099- // Heroku app. Note that an app must have the `ssl:endpoint` add-on
4100- // installed before it can provision an SSL Endpoint using these APIs.
4101- type SSLEndpoint struct {
4102- App struct {
4103- ID string `json:"id" url:"id,key"` // unique identifier of app
4104- Name string `json:"name" url:"name,key"` // unique name of app
4105- } `json:"app" url:"app,key"` // application associated with this ssl-endpoint
4106- CertificateChain string `json:"certificate_chain" url:"certificate_chain,key"` // raw contents of the public certificate chain (eg: .crt or .pem file)
4107- CName string `json:"cname" url:"cname,key"` // canonical name record, the address to point a domain at
4108- CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when endpoint was created
4109- DisplayName * string `json:"display_name" url:"display_name,key"` // unique name for SSL endpoint
4110- Domains []string `json:"domains" url:"domains,key"` // domains associated with this endpoint
4111- ID string `json:"id" url:"id,key"` // unique identifier of this SSL endpoint
4112- Name string `json:"name" url:"name,key"` // unique name for SSL endpoint
4113- SSLCert struct {
4114- IsCaSigned bool `json:"ca_signed?" url:"ca_signed?,key"`
4115- CertDomains []interface {} `json:"cert_domains" url:"cert_domains,key"`
4116- ExpiresAt time.Time `json:"expires_at" url:"expires_at,key"`
4117- ID string `json:"id" url:"id,key"` // unique identifier of this SSL certificate
4118- Issuer string `json:"issuer" url:"issuer,key"`
4119- IsSelfSigned bool `json:"self_signed?" url:"self_signed?,key"`
4120- StartsAt time.Time `json:"starts_at" url:"starts_at,key"`
4121- Subject string `json:"subject" url:"subject,key"`
4122- } `json:"ssl_cert" url:"ssl_cert,key"` // certificate provided by this endpoint
4123- UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when endpoint was updated
4124- }
4125- type SSLEndpointCreateOpts struct {
4126- CertificateChain string `json:"certificate_chain" url:"certificate_chain,key"` // raw contents of the public certificate chain (eg: .crt or .pem file)
4127- Preprocess * bool `json:"preprocess,omitempty" url:"preprocess,omitempty,key"` // allow Heroku to modify an uploaded public certificate chain if deemed
4128- // advantageous by adding missing intermediaries, stripping unnecessary
4129- // ones, etc.
4130- PrivateKey string `json:"private_key" url:"private_key,key"` // contents of the private key (eg .key file)
4131- }
4132-
4133- // Create a new SSL endpoint.
4134- func (s * Service ) SSLEndpointCreate (ctx context.Context , appIdentity string , o SSLEndpointCreateOpts ) (* SSLEndpoint , error ) {
4135- var sslEndpoint SSLEndpoint
4136- return & sslEndpoint , s .Post (ctx , & sslEndpoint , fmt .Sprintf ("/apps/%v/ssl-endpoints" , appIdentity ), o )
4137- }
4138-
4139- // Delete existing SSL endpoint.
4140- func (s * Service ) SSLEndpointDelete (ctx context.Context , appIdentity string , sslEndpointIdentity string ) (* SSLEndpoint , error ) {
4141- var sslEndpoint SSLEndpoint
4142- return & sslEndpoint , s .Delete (ctx , & sslEndpoint , fmt .Sprintf ("/apps/%v/ssl-endpoints/%v" , appIdentity , sslEndpointIdentity ))
4143- }
4144-
4145- // Info for existing SSL endpoint.
4146- func (s * Service ) SSLEndpointInfo (ctx context.Context , appIdentity string , sslEndpointIdentity string ) (* SSLEndpoint , error ) {
4147- var sslEndpoint SSLEndpoint
4148- return & sslEndpoint , s .Get (ctx , & sslEndpoint , fmt .Sprintf ("/apps/%v/ssl-endpoints/%v" , appIdentity , sslEndpointIdentity ), nil , nil )
4149- }
4150-
4151- type SSLEndpointListResult []SSLEndpoint
4152-
4153- // List existing SSL endpoints.
4154- func (s * Service ) SSLEndpointList (ctx context.Context , appIdentity string , lr * ListRange ) (SSLEndpointListResult , error ) {
4155- var sslEndpoint SSLEndpointListResult
4156- return sslEndpoint , s .Get (ctx , & sslEndpoint , fmt .Sprintf ("/apps/%v/ssl-endpoints" , appIdentity ), nil , lr )
4157- }
4158-
4159- type SSLEndpointUpdateOpts struct {
4160- CertificateChain * string `json:"certificate_chain,omitempty" url:"certificate_chain,omitempty,key"` // raw contents of the public certificate chain (eg: .crt or .pem file)
4161- Preprocess * bool `json:"preprocess,omitempty" url:"preprocess,omitempty,key"` // allow Heroku to modify an uploaded public certificate chain if deemed
4162- // advantageous by adding missing intermediaries, stripping unnecessary
4163- // ones, etc.
4164- PrivateKey * string `json:"private_key,omitempty" url:"private_key,omitempty,key"` // contents of the private key (eg .key file)
4165- }
4166-
4167- // Update an existing SSL endpoint.
4168- func (s * Service ) SSLEndpointUpdate (ctx context.Context , appIdentity string , sslEndpointIdentity string , o SSLEndpointUpdateOpts ) (* SSLEndpoint , error ) {
4169- var sslEndpoint SSLEndpoint
4170- return & sslEndpoint , s .Patch (ctx , & sslEndpoint , fmt .Sprintf ("/apps/%v/ssl-endpoints/%v" , appIdentity , sslEndpointIdentity ), o )
4171- }
4172-
41734101// Stacks are the different application execution environments available
41744102// in the Heroku platform.
41754103type Stack struct {
@@ -4550,8 +4478,7 @@ type TeamDailyUsageInfoResult []TeamDailyUsage
45504478
45514479// Retrieves usage for an enterprise team for a range of days. Start and
45524480// end dates can be specified as query parameters using the date format
4553- // YYYY-MM-DD.
4554- // The team identifier can be found from the [team list
4481+ // YYYY-MM-DD. The team identifier can be found from the [team list
45554482// endpoint](https://devcenter.heroku.com/articles/platform-api-reference
45564483// #team-list).
45574484//
0 commit comments