Documentation ¶
Index ¶
- func B(x int64) *big.Int
- func FromRange(from, to int) []byte
- func GetHashFunctionByLowerCaseName(hashName string) (crypto.Hash, error)
- func GetRSAPrivateKey(size int) *rsa.PrivateKey
- func GetRSAPublicKey(size int) *rsa.PublicKey
- func GetTmpEmptyDir() string
- func GetTmpEmptyFile() *os.File
- func GetTmpFileName() string
- func GetTmpFileWithText(text string) *os.File
- func JoinAsError(msg []string) error
- func JoinErrors(errs []error) error
- func Range(length int) []byte
- type MockIoWriter
- func (this *MockIoWriter) Bytes() []byte
- func (this *MockIoWriter) IsValidJson() bool
- func (this *MockIoWriter) Length() int
- func (this *MockIoWriter) Reader() io.Reader
- func (this *MockIoWriter) ReaderAt() io.ReaderAt
- func (this *MockIoWriter) String() string
- func (this *MockIoWriter) Write(p []byte) (n int, err error)
- type MockRandomReader
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetRSAPrivateKey ¶
func GetRSAPrivateKey(size int) *rsa.PrivateKey
func GetRSAPublicKey ¶
func GetTmpEmptyDir ¶
func GetTmpEmptyDir() string
create a tmp dir and return its path. If failing, the method will panic
func GetTmpEmptyFile ¶
return a tmp file in the default tmp directory. If fails, the function will panic
func GetTmpFileName ¶
func GetTmpFileName() string
returns a path that can be safely use as tmp file
func GetTmpFileWithText ¶
returned a closed tmp file with text in it.
func JoinAsError ¶
func JoinErrors ¶
Types ¶
type MockIoWriter ¶
type MockIoWriter struct {
// contains filtered or unexported fields
}
func NewMockIoWriter ¶
func NewMockIoWriter() *MockIoWriter
func (*MockIoWriter) Bytes ¶
func (this *MockIoWriter) Bytes() []byte
func (*MockIoWriter) IsValidJson ¶
func (this *MockIoWriter) IsValidJson() bool
func (*MockIoWriter) Length ¶
func (this *MockIoWriter) Length() int
func (*MockIoWriter) Reader ¶
func (this *MockIoWriter) Reader() io.Reader
func (*MockIoWriter) ReaderAt ¶
func (this *MockIoWriter) ReaderAt() io.ReaderAt
func (*MockIoWriter) String ¶
func (this *MockIoWriter) String() string
type MockRandomReader ¶
type MockRandomReader struct {
// contains filtered or unexported fields
}
func NewMockRandomReader ¶
func NewMockRandomReader() *MockRandomReader
func (*MockRandomReader) GetRandomBytes ¶
func (this *MockRandomReader) GetRandomBytes(size int) []byte
func (*MockRandomReader) GetReadLength ¶
func (this *MockRandomReader) GetReadLength() int
Click to show internal directories.
Click to hide internal directories.