Documentation
¶
Overview ¶
Package utils has general utility functions
Index ¶
- func ByteCountDecimal(b int64) string
- func GenerateHashedPassword(password []byte) string
- func GetAllIPAdresses() (map[string]string, error)
- func GetInterfaceIpv4Addr(interfaceName string) (addr string, err error)
- func MimeByExtension(n string) string
- func RandomNumber() (big.Int, error)
- func RegisterZeroconfMDNS(ssl bool, webPort int, webdav bool, webdavPort int, sftp bool, sftpPort int) error
- func ReturnExt(n string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ByteCountDecimal ¶
ByteCountDecimal generates human readable file sizes and returns a string
func GenerateHashedPassword ¶ added in v1.0.3
GenerateHashPassword will take a plaintext masked password and return a bcrypt hash This is meant to be used with the filebased access via .goshs file
func GetAllIPAdresses ¶
GetAllIPAdresses will return a map of interface and associated ipv4 addresses for displaying reasons
func GetInterfaceIpv4Addr ¶
GetInterfaceIpv4Addr will return the ip address by name
func MimeByExtension ¶
MimeByExtension returns the mimetype string depending on the filename and its extension
func RegisterZeroconfMDNS ¶ added in v1.0.7
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.