spechelper

package
v0.0.0-...-25ee673 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DatabaseDSN

func DatabaseDSN(tb testing.TB) string

func DatabaseURL

func DatabaseURL(tb testing.TB) string

func MakeContext

func MakeContext(testing.TB) context.Context

func MakeString

func MakeString(tb testing.TB) string

func MakeTestEntityFunc

func MakeTestEntityFunc(tb testing.TB) func() TestEntity

func MigrateTestEntity

func MigrateTestEntity(tb testing.TB, cm postgresql.Connection)

func TestEntityMapping

func TestEntityMapping() postgresql.Mapper[TestEntity, string]

Types

type TestEntity

type TestEntity struct {
	ID  string `ext:"ID"`
	Foo string
	Bar string
	Baz string
}

type TestEntityDTO

type TestEntityDTO struct {
	ID  string `ext:"ID" json:"id"`
	Foo string `json:"foo"`
	Bar string `json:"bar"`
	Baz string `json:"baz"`
}

type TestEntityJSONMapping

type TestEntityJSONMapping struct{}

func (TestEntityJSONMapping) ToDTO

func (TestEntityJSONMapping) ToEnt

Jump to

Keyboard shortcuts

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