Skip to content

Commit

Permalink
Merge pull request #208 from Scalingo/fix/OPSB-257/app_containers
Browse files Browse the repository at this point in the history
fix: restore previous AppsPs and rename AppsPs to AppsContainersPs
  • Loading branch information
Soulou authored Mar 30, 2021
2 parents d79ac0f + 89e905f commit 9740a8d
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 10 deletions.
6 changes: 3 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

* feat(domain): add SSL status [#207](https://github.com/Scalingo/go-scalingo/pull/207)
* feat: add user agent to auth and DB API requests [#206](https://github.com/Scalingo/go-scalingo/pull/206)
* feat(event): add suport for notifier events [#205](https://github.com/Scalingo/go-scalingo/pull/205)
* feat(event): add support for notifier events [#205](https://github.com/Scalingo/go-scalingo/pull/205)
* Add `ContainersStop` to stop a running one-off container [#204](https://github.com/Scalingo/go-scalingo/pull/204)
* Rename `AppsPs` to `AppsContainerTypes` [#204](https://github.com/Scalingo/go-scalingo/pull/204)
* Add `AppsPs` to list all application's containers [#204](https://github.com/Scalingo/go-scalingo/pull/204)
* Add `AppsContainersPs` to list all application's containers [#204](https://github.com/Scalingo/go-scalingo/pull/204) and [#208](https://github.com/Scalingo/go-scalingo/pull/208)
* Add `AppsContainerTypes` and deprecate `AppsPs` [#204](https://github.com/Scalingo/go-scalingo/pull/204) and [#208](https://github.com/Scalingo/go-scalingo/pull/208)

## 4.12.0

Expand Down
11 changes: 9 additions & 2 deletions apps.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ type AppsService interface {
AppsCreate(opts AppsCreateOpts) (*App, error)
AppsStats(app string) (*AppStatsRes, error)
AppsContainerTypes(app string) ([]ContainerType, error)
AppsPs(app string) ([]Container, error)
// Deprecated: Use AppsContainerTypes instead
AppsPs(app string) ([]ContainerType, error)
AppsContainersPs(app string) ([]Container, error)
AppsScale(app string, params *AppsScaleParams) (*http.Response, error)
AppsForceHTTPS(name string, enable bool) (*App, error)
AppsStickySession(name string, enable bool) (*App, error)
Expand Down Expand Up @@ -262,7 +264,12 @@ func (c *Client) AppsStats(app string) (*AppStatsRes, error) {
return &stats, nil
}

func (c *Client) AppsPs(app string) ([]Container, error) {
// Deprecated: Use AppsContainerTypes instead
func (c *Client) AppsPs(app string) ([]ContainerType, error) {
return c.AppsContainerTypes(app)
}

func (c *Client) AppsContainersPs(app string) ([]Container, error) {
var containersRes AppsPsRes
req := &httpclient.APIRequest{
Endpoint: "/apps/" + app + "/ps",
Expand Down
2 changes: 1 addition & 1 deletion mocks_sig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"github.com/Scalingo/go-scalingo.AddonProvidersService": "84 c0 e6 0e c4 9d 80 57 79 b4 47 c0 79 c8 2e 51 b9 f9 64 c9",
"github.com/Scalingo/go-scalingo.AddonsService": "eb 27 12 ee 56 da 52 12 39 e8 63 86 c0 dd 96 68 48 91 36 10",
"github.com/Scalingo/go-scalingo.AlertsService": "8f 72 2e 6a 5f 31 c7 26 7c 09 10 93 38 d2 eb 6e 5a 26 ed 62",
"github.com/Scalingo/go-scalingo.AppsService": "0d 01 ff b6 39 03 fe 5b 5c 0c 62 64 b3 9e 75 5e e9 5e 0e 7f",
"github.com/Scalingo/go-scalingo.AppsService": "f1 01 20 34 ac 43 fd 95 8a d2 cc 39 54 09 59 05 de 2b 66 b3",
"github.com/Scalingo/go-scalingo.AutoscalersService": "fe 33 e3 88 66 3e 25 c1 40 79 fc 01 6c aa 19 5e ce f6 f1 e7",
"github.com/Scalingo/go-scalingo.BackupsService": "fd c3 88 a9 d7 18 80 fa 25 a8 fc ca 9c a1 40 2e 2d 26 ea 36",
"github.com/Scalingo/go-scalingo.CollaboratorsService": "f7 7e 83 62 5b 67 9c 6c aa 79 f5 94 c7 90 d8 3f f8 42 95 81",
Expand Down
19 changes: 17 additions & 2 deletions scalingomock/api_mock.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 17 additions & 2 deletions scalingomock/appsservice_mock.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 9740a8d

Please sign in to comment.