-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: blob inspect
command
#1133
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Junjie Gao <[email protected]>
blob inspect
command prototypeblob inspect
command prototype
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1133 +/- ##
==========================================
+ Coverage 72.38% 73.97% +1.58%
==========================================
Files 50 53 +3
Lines 3125 3181 +56
==========================================
+ Hits 2262 2353 +91
+ Misses 670 639 -31
+ Partials 193 189 -4 ☔ View full report in Codecov by Sentry. |
Signed-off-by: Junjie Gao <[email protected]>
Signed-off-by: Junjie Gao <[email protected]>
Signed-off-by: Junjie Gao <[email protected]>
Signed-off-by: Junjie Gao <[email protected]>
Signed-off-by: Junjie Gao <[email protected]>
Signed-off-by: Junjie Gao <[email protected]>
Signed-off-by: Junjie Gao <[email protected]>
Signed-off-by: Junjie Gao <[email protected]>
Signed-off-by: Junjie Gao <[email protected]>
Signed-off-by: Junjie Gao <[email protected]>
Signed-off-by: Junjie Gao <[email protected]>
Signed-off-by: Junjie Gao <[email protected]>
Signed-off-by: Junjie Gao <[email protected]>
Signed-off-by: Junjie Gao <[email protected]>
blob inspect
command prototypeblob inspect
command
Signed-off-by: Junjie Gao <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR should be reviewed and merged after PR: #1128
Signed-off-by: Junjie Gao <[email protected]>
Signed-off-by: Junjie Gao <[email protected]>
Signed-off-by: Junjie Gao <[email protected]>
Unblocked now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's discuss offline for the design first.
I'd like to refactor notation
and adopt the same rendering model as oras
.
func (parent *Node) AddPair(key string, value string) *Node { | ||
return parent.Add(key + ": " + value) | ||
func (parent *Node) AddPair(key string, value any) *Node { | ||
return parent.Add(fmt.Sprintf("%s: %s", key, value)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return parent.Add(fmt.Sprintf("%s: %s", key, value)) | |
return parent.Add(fmt.Sprintf("%s: %v", key, value)) |
@@ -53,7 +53,7 @@ func (root *Node) Print() { | |||
} | |||
|
|||
func print(prefix string, itemMarker string, nextPrefix string, n *Node) { | |||
fmt.Println(prefix + itemMarker + n.Value) | |||
fmt.Printf("%s%s%s\n", prefix, itemMarker, n.Value) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fmt.Printf("%s%s%s\n", prefix, itemMarker, n.Value) | |
fmt.Printf("%s%s%v\n", prefix, itemMarker, n.Value) |
Long: `Inspect a signature associated with a blob. | ||
|
||
Example - Inspect a signature: | ||
notation inspect blob.cose.sig |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
notation inspect blob.cose.sig | |
notation blob inspect blob.cose.sig |
Feat:
notation blob inspect
commandRefactor:
Signature
struct to share between OCI inspect and blob inspect commandsioutil.Time
andioutil.Timestamp
wrapper types for formatting time when print text and marshal JSONTest:
Output example: