Documentation ¶
Index ¶
- func DiscardData(r io.Reader) error
- func LoadBase64Secret(log *slog.Logger, filename string, minLen, maxLen int) ([]byte, error)
- func LoadEd25519Base64PublicKey(log *slog.Logger, filename string) ([]byte, error)
- func LoadSHA256Base64Secret(log *slog.Logger, filename string) ([]byte, error)
- func LoadSHA3_512Base64Secret(log *slog.Logger, filename string) ([]byte, error)
- func ReadAll(r io.Reader) (mem.BufferSlice, error)
- func ReadAllFunc(r io.Reader, f func([]byte) error) error
- func ReadAllWithPool(r io.Reader, pool mem.BufferPool) (mem.BufferSlice, error)
- type CancelingReadCloser
- type OnceReadCloser
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DiscardData ¶
DiscardData discards up to 8KiB of data from r. Function can be used to drain HTTP client response body. See https://pkg.go.dev/net/http#Response.
func LoadBase64Secret ¶
func LoadEd25519Base64PublicKey ¶ added in v17.4.0
func LoadSHA256Base64Secret ¶ added in v17.4.0
func LoadSHA3_512Base64Secret ¶ added in v17.7.0
func ReadAll ¶ added in v17.5.0
func ReadAll(r io.Reader) (mem.BufferSlice, error)
ReadAll reads from the reader until io.EOF or an error. Returns the read data as a slice of buffers or an error.
func ReadAllFunc ¶ added in v17.5.0
ReadAllFunc fully reads the reader and passes the data to the callback. Callback must not retain the buffer or any portion of it.
func ReadAllWithPool ¶ added in v17.5.0
func ReadAllWithPool(r io.Reader, pool mem.BufferPool) (mem.BufferSlice, error)
Types ¶
type CancelingReadCloser ¶ added in v17.7.0
type CancelingReadCloser struct { io.ReadCloser Cancel context.CancelFunc }
func (*CancelingReadCloser) Close ¶ added in v17.7.0
func (c *CancelingReadCloser) Close() error
type OnceReadCloser ¶ added in v17.7.0
type OnceReadCloser struct { io.ReadCloser // contains filtered or unexported fields }
func (*OnceReadCloser) Close ¶ added in v17.7.0
func (oc *OnceReadCloser) Close() error
Click to show internal directories.
Click to hide internal directories.