Skip to content

Commit

Permalink
Show grant IDs in list grant output (#26)
Browse files Browse the repository at this point in the history
* Bump baton-sdk to v0.0.29

* Include grant IDs in list grant output
  • Loading branch information
jirwin committed May 12, 2023
1 parent f96714f commit 27a50f4
Show file tree
Hide file tree
Showing 12 changed files with 73 additions and 44 deletions.
1 change: 1 addition & 0 deletions cmd/baton/dump_db.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ func runDumpDB(cmd *cobra.Command, args []string) error {
if err != nil {
return err
}
defer f.Close()

dbFile, err := dotc1z.NewC1ZFileDecoder(f)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/conductorone/baton
go 1.19

require (
github.com/conductorone/baton-sdk v0.0.25
github.com/conductorone/baton-sdk v0.0.29
github.com/envoyproxy/protoc-gen-validate v0.9.1
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0
github.com/pterm/pterm v0.12.50
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLj
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
github.com/conductorone/baton-sdk v0.0.25 h1:7NbrCgosMkI2rqoojS1ycaYWMmY1+Qlv9j7yW3c7ozA=
github.com/conductorone/baton-sdk v0.0.25/go.mod h1:jIvJnXhCCpGo/D2FyB0i34ul+iu+B3RhZXXenjVCFwI=
github.com/conductorone/baton-sdk v0.0.29 h1:X8aMv+JyvU0epXoiwTWE3jvOE1/WGnSy1LATv9iqliI=
github.com/conductorone/baton-sdk v0.0.29/go.mod h1:jIvJnXhCCpGo/D2FyB0i34ul+iu+B3RhZXXenjVCFwI=
github.com/containerd/console v1.0.3 h1:lIr7SlA5PxZyMV30bDW0MGbiOPXwc63yRuCP0ARubLw=
github.com/containerd/console v1.0.3/go.mod h1:7LqA/THxQ86k76b8c/EMSiaJ3h1eZkMkXar0TQ1gf3U=
github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
Expand Down
3 changes: 2 additions & 1 deletion pkg/output/console.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,11 +153,12 @@ func (c *consoleManager) outputEntitlements(out *v1.EntitlementListOutput) error

func (c *consoleManager) outputGrants(out *v1.GrantListOutput) error {
grantsTable := pterm.TableData{
{"Resource Type", "Resource", "Entitlement", "Principal"},
{"ID", "Resource Type", "Resource", "Entitlement", "Principal"},
}

for _, g := range out.Grants {
grantsTable = append(grantsTable, []string{
g.Grant.Id,
g.ResourceType.DisplayName,
g.Resource.DisplayName,
g.Entitlement.DisplayName,
Expand Down
8 changes: 8 additions & 0 deletions vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/c1file.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 27 additions & 3 deletions vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/decoder.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 5 additions & 8 deletions vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/file.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

38 changes: 19 additions & 19 deletions vendor/github.com/conductorone/baton-sdk/pkg/us3/s3.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ github.com/aws/smithy-go/time
github.com/aws/smithy-go/transport/http
github.com/aws/smithy-go/transport/http/internal/io
github.com/aws/smithy-go/waiter
# github.com/conductorone/baton-sdk v0.0.25
# github.com/conductorone/baton-sdk v0.0.29
## explicit; go 1.19
github.com/conductorone/baton-sdk/pb/c1/connector/v2
github.com/conductorone/baton-sdk/pb/c1/reader/v2
Expand Down

0 comments on commit 27a50f4

Please sign in to comment.