usecase
import "github.com/prescriptoo/prescriptoo-api/services/medicine/internal/usecase"Package usecase implements medicine catalog queries and lifecycle commands.
Index
- type CreateBrandUseCase
- type CreateDrugUseCase
- type CreateGenericUseCase
- type CreateManufacturerUseCase
- type DeleteBrandUseCase
- type DeleteDrugUseCase
- type DeleteGenericUseCase
- type DeleteManufacturerUseCase
- type GetAdminBrandUseCase
- type GetAdminDrugUseCase
- type GetAdminGenericUseCase
- type GetAdminManufacturerUseCase
- type GetBrandUseCase
- type GetDrugUseCase
- type GetGenericUseCase
- type GetManufacturerUseCase
- type ListAdminBrandsUseCase
- type ListAdminDrugsUseCase
- type ListAdminGenericsUseCase
- type ListAdminManufacturersUseCase
- type ListBrandsUseCase
- type ListDrugsUseCase
- type ListGenericsUseCase
- type ListManufacturersUseCase
- type PatchBrandUseCase
- type PatchDrugUseCase
- type PatchGenericUseCase
- type PatchManufacturerUseCase
- type RestoreBrandUseCase
- type RestoreDrugUseCase
- type RestoreGenericUseCase
- type RestoreManufacturerUseCase
type CreateBrandUseCase
CreateBrandUseCase implements the create brand operation.
type CreateBrandUseCase struct {
// contains filtered or unexported fields
}func NewCreateBrandUseCase
func NewCreateBrandUseCase(repo ports.CatalogRepository) *CreateBrandUseCaseNewCreateBrandUseCase injects the catalog repository.
func (*CreateBrandUseCase) Execute
func (uc *CreateBrandUseCase) Execute(ctx context.Context, input medicinepublic.CreateBrandInput) (*medicinepublic.Brand, error)Execute runs the create brand use case.
type CreateDrugUseCase
CreateDrugUseCase implements the create drug operation.
type CreateDrugUseCase struct {
// contains filtered or unexported fields
}func NewCreateDrugUseCase
func NewCreateDrugUseCase(repo ports.CatalogRepository) *CreateDrugUseCaseNewCreateDrugUseCase injects the catalog repository.
func (*CreateDrugUseCase) Execute
func (uc *CreateDrugUseCase) Execute(ctx context.Context, input medicinepublic.CreateDrugInput) (*medicinepublic.Drug, error)Execute runs the create drug use case.
type CreateGenericUseCase
CreateGenericUseCase implements the create generic operation.
type CreateGenericUseCase struct {
// contains filtered or unexported fields
}func NewCreateGenericUseCase
func NewCreateGenericUseCase(repo ports.CatalogRepository) *CreateGenericUseCaseNewCreateGenericUseCase injects the catalog repository.
func (*CreateGenericUseCase) Execute
func (uc *CreateGenericUseCase) Execute(ctx context.Context, input medicinepublic.CreateGenericInput) (*medicinepublic.Generic, error)Execute runs the create generic use case.
type CreateManufacturerUseCase
CreateManufacturerUseCase implements the create manufacturer operation.
type CreateManufacturerUseCase struct {
// contains filtered or unexported fields
}func NewCreateManufacturerUseCase
func NewCreateManufacturerUseCase(repo ports.CatalogRepository) *CreateManufacturerUseCaseNewCreateManufacturerUseCase injects the catalog repository.
func (*CreateManufacturerUseCase) Execute
func (uc *CreateManufacturerUseCase) Execute(ctx context.Context, input medicinepublic.CreateManufacturerInput) (*medicinepublic.Manufacturer, error)Execute runs the create manufacturer use case.
type DeleteBrandUseCase
DeleteBrandUseCase implements the delete brand operation.
type DeleteBrandUseCase struct {
// contains filtered or unexported fields
}func NewDeleteBrandUseCase
func NewDeleteBrandUseCase(repo ports.CatalogRepository) *DeleteBrandUseCaseNewDeleteBrandUseCase injects the catalog repository.
func (*DeleteBrandUseCase) Execute
func (uc *DeleteBrandUseCase) Execute(ctx context.Context, input medicinepublic.RecordInput) (*medicinepublic.CatalogEmpty, error)Execute runs the delete brand use case.
type DeleteDrugUseCase
DeleteDrugUseCase implements the delete drug operation.
type DeleteDrugUseCase struct {
// contains filtered or unexported fields
}func NewDeleteDrugUseCase
func NewDeleteDrugUseCase(repo ports.CatalogRepository) *DeleteDrugUseCaseNewDeleteDrugUseCase injects the catalog repository.
func (*DeleteDrugUseCase) Execute
func (uc *DeleteDrugUseCase) Execute(ctx context.Context, input medicinepublic.RecordInput) (*medicinepublic.CatalogEmpty, error)Execute runs the delete drug use case.
type DeleteGenericUseCase
DeleteGenericUseCase implements the delete generic operation.
type DeleteGenericUseCase struct {
// contains filtered or unexported fields
}func NewDeleteGenericUseCase
func NewDeleteGenericUseCase(repo ports.CatalogRepository) *DeleteGenericUseCaseNewDeleteGenericUseCase injects the catalog repository.
func (*DeleteGenericUseCase) Execute
func (uc *DeleteGenericUseCase) Execute(ctx context.Context, input medicinepublic.RecordInput) (*medicinepublic.CatalogEmpty, error)Execute runs the delete generic use case.
type DeleteManufacturerUseCase
DeleteManufacturerUseCase implements the delete manufacturer operation.
type DeleteManufacturerUseCase struct {
// contains filtered or unexported fields
}func NewDeleteManufacturerUseCase
func NewDeleteManufacturerUseCase(repo ports.CatalogRepository) *DeleteManufacturerUseCaseNewDeleteManufacturerUseCase injects the catalog repository.
func (*DeleteManufacturerUseCase) Execute
func (uc *DeleteManufacturerUseCase) Execute(ctx context.Context, input medicinepublic.RecordInput) (*medicinepublic.CatalogEmpty, error)Execute runs the delete manufacturer use case.
type GetAdminBrandUseCase
GetAdminBrandUseCase implements the get admin brand operation.
type GetAdminBrandUseCase struct {
// contains filtered or unexported fields
}func NewGetAdminBrandUseCase
func NewGetAdminBrandUseCase(repo ports.CatalogRepository) *GetAdminBrandUseCaseNewGetAdminBrandUseCase injects the catalog repository.
func (*GetAdminBrandUseCase) Execute
func (uc *GetAdminBrandUseCase) Execute(ctx context.Context, input medicinepublic.RecordInput) (*medicinepublic.Brand, error)Execute runs the get admin brand use case.
type GetAdminDrugUseCase
GetAdminDrugUseCase implements the get admin drug operation.
type GetAdminDrugUseCase struct {
// contains filtered or unexported fields
}func NewGetAdminDrugUseCase
func NewGetAdminDrugUseCase(repo ports.CatalogRepository) *GetAdminDrugUseCaseNewGetAdminDrugUseCase injects the catalog repository.
func (*GetAdminDrugUseCase) Execute
func (uc *GetAdminDrugUseCase) Execute(ctx context.Context, input medicinepublic.RecordInput) (*medicinepublic.Drug, error)Execute runs the get admin drug use case.
type GetAdminGenericUseCase
GetAdminGenericUseCase implements the get admin generic operation.
type GetAdminGenericUseCase struct {
// contains filtered or unexported fields
}func NewGetAdminGenericUseCase
func NewGetAdminGenericUseCase(repo ports.CatalogRepository) *GetAdminGenericUseCaseNewGetAdminGenericUseCase injects the catalog repository.
func (*GetAdminGenericUseCase) Execute
func (uc *GetAdminGenericUseCase) Execute(ctx context.Context, input medicinepublic.RecordInput) (*medicinepublic.Generic, error)Execute runs the get admin generic use case.
type GetAdminManufacturerUseCase
GetAdminManufacturerUseCase implements the get admin manufacturer operation.
type GetAdminManufacturerUseCase struct {
// contains filtered or unexported fields
}func NewGetAdminManufacturerUseCase
func NewGetAdminManufacturerUseCase(repo ports.CatalogRepository) *GetAdminManufacturerUseCaseNewGetAdminManufacturerUseCase injects the catalog repository.
func (*GetAdminManufacturerUseCase) Execute
func (uc *GetAdminManufacturerUseCase) Execute(ctx context.Context, input medicinepublic.RecordInput) (*medicinepublic.Manufacturer, error)Execute runs the get admin manufacturer use case.
type GetBrandUseCase
GetBrandUseCase implements the get brand operation.
type GetBrandUseCase struct {
// contains filtered or unexported fields
}func NewGetBrandUseCase
func NewGetBrandUseCase(repo ports.CatalogRepository) *GetBrandUseCaseNewGetBrandUseCase injects the catalog repository.
func (*GetBrandUseCase) Execute
func (uc *GetBrandUseCase) Execute(ctx context.Context, input medicinepublic.RecordInput) (*medicinepublic.Brand, error)Execute runs the get brand use case.
type GetDrugUseCase
GetDrugUseCase implements the get drug operation.
type GetDrugUseCase struct {
// contains filtered or unexported fields
}func NewGetDrugUseCase
func NewGetDrugUseCase(repo ports.CatalogRepository) *GetDrugUseCaseNewGetDrugUseCase injects the catalog repository.
func (*GetDrugUseCase) Execute
func (uc *GetDrugUseCase) Execute(ctx context.Context, input medicinepublic.RecordInput) (*medicinepublic.Drug, error)Execute runs the get drug use case.
type GetGenericUseCase
GetGenericUseCase implements the get generic operation.
type GetGenericUseCase struct {
// contains filtered or unexported fields
}func NewGetGenericUseCase
func NewGetGenericUseCase(repo ports.CatalogRepository) *GetGenericUseCaseNewGetGenericUseCase injects the catalog repository.
func (*GetGenericUseCase) Execute
func (uc *GetGenericUseCase) Execute(ctx context.Context, input medicinepublic.RecordInput) (*medicinepublic.Generic, error)Execute runs the get generic use case.
type GetManufacturerUseCase
GetManufacturerUseCase implements the get manufacturer operation.
type GetManufacturerUseCase struct {
// contains filtered or unexported fields
}func NewGetManufacturerUseCase
func NewGetManufacturerUseCase(repo ports.CatalogRepository) *GetManufacturerUseCaseNewGetManufacturerUseCase injects the catalog repository.
func (*GetManufacturerUseCase) Execute
func (uc *GetManufacturerUseCase) Execute(ctx context.Context, input medicinepublic.RecordInput) (*medicinepublic.Manufacturer, error)Execute runs the get manufacturer use case.
type ListAdminBrandsUseCase
ListAdminBrandsUseCase implements the list admin brands operation.
type ListAdminBrandsUseCase struct {
// contains filtered or unexported fields
}func NewListAdminBrandsUseCase
func NewListAdminBrandsUseCase(repo ports.CatalogRepository) *ListAdminBrandsUseCaseNewListAdminBrandsUseCase injects the catalog repository.
func (*ListAdminBrandsUseCase) Execute
func (uc *ListAdminBrandsUseCase) Execute(ctx context.Context, input medicinepublic.ListInput) (*medicinepublic.Page[medicinepublic.Brand], error)Execute runs the list admin brands use case.
type ListAdminDrugsUseCase
ListAdminDrugsUseCase implements the list admin drugs operation.
type ListAdminDrugsUseCase struct {
// contains filtered or unexported fields
}func NewListAdminDrugsUseCase
func NewListAdminDrugsUseCase(repo ports.CatalogRepository) *ListAdminDrugsUseCaseNewListAdminDrugsUseCase injects the catalog repository.
func (*ListAdminDrugsUseCase) Execute
func (uc *ListAdminDrugsUseCase) Execute(ctx context.Context, input medicinepublic.ListInput) (*medicinepublic.Page[medicinepublic.Drug], error)Execute runs the list admin drugs use case.
type ListAdminGenericsUseCase
ListAdminGenericsUseCase implements the list admin generics operation.
type ListAdminGenericsUseCase struct {
// contains filtered or unexported fields
}func NewListAdminGenericsUseCase
func NewListAdminGenericsUseCase(repo ports.CatalogRepository) *ListAdminGenericsUseCaseNewListAdminGenericsUseCase injects the catalog repository.
func (*ListAdminGenericsUseCase) Execute
func (uc *ListAdminGenericsUseCase) Execute(ctx context.Context, input medicinepublic.ListInput) (*medicinepublic.Page[medicinepublic.Generic], error)Execute runs the list admin generics use case.
type ListAdminManufacturersUseCase
ListAdminManufacturersUseCase implements the list admin manufacturers operation.
type ListAdminManufacturersUseCase struct {
// contains filtered or unexported fields
}func NewListAdminManufacturersUseCase
func NewListAdminManufacturersUseCase(repo ports.CatalogRepository) *ListAdminManufacturersUseCaseNewListAdminManufacturersUseCase injects the catalog repository.
func (*ListAdminManufacturersUseCase) Execute
func (uc *ListAdminManufacturersUseCase) Execute(ctx context.Context, input medicinepublic.ListInput) (*medicinepublic.Page[medicinepublic.Manufacturer], error)Execute runs the list admin manufacturers use case.
type ListBrandsUseCase
ListBrandsUseCase implements the list brands operation.
type ListBrandsUseCase struct {
// contains filtered or unexported fields
}func NewListBrandsUseCase
func NewListBrandsUseCase(repo ports.CatalogRepository) *ListBrandsUseCaseNewListBrandsUseCase injects the catalog repository.
func (*ListBrandsUseCase) Execute
func (uc *ListBrandsUseCase) Execute(ctx context.Context, input medicinepublic.ListInput) (*medicinepublic.Page[medicinepublic.Brand], error)Execute runs the list brands use case.
type ListDrugsUseCase
ListDrugsUseCase implements the list drugs operation.
type ListDrugsUseCase struct {
// contains filtered or unexported fields
}func NewListDrugsUseCase
func NewListDrugsUseCase(repo ports.CatalogRepository) *ListDrugsUseCaseNewListDrugsUseCase injects the catalog repository.
func (*ListDrugsUseCase) Execute
func (uc *ListDrugsUseCase) Execute(ctx context.Context, input medicinepublic.ListInput) (*medicinepublic.Page[medicinepublic.Drug], error)Execute runs the list drugs use case.
type ListGenericsUseCase
ListGenericsUseCase implements the list generics operation.
type ListGenericsUseCase struct {
// contains filtered or unexported fields
}func NewListGenericsUseCase
func NewListGenericsUseCase(repo ports.CatalogRepository) *ListGenericsUseCaseNewListGenericsUseCase injects the catalog repository.
func (*ListGenericsUseCase) Execute
func (uc *ListGenericsUseCase) Execute(ctx context.Context, input medicinepublic.ListInput) (*medicinepublic.Page[medicinepublic.Generic], error)Execute runs the list generics use case.
type ListManufacturersUseCase
ListManufacturersUseCase implements the list manufacturers operation.
type ListManufacturersUseCase struct {
// contains filtered or unexported fields
}func NewListManufacturersUseCase
func NewListManufacturersUseCase(repo ports.CatalogRepository) *ListManufacturersUseCaseNewListManufacturersUseCase injects the catalog repository.
func (*ListManufacturersUseCase) Execute
func (uc *ListManufacturersUseCase) Execute(ctx context.Context, input medicinepublic.ListInput) (*medicinepublic.Page[medicinepublic.Manufacturer], error)Execute runs the list manufacturers use case.
type PatchBrandUseCase
PatchBrandUseCase implements the patch brand operation.
type PatchBrandUseCase struct {
// contains filtered or unexported fields
}func NewPatchBrandUseCase
func NewPatchBrandUseCase(repo ports.CatalogRepository) *PatchBrandUseCaseNewPatchBrandUseCase injects the catalog repository.
func (*PatchBrandUseCase) Execute
func (uc *PatchBrandUseCase) Execute(ctx context.Context, input medicinepublic.PatchBrandInput) (*medicinepublic.Brand, error)Execute runs the patch brand use case.
type PatchDrugUseCase
PatchDrugUseCase implements the patch drug operation.
type PatchDrugUseCase struct {
// contains filtered or unexported fields
}func NewPatchDrugUseCase
func NewPatchDrugUseCase(repo ports.CatalogRepository) *PatchDrugUseCaseNewPatchDrugUseCase injects the catalog repository.
func (*PatchDrugUseCase) Execute
func (uc *PatchDrugUseCase) Execute(ctx context.Context, input medicinepublic.PatchDrugInput) (*medicinepublic.Drug, error)Execute runs the patch drug use case.
type PatchGenericUseCase
PatchGenericUseCase implements the patch generic operation.
type PatchGenericUseCase struct {
// contains filtered or unexported fields
}func NewPatchGenericUseCase
func NewPatchGenericUseCase(repo ports.CatalogRepository) *PatchGenericUseCaseNewPatchGenericUseCase injects the catalog repository.
func (*PatchGenericUseCase) Execute
func (uc *PatchGenericUseCase) Execute(ctx context.Context, input medicinepublic.PatchGenericInput) (*medicinepublic.Generic, error)Execute runs the patch generic use case.
type PatchManufacturerUseCase
PatchManufacturerUseCase implements the patch manufacturer operation.
type PatchManufacturerUseCase struct {
// contains filtered or unexported fields
}func NewPatchManufacturerUseCase
func NewPatchManufacturerUseCase(repo ports.CatalogRepository) *PatchManufacturerUseCaseNewPatchManufacturerUseCase injects the catalog repository.
func (*PatchManufacturerUseCase) Execute
func (uc *PatchManufacturerUseCase) Execute(ctx context.Context, input medicinepublic.PatchManufacturerInput) (*medicinepublic.Manufacturer, error)Execute runs the patch manufacturer use case.
type RestoreBrandUseCase
RestoreBrandUseCase implements the restore brand operation.
type RestoreBrandUseCase struct {
// contains filtered or unexported fields
}func NewRestoreBrandUseCase
func NewRestoreBrandUseCase(repo ports.CatalogRepository) *RestoreBrandUseCaseNewRestoreBrandUseCase injects the catalog repository.
func (*RestoreBrandUseCase) Execute
func (uc *RestoreBrandUseCase) Execute(ctx context.Context, input medicinepublic.RecordInput) (*medicinepublic.Brand, error)Execute runs the restore brand use case.
type RestoreDrugUseCase
RestoreDrugUseCase implements the restore drug operation.
type RestoreDrugUseCase struct {
// contains filtered or unexported fields
}func NewRestoreDrugUseCase
func NewRestoreDrugUseCase(repo ports.CatalogRepository) *RestoreDrugUseCaseNewRestoreDrugUseCase injects the catalog repository.
func (*RestoreDrugUseCase) Execute
func (uc *RestoreDrugUseCase) Execute(ctx context.Context, input medicinepublic.RecordInput) (*medicinepublic.Drug, error)Execute runs the restore drug use case.
type RestoreGenericUseCase
RestoreGenericUseCase implements the restore generic operation.
type RestoreGenericUseCase struct {
// contains filtered or unexported fields
}func NewRestoreGenericUseCase
func NewRestoreGenericUseCase(repo ports.CatalogRepository) *RestoreGenericUseCaseNewRestoreGenericUseCase injects the catalog repository.
func (*RestoreGenericUseCase) Execute
func (uc *RestoreGenericUseCase) Execute(ctx context.Context, input medicinepublic.RecordInput) (*medicinepublic.Generic, error)Execute runs the restore generic use case.
type RestoreManufacturerUseCase
RestoreManufacturerUseCase implements the restore manufacturer operation.
type RestoreManufacturerUseCase struct {
// contains filtered or unexported fields
}func NewRestoreManufacturerUseCase
func NewRestoreManufacturerUseCase(repo ports.CatalogRepository) *RestoreManufacturerUseCaseNewRestoreManufacturerUseCase injects the catalog repository.
func (*RestoreManufacturerUseCase) Execute
func (uc *RestoreManufacturerUseCase) Execute(ctx context.Context, input medicinepublic.RecordInput) (*medicinepublic.Manufacturer, error)Execute runs the restore manufacturer use case.
Generated by gomarkdoc