testent

package
v0.205.0 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeContextFunc

func MakeContextFunc(tb testing.TB) func() context.Context

func MakeFooFunc

func MakeFooFunc(tb testing.TB) func() Foo

Types

type Bar added in v0.196.0

type Bar struct {
	ID BarID `ext:"id"`

	N int
	C string
}

type BarID added in v0.196.0

type BarID string

func (BarID) String added in v0.196.0

func (id BarID) String() string

type BarJSONDTO added in v0.196.0

type BarJSONDTO struct {
	ID string `json:"id"`
	N  int    `json:"number"`
	C  string `json:"char"`
}

type Foo

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

func MakeFoo

func MakeFoo(tb testing.TB) Foo

func (Foo) GetFoo added in v0.194.1

func (f Foo) GetFoo() string

func (Foo) LookupID added in v0.196.0

func (foo Foo) LookupID() (FooID, bool)

type FooDTO

type FooDTO struct {
	ID   string `ext:"ID" json:"id"`
	FooV string `json:"foov"`
	BarV string `json:"barv"`
	BazV string `json:"bazv"`
}

type FooID

type FooID string

func (FooID) String added in v0.196.0

func (id FooID) String() string

type FooJSONMapping

type FooJSONMapping struct{}

func (FooJSONMapping) ToDTO

func (n FooJSONMapping) ToDTO(ent Foo) (FooDTO, error)

func (FooJSONMapping) ToEnt

func (n FooJSONMapping) ToEnt(dto FooDTO) (Foo, error)

type FooQueue

type FooQueue struct {
	ID FooQueueID `ext:"id"`
	pubsub.Publisher[Foo]
	pubsub.Subscriber[Foo]
}

func (FooQueue) SetPublisher

func (fq FooQueue) SetPublisher(p pubsub.Publisher[Foo])

func (FooQueue) SetSubscriber

func (fq FooQueue) SetSubscriber(s pubsub.Subscriber[Foo])

type FooQueueID

type FooQueueID string

type Fooer added in v0.194.1

type Fooer interface {
	GetFoo() string
}

Jump to

Keyboard shortcuts

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