Documentation ¶
Index ¶
- func CreateDirectory(path string) error
- func DecodeBase64(payloadString string) ([]byte, error)
- func DecodeBase64ToBytes(payloadString string) ([]byte, error)
- func DecodeBase64ToString(payloadString string) (string, error)
- func DelaySecond(n time.Duration)
- func DeleteDirectory(path string) error
- func DeleteFile(pathToFile string) error
- func EncodeBase64(payloadBytes []byte) string
- func EncodeBase64FromBytes(payloadBytes []byte) string
- func EncodeBase64FromString(payloadString string) string
- func InitiateDirectory(directory string)
- func IsDirectory(path string) (bool, error)
- func IsFile(pathToFile string) bool
- func PrintError(str string)
- func PrintErrorFull(str string, err error)
- func PrintLine()
- func PrintStatus(str string)
- func PrintSuccess(str string)
- func ReadFromFile(pathToFile string) ([]byte, error)
- func StoreFileFromDownload(f File, path string) error
- func StripFilePathBase(pathToFile string) string
- func WriteToFile(data []byte, pathToFile string) error
- type Config
- type File
- type Key
- type KeyServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateDirectory ¶
func DecodeBase64 ¶
Wrapper for DecodeBase64ToBytes
func DecodeBase64ToBytes ¶
func DecodeBase64ToString ¶
Convenience function.
func DelaySecond ¶
func DeleteDirectory ¶
func DeleteFile ¶
func EncodeBase64FromBytes ¶
func EncodeBase64FromString ¶
Convenience function.
func InitiateDirectory ¶
func InitiateDirectory(directory string)
func IsDirectory ¶
func PrintError ¶
func PrintError(str string)
func PrintErrorFull ¶
func PrintStatus ¶
func PrintStatus(str string)
func PrintSuccess ¶
func PrintSuccess(str string)
func ReadFromFile ¶
func StoreFileFromDownload ¶
func StripFilePathBase ¶
func WriteToFile ¶
Types ¶
type Config ¶
type Config struct { Author string `json:"author"` Path string `json:"path"` Date string `json:"date"` Mode string `json:"mode"` Hardware string `json:"hardware"` Host string `json:"host"` Protocol string `json:"protocol"` Version string `json:"version"` Port string `json:"port"` Hotload bool `json:"hotload"` Verbose bool `json:"verbose"` Apikey string `json:"apikey"` }
type File ¶
type File struct { FileNameEnc string `json:"name"` // base64 encoded. FileName string `json:"-"` FilePath string ContentEnc []byte `json:"content"` // not encoded? Content []byte `json:"-"` PasswordEnc string `json:"password"` // base64 encoded. Signature string `json:"signature"` // base64 encoded. HMAC string `json:"HMAC"` // base64 encoded. UserID string `json:"userID"` // ? needed here? FileSize int `json:"fileSize"` // Does the server not do anything with empty fields? ID int `json:"ID"` Expiry time.Time `json:"expiry"` Sender string `json:"sender"` }
Click to show internal directories.
Click to hide internal directories.