ioz

package
v18.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 14, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DiscardData

func DiscardData(r io.Reader) error

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 LoadBase64Secret(log *slog.Logger, filename string, minLen, maxLen int) ([]byte, error)

func LoadEd25519Base64PublicKey

func LoadEd25519Base64PublicKey(log *slog.Logger, filename string) ([]byte, error)

func LoadSHA256Base64Secret

func LoadSHA256Base64Secret(log *slog.Logger, filename string) ([]byte, error)

func LoadSHA3_512Base64Secret

func LoadSHA3_512Base64Secret(log *slog.Logger, filename string) ([]byte, error)

func ReadAllFunc

func ReadAllFunc(r io.Reader, f func([]byte) error) error

ReadAllFunc fully reads the reader and passes the data to the callback. Callback must not retain the buffer or any portion of it.

func ReadSecretAES256Key

func ReadSecretAES256Key(path string) ([]byte, error)

Types

type CancelingReadCloser

type CancelingReadCloser struct {
	io.ReadCloser
	Cancel context.CancelFunc
}

func (*CancelingReadCloser) Close

func (c *CancelingReadCloser) Close() error

type OnceReadCloser

type OnceReadCloser struct {
	io.ReadCloser
	// contains filtered or unexported fields
}

func (*OnceReadCloser) Close

func (oc *OnceReadCloser) Close() error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL