Documentation
¶
Index ¶
- func CachePath(path ...string) string
- func LogPath(path ...string) string
- func VarPath(path ...string) string
- type OS
- func (s *OS) CacheDir() string
- func (s *OS) GlobalDatabaseDir() string
- func (s *OS) GlobalDatabasePath() string
- func (s *OS) HostNames() ([]string, error)
- func (s *OS) Hostname() (string, error)
- func (s *OS) Init(fileSystem fsys.FileSystem) error
- func (s *OS) LocalDatabasePath() string
- func (s *OS) LocalNoncePath() string
- func (s *OS) LogDir() string
- func (s *OS) User() (*user.User, error)
- func (s *OS) VarDir() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CachePath ¶
CachePath returns the directory that THERM should its cache under. If THERM_DIR is set, this path is $THERM_DIR/cache, otherwise it is /var/cache/therm.
Types ¶
type OS ¶
type OS struct {
// contains filtered or unexported fields
}
OS is a high-level facade for accessing all operating-system level functionality that therm uses.
func DefaultOS ¶
func DefaultOS() *OS
DefaultOS returns a fresh uninitialized OS instance with default values.
func (*OS) GlobalDatabaseDir ¶
GlobalDatabaseDir returns the path of the global database directory.
func (*OS) GlobalDatabasePath ¶
GlobalDatabasePath returns the path of the global database SQLite file managed by dqlite.
func (*OS) HostNames ¶
HostNames will generate a list of names for which the certificate will be valid. This will include the hostname and ip address
func (*OS) Init ¶
func (s *OS) Init(fileSystem fsys.FileSystem) error
Init our internal data structures.
func (*OS) LocalDatabasePath ¶
LocalDatabasePath returns the path of the local database file.
func (*OS) LocalNoncePath ¶
LocalNoncePath returns the path of the nonce for the daemon