Documentation ¶
Index ¶
- Constants
- func FetchHTTPContent(target string) ([]byte, error)
- func GetAssetLocation(file string) string
- func GetKey(uuid [16]byte) []byte
- func GetProgramDir() string
- func HumanFriendlyTraffic(bytes uint64) string
- func Must(err error)
- func Must2(_ interface{}, err error)
- func PickPort(network string, host string) int
- func SHA224String(password string) string
- func StrToUUID(s string) (uuid [16]byte, err error)
- func WriteAllBytes(writer io.Writer, payload []byte) error
- func WriteFile(path string, payload []byte) error
- type Error
- type Notifier
- type RewindConn
- type RewindReader
- type Runnable
- type StickyWriter
Constants ¶
View Source
const ( KiB = 1024 MiB = KiB * 1024 GiB = MiB * 1024 )
Variables ¶
This section is empty.
Functions ¶
func FetchHTTPContent ¶
func GetAssetLocation ¶
func GetKey ¶ added in v1.0.7
GetKey returns the key of AES-128-CFB encrypter Key:MD5(UUID + []byte('c48619fe-8f02-49e0-b9e9-edf763e17e21'))
func GetProgramDir ¶
func GetProgramDir() string
func HumanFriendlyTraffic ¶
func SHA224String ¶
Types ¶
type Notifier ¶
type Notifier struct {
// contains filtered or unexported fields
}
Notifier is a utility for notifying changes. The change producer may notify changes multiple time, and the consumer may get notified asynchronously.
type RewindConn ¶
type RewindConn struct { net.Conn *RewindReader }
func NewRewindConn ¶
func NewRewindConn(conn net.Conn) *RewindConn
type RewindReader ¶
type RewindReader struct {
// contains filtered or unexported fields
}
func (*RewindReader) ReadByte ¶
func (r *RewindReader) ReadByte() (byte, error)
func (*RewindReader) Rewind ¶
func (r *RewindReader) Rewind()
func (*RewindReader) SetBufferSize ¶
func (r *RewindReader) SetBufferSize(size int)
func (*RewindReader) StopBuffering ¶
func (r *RewindReader) StopBuffering()
type StickyWriter ¶
type StickyWriter struct { MaxBuffered int // contains filtered or unexported fields }
Click to show internal directories.
Click to hide internal directories.