MCPcopy Index your code
hub / github.com/kopia/kopia / run

Method run

cli/command_acl_list.go:26–46  ·  view source on GitHub ↗
(ctx context.Context, rep repo.Repository)

Source from the content-addressed store, hash-verified

24}
25
26func (c *commandACLList) run(ctx context.Context, rep repo.Repository) error {
27 var jl jsonList
28
29 jl.begin(&c.jo)
30 defer jl.end()
31
32 entries, err := acl.LoadEntries(ctx, rep, nil)
33 if err != nil {
34 return errors.Wrap(err, "error loading ACL entries")
35 }
36
37 for _, e := range entries {
38 if c.jo.jsonOutput {
39 jl.emit(aclListItem{e.ManifestID, e})
40 } else {
41 c.out.printStdout("id:%v user:%v access:%v target:%v\n", e.ManifestID, e.User, e.Access, e.Target)
42 }
43 }
44
45 return nil
46}
47
48type aclListItem struct {
49 ID manifest.ID `json:"id"`

Callers

nothing calls this directly

Calls 5

beginMethod · 0.95
endMethod · 0.95
emitMethod · 0.95
LoadEntriesFunction · 0.92
printStdoutMethod · 0.80

Tested by

no test coverage detected