@@ -96,29 +96,29 @@ type AppLinks struct {
9696}
9797
9898type App struct {
99- ID string `json:"id"`
100- Name string `json:"name"`
101- Region string `json:"region"`
102- Owner Owner `json:"owner"`
103- GitURL string `json:"git_url"`
104- URL string `json:"url"`
105- BaseURL string `json:"base_url"`
106- Status AppStatus `json:"status"`
107- LastDeployedAt * time.Time `json:"last_deployed_at"`
108- LastDeployedBy string `json:"last_deployed_by"`
109- CreatedAt * time.Time `json:"created_at"`
110- UpdatedAt * time.Time `json:"updated_at"`
111- Links * AppLinks `json:"links"`
112- StackID string `json:"stack_id"`
113- StickySession bool `json:"sticky_session"`
114- ForceHTTPS bool `json:"force_https"`
115- RouterLogs bool `json:"router_logs"`
116- DataAccessConsent * DataAccessConsent `json:"data_access_consent,omitempty"`
117- Flags map [string ]bool `json:"flags"`
118- Limits map [string ]interface {} `json:"limits"`
119- HDSResource bool `json:"hds_resource"`
120- PrivateNetworksIDs []string `json:"private_networks_ids"`
121- Project appProject `json:"project,omitempty "`
99+ ID string `json:"id"`
100+ Name string `json:"name"`
101+ Region string `json:"region"`
102+ Owner Owner `json:"owner"`
103+ GitURL string `json:"git_url"`
104+ URL string `json:"url"`
105+ BaseURL string `json:"base_url"`
106+ Status AppStatus `json:"status"`
107+ LastDeployedAt * time.Time `json:"last_deployed_at"`
108+ LastDeployedBy string `json:"last_deployed_by"`
109+ CreatedAt * time.Time `json:"created_at"`
110+ UpdatedAt * time.Time `json:"updated_at"`
111+ Links * AppLinks `json:"links"`
112+ StackID string `json:"stack_id"`
113+ StickySession bool `json:"sticky_session"`
114+ ForceHTTPS bool `json:"force_https"`
115+ RouterLogs bool `json:"router_logs"`
116+ DataAccessConsent * DataAccessConsent `json:"data_access_consent,omitempty"`
117+ Flags map [string ]bool `json:"flags"`
118+ Limits map [string ]any `json:"limits"`
119+ HDSResource bool `json:"hds_resource"`
120+ PrivateNetworksIDs []string `json:"private_networks_ids"`
121+ Project appProject `json:"project"`
122122}
123123
124124// appProject is a partial copy of the type `Project` in `projects.go`
@@ -169,7 +169,7 @@ func (c *Client) AppsDestroy(ctx context.Context, name string, currentName strin
169169 Method : "DELETE" ,
170170 Endpoint : "/apps/" + name ,
171171 Expected : httpclient.Statuses {204 },
172- Params : map [string ]interface {} {
172+ Params : map [string ]any {
173173 "current_name" : currentName ,
174174 },
175175 }
@@ -187,7 +187,7 @@ func (c *Client) AppsRename(ctx context.Context, name string, newName string) (*
187187 Method : "POST" ,
188188 Endpoint : "/apps/" + name + "/rename" ,
189189 Expected : httpclient.Statuses {200 },
190- Params : map [string ]interface {} {
190+ Params : map [string ]any {
191191 "current_name" : name ,
192192 "new_name" : newName ,
193193 },
@@ -206,7 +206,7 @@ func (c *Client) AppsTransfer(ctx context.Context, name string, email string) (*
206206 Method : "PATCH" ,
207207 Endpoint : "/apps/" + name ,
208208 Expected : httpclient.Statuses {200 },
209- Params : map [string ]interface {} {
209+ Params : map [string ]any {
210210 "app" : map [string ]string {
211211 "owner" : email ,
212212 },
@@ -225,7 +225,7 @@ func (c *Client) AppsSetStack(ctx context.Context, app string, stackID string) (
225225 Method : "PATCH" ,
226226 Endpoint : "/apps/" + app ,
227227 Expected : httpclient.Statuses {200 },
228- Params : map [string ]interface {} {
228+ Params : map [string ]any {
229229 "app" : map [string ]string {
230230 "stack_id" : stackID ,
231231 },
@@ -258,7 +258,7 @@ func (c *Client) AppsCreate(ctx context.Context, opts AppsCreateOpts) (*App, err
258258 Method : "POST" ,
259259 Endpoint : "/apps" ,
260260 Expected : httpclient.Statuses {201 },
261- Params : map [string ]interface {} {"app" : opts },
261+ Params : map [string ]any {"app" : opts },
262262 }
263263 err := c .ScalingoAPI ().DoRequest (ctx , req , & appRes )
264264 if err != nil {
@@ -318,30 +318,30 @@ func (c *Client) AppsScale(ctx context.Context, app string, params *AppsScalePar
318318}
319319
320320func (c * Client ) AppsForceHTTPS (ctx context.Context , name string , enable bool ) (* App , error ) {
321- return c .appsUpdate (ctx , name , map [string ]interface {} {
321+ return c .appsUpdate (ctx , name , map [string ]any {
322322 "force_https" : enable ,
323323 })
324324}
325325
326326func (c * Client ) AppsRouterLogs (ctx context.Context , name string , enable bool ) (* App , error ) {
327- return c .appsUpdate (ctx , name , map [string ]interface {} {
327+ return c .appsUpdate (ctx , name , map [string ]any {
328328 "router_logs" : enable ,
329329 })
330330}
331331
332332func (c * Client ) AppsStickySession (ctx context.Context , name string , enable bool ) (* App , error ) {
333- return c .appsUpdate (ctx , name , map [string ]interface {} {
333+ return c .appsUpdate (ctx , name , map [string ]any {
334334 "sticky_session" : enable ,
335335 })
336336}
337337
338338func (c * Client ) AppsSetProject (ctx context.Context , name string , projectID string ) (* App , error ) {
339- return c .appsUpdate (ctx , name , map [string ]interface {} {
339+ return c .appsUpdate (ctx , name , map [string ]any {
340340 "project_id" : projectID ,
341341 })
342342}
343343
344- func (c * Client ) appsUpdate (ctx context.Context , name string , params map [string ]interface {} ) (* App , error ) {
344+ func (c * Client ) appsUpdate (ctx context.Context , name string , params map [string ]any ) (* App , error ) {
345345 var appRes * AppResponse
346346 req := & httpclient.APIRequest {
347347 Method : "PUT" ,
0 commit comments