Files
gluetun/internal/alpine/alpine.go

26 lines
527 B
Go
Raw Normal View History

package alpine
import (
"os/user"
"github.com/qdm12/golibs/files"
)
type Configurator interface {
2020-12-27 00:36:39 +00:00
CreateUser(username string, uid int) (createdUsername string, err error)
}
type configurator struct {
fileManager files.FileManager
lookupUID func(uid string) (*user.User, error)
lookupUser func(username string) (*user.User, error)
}
2020-04-12 19:07:19 +00:00
func NewConfigurator(fileManager files.FileManager) Configurator {
return &configurator{
fileManager: fileManager,
lookupUID: user.LookupId,
lookupUser: user.Lookup,
}
}