testutil

package
v0.0.14 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

type Context struct {
	// contains filtered or unexported fields
}

func NewContext

func NewContext(parent context.Context) *Context

func (Context) Deadline

func (c Context) Deadline() (deadline time.Time, ok bool)

func (Context) Done

func (c Context) Done() <-chan struct{}

func (Context) Err

func (c Context) Err() error

func (*Context) SetErrEval

func (c *Context) SetErrEval(fn ErrEvalFn)

SetErrEval allows you to define a callback that can be use to influence when Err() returns an error

func (*Context) SetParent

func (c *Context) SetParent(ctx context.Context) *Context

func (Context) Value

func (c Context) Value(key interface{}) interface{}

type ErrEvalFn

type ErrEvalFn func(parent context.Context) error

type MockHasher

type MockHasher struct {
	// contains filtered or unexported fields
}

func (MockHasher) BlockSize

func (s MockHasher) BlockSize() int

func (MockHasher) Reset

func (s MockHasher) Reset()

func (MockHasher) Size

func (s MockHasher) Size() int

func (MockHasher) Sum

func (s MockHasher) Sum(p []byte) []byte

func (*MockHasher) Write

func (s *MockHasher) Write(p []byte) (int, error)

type MockHasherReverse

type MockHasherReverse struct {
	MockHasher
}

func (MockHasherReverse) Sum

func (s MockHasherReverse) Sum(p []byte) []byte

Jump to

Keyboard shortcuts

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