testent

package
v0.300.0 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BazIDA

func BazIDA(v *Baz) *string

func FooJSONMapping

func FooJSONMapping() dtokit.Mapping[Foo, FooDTO]

func MakeContextFunc

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

func MakeFooFunc

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

Types

type Bar

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

	N int
	C string

	FooID FooID
}

type BarID

type BarID string

func (BarID) String

func (id BarID) String() string

type BarJSONDTO

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

type Baz

type Baz struct {
	Name string // ID
	V    int
}

func MakeBaz

func MakeBaz(tb testing.TB) Baz

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

func (f Foo) GetFoo() string

func (Foo) LookupID

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

func (id FooID) String() string

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 FooRepository

type FooRepository struct{}

func (*FooRepository) Create

func (r *FooRepository) Create(ctx context.Context, ptr *Foo) error

func (*FooRepository) DeleteByID

func (r *FooRepository) DeleteByID(ctx context.Context, id FooID) error

func (*FooRepository) FindAll

func (r *FooRepository) FindAll(ctx context.Context) iter.Seq[Foo]

func (*FooRepository) FindByID

func (r *FooRepository) FindByID(ctx context.Context, id FooID) (ent Foo, found bool, err error)

func (*FooRepository) Update

func (r *FooRepository) Update(ctx context.Context, ptr *Foo) error

type Fooer

type Fooer interface {
	GetFoo() string
}

Jump to

Keyboard shortcuts

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