Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Lookup ¶
Lookup is the interface needed by Keysync to resolve a user ID from their username (and group) It is intended to be used with the implementation on Os. There's also one in mock.go that uses fixed data instead of operating-system sourced data.
type Mock ¶
Mock implements the lookup interface using a fixed set of users and groups, useful for tests
type Ownership ¶
Ownership indicates the default ownership of filesystem entries.
func NewOwnership ¶
func NewOwnership(username, groupname, fallbackUser, fallbackGroup string, lookup Lookup, logger *logrus.Entry) Ownership
NewOwnership initializes default file ownership struct. Logs as error anything that goes wrong, but always returns something Worst-case you get "0", ie root, owning things, which is safe as root can always read all files.
Click to show internal directories.
Click to hide internal directories.