Documentation ¶
Index ¶
- Constants
- func AddImports(proj *models.Project, file *jen.File)
- func AppendItemsToList(list jen.Code, items ...jen.Code) jen.Code
- func AssertContains(container, value, message *jen.Statement, formatArgs ...*jen.Statement) jen.Code
- func AssertEmpty(value, message *jen.Statement, formatArgs ...*jen.Statement) jen.Code
- func AssertEqual(expected, actual, message *jen.Statement, formatArgs ...*jen.Statement) jen.Code
- func AssertError(value, message *jen.Statement, formatArgs ...*jen.Statement) jen.Code
- func AssertExpectationsFor(varNames ...string) jen.Code
- func AssertFalse(value, message *jen.Statement, formatArgs ...*jen.Statement) jen.Code
- func AssertLength(value, length, message *jen.Statement, formatArgs ...*jen.Statement) jen.Code
- func AssertNil(value, message *jen.Statement, formatArgs ...*jen.Statement) jen.Code
- func AssertNoError(value, message *jen.Statement, formatArgs ...*jen.Statement) jen.Code
- func AssertNotEmpty(value, message *jen.Statement, formatArgs ...*jen.Statement) jen.Code
- func AssertNotEqual(expected, actual, message *jen.Statement, formatArgs ...*jen.Statement) jen.Code
- func AssertNotNil(value, message *jen.Statement, formatArgs ...*jen.Statement) jen.Code
- func AssertNotZero(value, message *jen.Statement, formatArgs ...*jen.Statement) jen.Code
- func AssertTrue(value, message *jen.Statement, formatArgs ...*jen.Statement) jen.Code
- func AssertZero(value, message *jen.Statement, formatArgs ...*jen.Statement) jen.Code
- func BuildError(args ...jen.Code) jen.Code
- func BuildFakeVar(proj *models.Project, typName string, args ...jen.Code) jen.Code
- func BuildFakeVarName(typName string) string
- func BuildFakeVarWithCustomName(proj *models.Project, varName, funcName string, args ...jen.Code) jen.Code
- func BuildInterfaceCheck(interfaceName, implementerType string) jen.Code
- func BuildSubTest(name string, testInstructions ...jen.Code) jen.Code
- func BuildSubTestWithoutContext(name string, testInstructions ...jen.Code) jen.Code
- func BuildTemplatePath(pkgRoot, tail string) string
- func BuildTestServer(name string, handlerLines ...jen.Code) *jen.Statement
- func CreateDefaultQueryFilter(proj *models.Project) jen.Code
- func CreateNilQueryFilter(proj *models.Project) jen.Code
- func DefaultQueryFilter(proj *models.Project) jen.Code
- func Error(str string) jen.Code
- func Errorf(str string, args ...interface{}) jen.Code
- func ExpectMethod(varName, method string) jen.Code
- func FakeBoolFunc() jen.Code
- func FakeCallForField(pkgRoot string, field models.DataField) jen.Code
- func FakeContentTypeFunc() jen.Code
- func FakeError() jen.Code
- func FakeFloat32Func() jen.Code
- func FakeFloat64Func() jen.Code
- func FakeFloat64WhichIsActuallyAFloat32Func() jen.Code
- func FakeFuncForType(typ string, isPointer bool) func() jen.Code
- func FakeHTTPMethodFunc() jen.Code
- func FakeInt16Func() jen.Code
- func FakeInt32Func() jen.Code
- func FakeInt64Func() jen.Code
- func FakeInt64WhichIsReallyAnInt32Func() jen.Code
- func FakeInt8Func() jen.Code
- func FakeIntFunc() jen.Code
- func FakePasswordFunc() jen.Code
- func FakeSeedFunc() jen.Code
- func FakeStringFunc() jen.Code
- func FakeURLFunc() jen.Code
- func FakeUUIDFunc() jen.Code
- func FakeUint16Func() jen.Code
- func FakeUint32Func() jen.Code
- func FakeUint64Func() jen.Code
- func FakeUint64WhichIsActuallyAUint32Func() jen.Code
- func FakeUint8Func() jen.Code
- func FakeUintFunc() jen.Code
- func FakeUnixTimeFunc() jen.Code
- func FakeUsernameFunc() jen.Code
- func FindAndFixImportBlock(pkgRoot, filepath string) error
- func FormatString(str string, args ...jen.Code) *jen.Statement
- func FormatStringWithArg(arg jen.Code, args ...jen.Code) *jen.Statement
- func InlineFakeSeedFunc() jen.Code
- func NilQueryFilter(proj *models.Project) jen.Code
- func OuterTestFunc(subjectName string) *jen.Statement
- func ParallelTest(tee *jen.Statement) jen.Code
- func QueryFilterParam(proj *models.Project) jen.Code
- func RenderGoFile(proj *models.Project, path string, file *jen.File) error
- func RequireNil(value, message *jen.Statement, formatArgs ...*jen.Statement) jen.Code
- func RequireNoError(value, message *jen.Statement, formatArgs ...*jen.Statement) jen.Code
- func RequireNotNil(value, message *jen.Statement, formatArgs ...*jen.Statement) jen.Code
- func RequireTrue(value, message *jen.Statement, formatArgs ...*jen.Statement) jen.Code
- func RunGoFormatForFile(filename string) error
- func RunGoimportsForFile(filename string) error
- func StartSpan(proj *models.Project, saveCtx bool, spanName string) jen.Code
- func StartSpanWithInlineCtx(proj *models.Project, saveCtx bool, spanName jen.Code) jen.Code
- func StartSpanWithVar(proj *models.Project, saveCtx bool, spanName jen.Code) jen.Code
- func ValuePointerWrapper(typ string, c jen.Code) func() jen.Code
- func WriteHeader(status string) jen.Code
- func WriteXHeader(varName, status string) jen.Code
Constants ¶
const SpanVarName = "span"
const (
T = "T"
)
Variables ¶
This section is empty.
Functions ¶
func AssertContains ¶
func AssertContains(container, value, message *jen.Statement, formatArgs ...*jen.Statement) jen.Code
AssertContains calls assert.NotEmpty
func AssertEmpty ¶
AssertEmpty calls assert.NotEmpty
func AssertEqual ¶
AssertEqual calls assert.Equal
func AssertError ¶
AssertError calls assert.Error
func AssertExpectationsFor ¶
func AssertFalse ¶
AssertFalse calls assert.False
func AssertLength ¶
AssertLength calls assert.NotEmpty
func AssertNoError ¶
AssertNoError calls assert.NoError
func AssertNotEmpty ¶
AssertNotEmpty calls assert.NotEmpty
func AssertNotEqual ¶
func AssertNotEqual(expected, actual, message *jen.Statement, formatArgs ...*jen.Statement) jen.Code
AssertNotEqual calls assert.Equal
func AssertNotNil ¶
AssertNotNil calls assert.NotNil
func AssertNotZero ¶
AssertNotZero calls assert.NotEmpty
func AssertTrue ¶
AssertTrue calls assert.True
func AssertZero ¶
AssertZero calls assert.NotEmpty
func BuildFakeVar ¶
func BuildFakeVarName ¶
func BuildInterfaceCheck ¶
func BuildSubTest ¶
BuildSubTest builds a subtest
func BuildSubTestWithoutContext ¶
BuildSubTestWithoutContext builds a subtest without context
func BuildTemplatePath ¶
BuildTemplatePath builds a template path
func BuildTestServer ¶
BuildTestServer builds a test server with an example handlerfunc
func ExpectMethod ¶
ExpectMethod creates a test expectation for a gievn method
func FakeBoolFunc ¶
func FakeContentTypeFunc ¶
func FakeFloat32Func ¶
func FakeFloat64Func ¶
func FakeHTTPMethodFunc ¶
func FakeInt16Func ¶
func FakeInt32Func ¶
func FakeInt64Func ¶
func FakeInt8Func ¶
func FakeIntFunc ¶
func FakePasswordFunc ¶
func FakeSeedFunc ¶
FakeSeedFunc builds a consistent fake library seed init function
func FakeStringFunc ¶
func FakeURLFunc ¶
func FakeUUIDFunc ¶
func FakeUint16Func ¶
func FakeUint32Func ¶
func FakeUint64Func ¶
func FakeUint8Func ¶
func FakeUintFunc ¶
func FakeUnixTimeFunc ¶
func FakeUsernameFunc ¶
func FindAndFixImportBlock ¶
func InlineFakeSeedFunc ¶
InlineFakeSeedFunc builds a consistent fake library seed init function
func ParallelTest ¶
ParallelTest creates a new t.Parallel call
func RenderGoFile ¶
RenderGoFile does
func RequireNil ¶
RequireNil creates a require call
func RequireNoError ¶
RequireNoError creates a require call
func RequireNotNil ¶
RequireNotNil creates a require call
func RequireTrue ¶
RequireTrue creates a require call
func RunGoFormatForFile ¶
RunGoFormatForFile does something
func RunGoimportsForFile ¶
RunGoimportsForFile runs the `goimports` binary for a given filename
func StartSpanWithInlineCtx ¶
func StartSpanWithVar ¶
func WriteHeader ¶
WriteHeader calls res.WriteHeader for a given status
func WriteXHeader ¶
WriteXHeader calls WriteHeader for a given variable name
Types ¶
This section is empty.