MCPcopy Create free account
hub / github.com/belak/gitdir / ensureSampleGroups

Function ensureSampleGroups

config_ensure.go:83–106  ·  view source on GitHub ↗
(targetNode *yaml.Node)

Source from the content-addressed store, hash-verified

81}
82
83func ensureSampleGroups(targetNode *yaml.Node) bool {
84 _, modified := targetNode.EnsureKey(
85 "groups",
86 yaml.NewMappingNode(),
87 &yaml.EnsureOptions{
88 Comment: `
89Groups can be used in any place a normal user could be used. They are prefixed
90with a $, so the admins group could be accessed with $admins. Groups can be
91defined recursively, but they cannot have loops.
92#
93Sample groups:
94#
95groups:
96 admins:
97 - belak
98 - some-trusted-user
99 vault-members:
100 - $admins
101 - some-less-trusted-user`,
102 },
103 )
104
105 return modified
106}
107
108func ensureSampleOrgs(targetNode *yaml.Node) bool {
109 _, modified := targetNode.EnsureKey(

Callers 1

ensureSampleConfigYamlFunction · 0.85

Calls 2

NewMappingNodeFunction · 0.92
EnsureKeyMethod · 0.80

Tested by

no test coverage detected