Documentation ¶
Index ¶
- Variables
- func AppendFile(absPath string, data []byte) bool
- func CountFiles(absPath string) int
- func DeleteFile(absPath string) bool
- func Exists(absPath string) bool
- func ListDirectory(absPath string, ascending bool) ([]string, error)
- func NotifyServiceReady()
- func NotifyServiceStopping()
- func ReadFileFully(absPath string) ([]byte, error)
- func Retry(attempts int, sleep time.Duration, callback func() error) (err error)
- func TokenPath(root, value string) string
- func TokensPath(root string) string
- func TouchFile(absPath string) bool
- func UpdateFile(absPath string, data []byte) bool
- func WriteFile(absPath string, data []byte) bool
- type LogFormat
Constants ¶
This section is empty.
Variables ¶
JSON fascade for abstraction of json marshalling and unmarhalling
Functions ¶
func AppendFile ¶
AppendFile appens data given absolute path to a file, creates it if it does not exist
func CountFiles ¶
CountFiles returns number of items in directory
func DeleteFile ¶
DeleteFile removes file given absolute path if that file does exists
func ListDirectory ¶
ListDirectory returns sorted slice of item names in given absolute path default sorting is ascending
func NotifyServiceReady ¶
func NotifyServiceReady()
NotifyServiceReady notify underlying os that service is ready
func NotifyServiceStopping ¶
func NotifyServiceStopping()
NotifyServiceStopping notify underlying os that service is stopping
func ReadFileFully ¶
ReadFileFully reads whole file given absolute path
func UpdateFile ¶
UpdateFile rewrite file with data given absolute path to a file if that file exist
Types ¶
Click to show internal directories.
Click to hide internal directories.