service

package
v0.0.0-...-c17fed3 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2024 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommonService

type CommonService[T model.Entity] interface {
	GetAll(ctx context.Context) ([]T, error)
	GetByFilter(ctx context.Context, filter map[string]interface{}) ([]T, error)
	GetByID(ctx context.Context, id string) (T, error)
	Create(ctx context.Context, entity T) error
	Update(ctx context.Context, id string, entity T) error
	Delete(ctx context.Context, id string) error
}

func NewService

func NewService[T model.Entity](repo repo.CommonRepository[T]) CommonService[T]

Jump to

Keyboard shortcuts

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