-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
151 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
package dockerhub | ||
|
||
import "time" | ||
|
||
type Image struct { | ||
Repository string `json:"repository"` | ||
LastPushed time.Time `json:"last_pushed"` | ||
LastPulled time.Time `json:"last_pulled"` | ||
Digest string `json:"digest"` | ||
Tags []*Tags `json:"tags"` | ||
} | ||
|
||
type ImageList struct { | ||
Count int `json:"count"` | ||
Next string `json:"next"` | ||
Results []Image `json:"results"` | ||
} | ||
|
||
type DeleteImagesRequest struct { | ||
DryRun bool `json:"dry_run"` | ||
ActiveFrom time.Time `json:"active_from,omitempty"` | ||
Manifests []*Manifest `json:"manifests"` | ||
IgnoreWarnings []*IgnoreWarnings `json:"ignore_warnings"` | ||
} | ||
|
||
type Manifest struct { | ||
Repository string `json:"repository"` | ||
Digest string `json:"digest"` | ||
} | ||
type IgnoreWarnings struct { | ||
Repository string `json:"repository"` | ||
Digest string `json:"digest"` | ||
Warning string `json:"warning"` | ||
Tags []string `json:"tags"` | ||
} | ||
|
||
type Tags struct { | ||
Tag string `json:"tag"` | ||
IsCurrent bool `json:"is_current"` | ||
} | ||
|
||
type DeletedImagesResponse struct { | ||
Metrics *Metrics `json:"metrics"` | ||
} | ||
|
||
type Metrics struct { | ||
ManifestDeletes int `json:"manifest_deletes"` | ||
ManifestErrors int `json:"manifest_errors"` | ||
TagDeletes int `json:"tag_deletes"` | ||
TagErrors int `json:"tag_errors"` | ||
} | ||
|
||
type Token struct { | ||
Token string `json:"token"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,5 @@ | ||
module dhlm | ||
|
||
go 1.12 | ||
go 1.16 | ||
|
||
require ( | ||
github.com/urfave/cli v1.20.0 | ||
gopkg.in/urfave/cli.v1 v1.20.0 // indirect | ||
) | ||
require github.com/urfave/cli v1.20.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,2 @@ | ||
github.com/urfave/cli v1.20.0 h1:fDqGv3UG/4jbVl/QkFwEdddtEDjh/5Ov6X+0B/3bPaw= | ||
github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= | ||
gopkg.in/urfave/cli.v1 v1.20.0 h1:NdAVW6RYxDif9DhDHaAortIu956m2c0v+09AZBPTbE0= | ||
gopkg.in/urfave/cli.v1 v1.20.0/go.mod h1:vuBzUtMdQeixQj8LVd+/98pzhxNGQoyuPBlsXHOQNO0= |