utils

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decode

func Decode(r io.Reader, target interface{}, encrypted bool, encryptKey [32]byte) error

func Encode

func Encode(w io.Writer, source interface{}, encrypted bool, encryptKey [32]byte) error

func GenerateRandomString

func GenerateRandomString(n int) string

GenerateRandomString generates random string of a length n

func GetReaderSize added in v0.10.0

func GetReaderSize(r io.Reader) (newReader io.Reader, size int64)

GetReaderSize returns a copy of the io.Reader and the size of this reader (original io.Reader should contain small amount of data)

It panics if io.Copy finished with an error.

Types

This section is empty.

Jump to

Keyboard shortcuts

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