@@ -21,32 +21,32 @@ type Applications interface {
21
21
22
22
PostApplications (reader io.Reader , options ... RequestOpt ) (* squarecloud.ApplicationUploaded , error )
23
23
24
- GetApplication (appId string , options ... RequestOpt ) (squarecloud.Application , error )
25
- GetApplicationStatus (appId string , options ... RequestOpt ) (squarecloud.ApplicationStatus , error )
24
+ GetApplication (appID string , options ... RequestOpt ) (squarecloud.Application , error )
25
+ GetApplicationStatus (appID string , options ... RequestOpt ) (squarecloud.ApplicationStatus , error )
26
26
27
- GetApplicationLogs (appId string , options ... RequestOpt ) (squarecloud.ApplicationLogs , error )
28
- PostApplicationSignal (appId string , signal squarecloud.ApplicationSignal , options ... RequestOpt ) error
29
- PostApplicationCommit (appId string , reader io.Reader , options ... RequestOpt ) error
27
+ GetApplicationLogs (appID string , options ... RequestOpt ) (squarecloud.ApplicationLogs , error )
28
+ PostApplicationSignal (appID string , signal squarecloud.ApplicationSignal , options ... RequestOpt ) error
29
+ PostApplicationCommit (appID string , reader io.Reader , options ... RequestOpt ) error
30
30
31
- GetApplicationBackups (appId string , options ... RequestOpt ) ([]squarecloud.ApplicationBackup , error )
32
- CreateApplicationBackup (appId string , options ... RequestOpt ) (squarecloud.ApplicationBackupCreated , error )
31
+ GetApplicationBackups (appID string , options ... RequestOpt ) ([]squarecloud.ApplicationBackup , error )
32
+ CreateApplicationBackup (appID string , options ... RequestOpt ) (squarecloud.ApplicationBackupCreated , error )
33
33
34
- // GetApplicationFileContent(appId string, path string, options ...RequestOption) error
35
- // GetApplicationFiles(appId string, path string, options ...RequestOption) error
36
- // CreateApplicationFile(appId string, path string, options ...RequestOption) error
37
- // PatchApplicationFile(appId string, path string, to string, options ...RequestOption) error
38
- // DeleteApplicationFile(appId string, path string, options ...RequestOption) error
34
+ // GetApplicationFileContent(appID string, path string, options ...RequestOption) error
35
+ // GetApplicationFiles(appID string, path string, options ...RequestOption) error
36
+ // CreateApplicationFile(appID string, path string, options ...RequestOption) error
37
+ // PatchApplicationFile(appID string, path string, to string, options ...RequestOption) error
38
+ // DeleteApplicationFile(appID string, path string, options ...RequestOption) error
39
39
40
- // GetApplicationDeployments(appId string, options ...RequestOption) error
41
- // GetApplicationCurrentDeployments(appId string, options ...RequestOption) error
42
- // PostApplicationDeployWebhook(appId string, options ...RequestOption) error
40
+ // GetApplicationDeployments(appID string, options ...RequestOption) error
41
+ // GetApplicationCurrentDeployments(appID string, options ...RequestOption) error
42
+ // PostApplicationDeployWebhook(appID string, options ...RequestOption) error
43
43
44
- // GetApplicationDNSRecords(appId string, options ...RequestOption) error
45
- // GetApplicationAnalytics(appId string, options ...RequestOption) error
46
- // PostApplicationCustomDomain(appId string, options ...RequestOption) error
47
- // PostApplicationPurgeCache(appId string, options ...RequestOption) error
44
+ // GetApplicationDNSRecords(appID string, options ...RequestOption) error
45
+ // GetApplicationAnalytics(appID string, options ...RequestOption) error
46
+ // PostApplicationCustomDomain(appID string, options ...RequestOption) error
47
+ // PostApplicationPurgeCache(appID string, options ...RequestOption) error
48
48
49
- DeleteApplication (appId string , options ... RequestOpt ) error
49
+ DeleteApplication (appID string , options ... RequestOpt ) error
50
50
}
51
51
52
52
type applicationsImpl struct {
@@ -95,14 +95,14 @@ func (s *applicationsImpl) PostApplications(reader io.Reader, opts ...RequestOpt
95
95
return & r .Response , err
96
96
}
97
97
98
- func (s * applicationsImpl ) GetApplication (appId string , opts ... RequestOpt ) (squarecloud.Application , error ) {
98
+ func (s * applicationsImpl ) GetApplication (appID string , opts ... RequestOpt ) (squarecloud.Application , error ) {
99
99
var r squarecloud.APIResponse [squarecloud.Application ]
100
- err := s .client .Request (http .MethodGet , EndpointApplicationInformation (appId ), nil , & r , opts ... )
100
+ err := s .client .Request (http .MethodGet , EndpointApplicationInformation (appID ), nil , & r , opts ... )
101
101
102
102
return r .Response , err
103
103
}
104
104
105
- func (c * applicationsImpl ) PostApplicationCommit (appId string , reader io.Reader , options ... RequestOpt ) error {
105
+ func (c * applicationsImpl ) PostApplicationCommit (appID string , reader io.Reader , options ... RequestOpt ) error {
106
106
bodyBuffer := & bytes.Buffer {}
107
107
writer := multipart .NewWriter (bodyBuffer )
108
108
@@ -122,54 +122,54 @@ func (c *applicationsImpl) PostApplicationCommit(appId string, reader io.Reader,
122
122
options = append (options , WithHeader ("Content-Type" , writer .FormDataContentType ()))
123
123
124
124
var r squarecloud.APIResponse [any ]
125
- return c .client .Request (http .MethodPost , EndpointApplicationCommit (appId ), bodyBuffer .Bytes (), & r , options ... )
125
+ return c .client .Request (http .MethodPost , EndpointApplicationCommit (appID ), bodyBuffer .Bytes (), & r , options ... )
126
126
}
127
127
128
- func (s * applicationsImpl ) GetApplicationStatus (appId string , opts ... RequestOpt ) (squarecloud.ApplicationStatus , error ) {
128
+ func (s * applicationsImpl ) GetApplicationStatus (appID string , opts ... RequestOpt ) (squarecloud.ApplicationStatus , error ) {
129
129
var r squarecloud.APIResponse [squarecloud.ApplicationStatus ]
130
- err := s .client .Request (http .MethodGet , EndpointApplicationStatus (appId ), nil , & r , opts ... )
130
+ err := s .client .Request (http .MethodGet , EndpointApplicationStatus (appID ), nil , & r , opts ... )
131
131
132
132
return r .Response , err
133
133
}
134
134
135
- func (s * applicationsImpl ) GetApplicationLogs (appId string , opts ... RequestOpt ) (squarecloud.ApplicationLogs , error ) {
135
+ func (s * applicationsImpl ) GetApplicationLogs (appID string , opts ... RequestOpt ) (squarecloud.ApplicationLogs , error ) {
136
136
var r squarecloud.APIResponse [squarecloud.ApplicationLogs ]
137
- err := s .client .Request (http .MethodGet , EndpointApplicationLogs (appId ), nil , & r , opts ... )
137
+ err := s .client .Request (http .MethodGet , EndpointApplicationLogs (appID ), nil , & r , opts ... )
138
138
139
139
return r .Response , err
140
140
}
141
141
142
- func (s * applicationsImpl ) PostApplicationSignal (appId string , signal squarecloud.ApplicationSignal , opts ... RequestOpt ) error {
142
+ func (s * applicationsImpl ) PostApplicationSignal (appID string , signal squarecloud.ApplicationSignal , opts ... RequestOpt ) error {
143
143
var r squarecloud.APIResponse [any ]
144
144
var endpoint string
145
145
146
146
switch signal {
147
147
case squarecloud .ApplicationSignalStart :
148
- endpoint = EndpointApplicationStart (appId )
148
+ endpoint = EndpointApplicationStart (appID )
149
149
case squarecloud .ApplicationSignalRestart :
150
- endpoint = EndpointApplicationRestart (appId )
150
+ endpoint = EndpointApplicationRestart (appID )
151
151
case squarecloud .ApplicationSignalStop :
152
- endpoint = EndpointApplicationStop (appId )
152
+ endpoint = EndpointApplicationStop (appID )
153
153
}
154
154
155
155
return s .client .Request (http .MethodPost , endpoint , nil , & r , opts ... )
156
156
}
157
157
158
- func (s * applicationsImpl ) GetApplicationBackups (appId string , opts ... RequestOpt ) ([]squarecloud.ApplicationBackup , error ) {
158
+ func (s * applicationsImpl ) GetApplicationBackups (appID string , opts ... RequestOpt ) ([]squarecloud.ApplicationBackup , error ) {
159
159
var r squarecloud.APIResponse [[]squarecloud.ApplicationBackup ]
160
- err := s .client .Request (http .MethodGet , EndpointApplicationSnapshots (appId ), nil , & r , opts ... )
160
+ err := s .client .Request (http .MethodGet , EndpointApplicationSnapshots (appID ), nil , & r , opts ... )
161
161
162
162
return r .Response , err
163
163
}
164
164
165
- func (s * applicationsImpl ) CreateApplicationBackup (appId string , opts ... RequestOpt ) (squarecloud.ApplicationBackupCreated , error ) {
165
+ func (s * applicationsImpl ) CreateApplicationBackup (appID string , opts ... RequestOpt ) (squarecloud.ApplicationBackupCreated , error ) {
166
166
var r squarecloud.APIResponse [squarecloud.ApplicationBackupCreated ]
167
- err := s .client .Request (http .MethodPost , EndpointApplicationSnapshots (appId ), nil , & r , opts ... )
167
+ err := s .client .Request (http .MethodPost , EndpointApplicationSnapshots (appID ), nil , & r , opts ... )
168
168
169
169
return r .Response , err
170
170
}
171
171
172
- func (s * applicationsImpl ) DeleteApplication (appId string , opts ... RequestOpt ) error {
172
+ func (s * applicationsImpl ) DeleteApplication (appID string , opts ... RequestOpt ) error {
173
173
var r squarecloud.APIResponse [any ]
174
- return s .client .Request (http .MethodDelete , EndpointApplicationInformation (appId ), nil , & r , opts ... )
174
+ return s .client .Request (http .MethodDelete , EndpointApplicationInformation (appID ), nil , & r , opts ... )
175
175
}
0 commit comments