You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// GarbageCollection creates the garbage-collection subcommand
174
+
funcGarbageCollection() *Command {
175
+
cmd:=&Command{
176
+
Command: &cobra.Command{
177
+
Use: "garbage-collection",
178
+
Aliases: []string{"gc", "g"},
179
+
Short: "Display commands for garbage collection for a container registry",
180
+
Long: "The subcommands of `doctl registry garbage-collection` start a garbage collection, retrieve or cancel a currently-active garbage collection or list past garbage collections for a specified registry.",
181
+
},
182
+
}
183
+
184
+
runStartGarbageCollectionDesc:="This command starts a garbage collection on a container registry. There can be only one active garbage collection at a time for a given registry."
185
+
CmdBuilder(
186
+
cmd,
187
+
RunStartGarbageCollection,
188
+
"start",
189
+
"Start garbage collection for a container registry",
190
+
runStartGarbageCollectionDesc,
191
+
Writer,
192
+
aliasOpt("s"),
193
+
displayerType(&displayers.GarbageCollection{}),
194
+
)
195
+
196
+
gcInfoIncluded:=`
197
+
- UUID
198
+
- Status
199
+
- Registry Name
200
+
- Created At
201
+
- Updated At
202
+
- Blobs Deleted
203
+
- Freed Bytes
204
+
`
205
+
206
+
runGetGarbageCollectionDesc:="This command retrieves the currently-active garbage collection for a container registry, if any active garbage collection exists. Information included about the registry includes:"+gcInfoIncluded
207
+
CmdBuilder(
208
+
cmd,
209
+
RunGetGarbageCollection,
210
+
"get-active",
211
+
"Retrieve information about the currently-active garbage collection for a container registry",
212
+
runGetGarbageCollectionDesc,
213
+
Writer,
214
+
aliasOpt("ga", "g"),
215
+
displayerType(&displayers.GarbageCollection{}),
216
+
)
217
+
218
+
runListGarbageCollectionsDesc:="This command retrieves a list of past garbage collections for a registry. Information about each garbage collection includes:"+gcInfoIncluded
219
+
CmdBuilder(
220
+
cmd,
221
+
RunListGarbageCollections,
222
+
"list",
223
+
"Retrieve information about past garbage collections for a container registry",
224
+
runListGarbageCollectionsDesc,
225
+
Writer,
226
+
aliasOpt("ls", "l"),
227
+
displayerType(&displayers.GarbageCollection{}),
228
+
)
229
+
230
+
runCancelGarbageCollectionDesc:="This command cancels the currently-active garbage collection for a container registry."
231
+
CmdBuilder(
232
+
cmd,
233
+
RunCancelGarbageCollection,
234
+
"cancel",
235
+
"Cancel the currently-active garbage collection for a container registry",
0 commit comments