util

package
v0.0.0-...-e560ebb Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2021 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Overview

Package util implements helper functions that are used in other packages.

Index

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

func CreateTestContext() context.Context

CreateTestContext creates a test context to be used in unit tests.

func EqualSortedLists

func EqualSortedLists(a, b []string) bool

EqualSortedLists returns true if lists contain the same sequence of strings.

func ErrStatus

func ErrStatus(rc *router.Context, status int, format string, args ...interface{})

ErrStatus sends an HTTP response with the error status and message.

func GetDispatcher

func GetDispatcher(c context.Context) *tq.Dispatcher

GetDispatcher returns the dispatcher instance installed in the context.

func SetDispatcher

func SetDispatcher(c context.Context, dispatcher *tq.Dispatcher) context.Context

SetDispatcher installs the dispatcher instance into the context.

func SetupTaskIndexes

func SetupTaskIndexes(c context.Context)

SetupTaskIndexes adds indexes for Task entities to be used by unit tests.

Types

This section is empty.

Jump to

Keyboard shortcuts

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