Documentation ¶
Overview ¶
Package util implements helper functions that are used in other packages.
Index ¶
- Variables
- func CreateTestContext() context.Context
- func EqualSortedLists(a, b []string) bool
- func ErrStatus(rc *router.Context, status int, format string, args ...interface{})
- func GetDispatcher(c context.Context) *tq.Dispatcher
- func SetDispatcher(c context.Context, dispatcher *tq.Dispatcher) context.Context
- func SetupTaskIndexes(c context.Context)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // SampleValidAssignerCfg is a sample assigner config to be used in // unit tests. SampleValidAssignerCfg = `` /* 307-byte string literal not displayed */ )
Functions ¶
func CreateTestContext ¶
CreateTestContext creates a test context to be used in unit tests.
func EqualSortedLists ¶
EqualSortedLists returns true if lists contain the same sequence of strings.
func GetDispatcher ¶
func GetDispatcher(c context.Context) *tq.Dispatcher
GetDispatcher returns the dispatcher instance installed in the context.
func SetDispatcher ¶
SetDispatcher installs the dispatcher instance into the context.
func SetupTaskIndexes ¶
SetupTaskIndexes adds indexes for Task entities to be used by unit tests.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.