Documentation
¶
Index ¶
Constants ¶
View Source
const ( MIN_UID = 1024 MAX_UID = 65534 )
Variables ¶
View Source
var ( ErrEmptyPasswd = errors.New("empty passwd file") ErrNoAvailableUids = errors.New("no available UIDs in passwd file") )
View Source
var (
ErrAcquireLock = errors.New("Could not acquire lock")
)
Functions ¶
func CreateUser ¶
CreateUser creates a new user with the first vacant UID.
Types ¶
type FileLocker ¶
type FileLocker struct {
// contains filtered or unexported fields
}
FileLocker is the structure that wraps exclusive file locking functionality.
func NewLocker ¶
func NewLocker(filepath string) (*FileLocker, error)
NewLocker creates new locker instance for a file path.
Click to show internal directories.
Click to hide internal directories.