Documentation
¶
Index ¶
- Variables
- func Contains(list []string, value string) bool
- func CreateLock(lock_path string) error
- func DotSerialize(prefix string, in interface{}) map[string]string
- func DownloadUnpackArchive(url, out_dir, user, password string) error
- func FileCopy(src string, dst string) error
- func FileReplaceBlock(path, block_from, block_to string, lines ...string) error
- func FileReplaceToken(path string, full_line, add, anycase bool, token_values ...string) error
- func FileStartsWith(path string, prefix []byte) error
- func SerializeMetadata(format, prefix string, data map[string]interface{}) (out []byte, err error)
- func WaitLock(lock_path string, clean func()) error
- type PassThruMonitor
- type UnparsedJson
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrFileStartsWithDirectory = fmt.Errorf("FileStartsWith: Unable to check file prefix for directory") ErrFileStartsWithFileTooSmall = fmt.Errorf("FileStartsWith: File is too small for prefix") ErrFileStartsWithNotEqual = fmt.Errorf("FileStartsWith: File is not starts with the prefix") )
Functions ¶
func CreateLock ¶
The function creates the lock file, notice - remove it yourself
func DotSerialize ¶
Simple serializer to get map as key.subkey=value with dot separation for the keys
func DownloadUnpackArchive ¶
Stream function to download and unpack archive without using a storage file to make it as quick as possible
func FileReplaceBlock ¶
func FileReplaceToken ¶
func FileStartsWith ¶
func SerializeMetadata ¶
Serializes dictionary to usable format
Types ¶
type PassThruMonitor ¶
Wraps an existing io.Reader to monitor the stream
It simply forwards the Read() call, while displaying the results from individual calls to it.
type UnparsedJson ¶
type UnparsedJson string
func (*UnparsedJson) MarshalJSON ¶
func (r *UnparsedJson) MarshalJSON() ([]byte, error)
func (*UnparsedJson) UnmarshalJSON ¶
func (r *UnparsedJson) UnmarshalJSON(b []byte) error
Click to show internal directories.
Click to hide internal directories.