Documentation ¶
Index ¶
- Constants
- func Ba65Str(data [65]byte) string
- func FileContentType(out *os.File) (string, error)
- func FileContentTypeByPath(pth string) (string, error)
- func FileExists(filename string) bool
- func RemovePrefix(pth string, pref string) string
- type WzContainer
- type WzContainerParam
- type WzMachineIDUtil
- type WzMachineIDUtilConsumer
Constants ¶
const ( EX_OK = 0 // successful termination EX_GENERIC = 1 // generic error EX_USAGE = 64 // command line usage error EX_NOUSER = 67 // addressee unknown EX_UNAVAILABLE = 69 // service unavailable EX_SOFTWARE = 70 // internal software error EX_CANTCREAT = 73 // can't create (user) output file EX_TEMPFAIL = 75 // temp failure; user is invited to retry EX_NOPERM = 77 // permission denied )
Variables ¶
This section is empty.
Functions ¶
func FileContentType ¶
FileContentType detects the content type via http. If unable to detect a proper one, "application/octet-stream" is returned.
func FileContentTypeByPath ¶
FileContentTypeByPath is a convenience alias to FileContentType to handle paths in strings.
func RemovePrefix ¶
RemovePrefix path from a path with necessary cleaning
Types ¶
type WzContainer ¶
type WzContainer struct { wzlib_logger.WzLogger // contains filtered or unexported fields }
WzContainer struct
func (*WzContainer) Container ¶
func (c *WzContainer) Container() (string, string, error)
Container runner
func (*WzContainer) ParsePkArgs ¶
func (c *WzContainer) ParsePkArgs(pa string) *WzContainerParam
ParsePkArgs parses packed ":" separated args TODO: probably move to base64 instead
type WzContainerParam ¶
WzContainerParam object
type WzMachineIDUtil ¶
type WzMachineIDUtil struct { wzlib_logger.WzLogger // contains filtered or unexported fields }
WzMachineIDUtil object to keep/read/create machine-id
func (*WzMachineIDUtil) GetMachineId ¶
func (wmid *WzMachineIDUtil) GetMachineId() string
GetMachineId always returns machine-id If machine-id is not present, it will be copied from an existing one or generated, if no dbus found.
func (WzMachineIDUtil) SetupMachineIdUtil ¶
func (WzMachineIDUtil) SetupMachineIdUtil(filePath string)
SetupMachineIdUtil setting up the Utility
type WzMachineIDUtilConsumer ¶
type WzMachineIDUtilConsumer struct{}
func (WzMachineIDUtilConsumer) GetMachineIdUtil ¶
func (wzid WzMachineIDUtilConsumer) GetMachineIdUtil() *WzMachineIDUtil
GetMAchineIdUtil returns machine ID instance