service

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bar

type Bar interface {
	// @transactional
	Create(c context.Context, dto dto.Bar) (int, error)

	Find(c context.Context, id int) (*entity.Bar, error)
}

func NewBarService

func NewBarService(repo repository.Bar) Bar

type Foo

type Foo interface {
	// @transactional
	Create(c context.Context, dto dto.Foo) (int, error)

	Find(c context.Context, id int) (*entity.Foo, error)

	// @transactional
	FooBara(c context.Context, dto dto.Foo) error
}

func NewFooService

func NewFooService(repo repository.Foo) Foo

type Foo2

type Foo2 interface {
	// @transactional
	Create(c context.Context, dto dto.Foo) (int, error)

	Find(c context.Context, id int) (*entity.Foo, error)

	// @transactional
	FooBara(c context.Context, dto dto.Foo) error
}

type FooBar

type FooBar interface {
	// @transactional
	Create(c context.Context, foo dto.Foo, bar dto.Bar) (int, int, error)

	Find(c context.Context, fooID, barID int) (*entity.Foo, *entity.Bar, error)
}

func NewFooBarService

func NewFooBarService(foo Foo, bar Bar) FooBar

type FooService

type FooService struct {
	// contains filtered or unexported fields
}

func (*FooService) Create

func (s *FooService) Create(c context.Context, dto dto.Foo) (int, error)

func (*FooService) Find

func (s *FooService) Find(c context.Context, id int) (*entity.Foo, error)

func (*FooService) FooBara

func (s *FooService) FooBara(c context.Context, dto dto.Foo) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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