Skip to content

usecase ​

go
import "github.com/prescriptoo/prescriptoo-api/services/medicine/internal/usecase"

Package usecase implements medicine catalog queries and lifecycle commands.

Index ​

type CreateBrandUseCase ​

CreateBrandUseCase implements the create brand operation.

go
type CreateBrandUseCase struct {
    // contains filtered or unexported fields
}

func NewCreateBrandUseCase ​

go
func NewCreateBrandUseCase(repo ports.CatalogRepository) *CreateBrandUseCase

NewCreateBrandUseCase injects the catalog repository.

func (*CreateBrandUseCase) Execute ​

go
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.

go
type CreateDrugUseCase struct {
    // contains filtered or unexported fields
}

func NewCreateDrugUseCase ​

go
func NewCreateDrugUseCase(repo ports.CatalogRepository) *CreateDrugUseCase

NewCreateDrugUseCase injects the catalog repository.

func (*CreateDrugUseCase) Execute ​

go
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.

go
type CreateGenericUseCase struct {
    // contains filtered or unexported fields
}

func NewCreateGenericUseCase ​

go
func NewCreateGenericUseCase(repo ports.CatalogRepository) *CreateGenericUseCase

NewCreateGenericUseCase injects the catalog repository.

func (*CreateGenericUseCase) Execute ​

go
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.

go
type CreateManufacturerUseCase struct {
    // contains filtered or unexported fields
}

func NewCreateManufacturerUseCase ​

go
func NewCreateManufacturerUseCase(repo ports.CatalogRepository) *CreateManufacturerUseCase

NewCreateManufacturerUseCase injects the catalog repository.

func (*CreateManufacturerUseCase) Execute ​

go
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.

go
type DeleteBrandUseCase struct {
    // contains filtered or unexported fields
}

func NewDeleteBrandUseCase ​

go
func NewDeleteBrandUseCase(repo ports.CatalogRepository) *DeleteBrandUseCase

NewDeleteBrandUseCase injects the catalog repository.

func (*DeleteBrandUseCase) Execute ​

go
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.

go
type DeleteDrugUseCase struct {
    // contains filtered or unexported fields
}

func NewDeleteDrugUseCase ​

go
func NewDeleteDrugUseCase(repo ports.CatalogRepository) *DeleteDrugUseCase

NewDeleteDrugUseCase injects the catalog repository.

func (*DeleteDrugUseCase) Execute ​

go
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.

go
type DeleteGenericUseCase struct {
    // contains filtered or unexported fields
}

func NewDeleteGenericUseCase ​

go
func NewDeleteGenericUseCase(repo ports.CatalogRepository) *DeleteGenericUseCase

NewDeleteGenericUseCase injects the catalog repository.

func (*DeleteGenericUseCase) Execute ​

go
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.

go
type DeleteManufacturerUseCase struct {
    // contains filtered or unexported fields
}

func NewDeleteManufacturerUseCase ​

go
func NewDeleteManufacturerUseCase(repo ports.CatalogRepository) *DeleteManufacturerUseCase

NewDeleteManufacturerUseCase injects the catalog repository.

func (*DeleteManufacturerUseCase) Execute ​

go
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.

go
type GetAdminBrandUseCase struct {
    // contains filtered or unexported fields
}

func NewGetAdminBrandUseCase ​

go
func NewGetAdminBrandUseCase(repo ports.CatalogRepository) *GetAdminBrandUseCase

NewGetAdminBrandUseCase injects the catalog repository.

func (*GetAdminBrandUseCase) Execute ​

go
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.

go
type GetAdminDrugUseCase struct {
    // contains filtered or unexported fields
}

func NewGetAdminDrugUseCase ​

go
func NewGetAdminDrugUseCase(repo ports.CatalogRepository) *GetAdminDrugUseCase

NewGetAdminDrugUseCase injects the catalog repository.

func (*GetAdminDrugUseCase) Execute ​

go
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.

go
type GetAdminGenericUseCase struct {
    // contains filtered or unexported fields
}

func NewGetAdminGenericUseCase ​

go
func NewGetAdminGenericUseCase(repo ports.CatalogRepository) *GetAdminGenericUseCase

NewGetAdminGenericUseCase injects the catalog repository.

func (*GetAdminGenericUseCase) Execute ​

go
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.

go
type GetAdminManufacturerUseCase struct {
    // contains filtered or unexported fields
}

func NewGetAdminManufacturerUseCase ​

go
func NewGetAdminManufacturerUseCase(repo ports.CatalogRepository) *GetAdminManufacturerUseCase

NewGetAdminManufacturerUseCase injects the catalog repository.

func (*GetAdminManufacturerUseCase) Execute ​

go
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.

go
type GetBrandUseCase struct {
    // contains filtered or unexported fields
}

func NewGetBrandUseCase ​

go
func NewGetBrandUseCase(repo ports.CatalogRepository) *GetBrandUseCase

NewGetBrandUseCase injects the catalog repository.

func (*GetBrandUseCase) Execute ​

go
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.

go
type GetDrugUseCase struct {
    // contains filtered or unexported fields
}

func NewGetDrugUseCase ​

go
func NewGetDrugUseCase(repo ports.CatalogRepository) *GetDrugUseCase

NewGetDrugUseCase injects the catalog repository.

func (*GetDrugUseCase) Execute ​

go
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.

go
type GetGenericUseCase struct {
    // contains filtered or unexported fields
}

func NewGetGenericUseCase ​

go
func NewGetGenericUseCase(repo ports.CatalogRepository) *GetGenericUseCase

NewGetGenericUseCase injects the catalog repository.

func (*GetGenericUseCase) Execute ​

go
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.

go
type GetManufacturerUseCase struct {
    // contains filtered or unexported fields
}

func NewGetManufacturerUseCase ​

go
func NewGetManufacturerUseCase(repo ports.CatalogRepository) *GetManufacturerUseCase

NewGetManufacturerUseCase injects the catalog repository.

func (*GetManufacturerUseCase) Execute ​

go
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.

go
type ListAdminBrandsUseCase struct {
    // contains filtered or unexported fields
}

func NewListAdminBrandsUseCase ​

go
func NewListAdminBrandsUseCase(repo ports.CatalogRepository) *ListAdminBrandsUseCase

NewListAdminBrandsUseCase injects the catalog repository.

func (*ListAdminBrandsUseCase) Execute ​

go
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.

go
type ListAdminDrugsUseCase struct {
    // contains filtered or unexported fields
}

func NewListAdminDrugsUseCase ​

go
func NewListAdminDrugsUseCase(repo ports.CatalogRepository) *ListAdminDrugsUseCase

NewListAdminDrugsUseCase injects the catalog repository.

func (*ListAdminDrugsUseCase) Execute ​

go
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.

go
type ListAdminGenericsUseCase struct {
    // contains filtered or unexported fields
}

func NewListAdminGenericsUseCase ​

go
func NewListAdminGenericsUseCase(repo ports.CatalogRepository) *ListAdminGenericsUseCase

NewListAdminGenericsUseCase injects the catalog repository.

func (*ListAdminGenericsUseCase) Execute ​

go
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.

go
type ListAdminManufacturersUseCase struct {
    // contains filtered or unexported fields
}

func NewListAdminManufacturersUseCase ​

go
func NewListAdminManufacturersUseCase(repo ports.CatalogRepository) *ListAdminManufacturersUseCase

NewListAdminManufacturersUseCase injects the catalog repository.

func (*ListAdminManufacturersUseCase) Execute ​

go
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.

go
type ListBrandsUseCase struct {
    // contains filtered or unexported fields
}

func NewListBrandsUseCase ​

go
func NewListBrandsUseCase(repo ports.CatalogRepository) *ListBrandsUseCase

NewListBrandsUseCase injects the catalog repository.

func (*ListBrandsUseCase) Execute ​

go
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.

go
type ListDrugsUseCase struct {
    // contains filtered or unexported fields
}

func NewListDrugsUseCase ​

go
func NewListDrugsUseCase(repo ports.CatalogRepository) *ListDrugsUseCase

NewListDrugsUseCase injects the catalog repository.

func (*ListDrugsUseCase) Execute ​

go
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.

go
type ListGenericsUseCase struct {
    // contains filtered or unexported fields
}

func NewListGenericsUseCase ​

go
func NewListGenericsUseCase(repo ports.CatalogRepository) *ListGenericsUseCase

NewListGenericsUseCase injects the catalog repository.

func (*ListGenericsUseCase) Execute ​

go
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.

go
type ListManufacturersUseCase struct {
    // contains filtered or unexported fields
}

func NewListManufacturersUseCase ​

go
func NewListManufacturersUseCase(repo ports.CatalogRepository) *ListManufacturersUseCase

NewListManufacturersUseCase injects the catalog repository.

func (*ListManufacturersUseCase) Execute ​

go
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.

go
type PatchBrandUseCase struct {
    // contains filtered or unexported fields
}

func NewPatchBrandUseCase ​

go
func NewPatchBrandUseCase(repo ports.CatalogRepository) *PatchBrandUseCase

NewPatchBrandUseCase injects the catalog repository.

func (*PatchBrandUseCase) Execute ​

go
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.

go
type PatchDrugUseCase struct {
    // contains filtered or unexported fields
}

func NewPatchDrugUseCase ​

go
func NewPatchDrugUseCase(repo ports.CatalogRepository) *PatchDrugUseCase

NewPatchDrugUseCase injects the catalog repository.

func (*PatchDrugUseCase) Execute ​

go
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.

go
type PatchGenericUseCase struct {
    // contains filtered or unexported fields
}

func NewPatchGenericUseCase ​

go
func NewPatchGenericUseCase(repo ports.CatalogRepository) *PatchGenericUseCase

NewPatchGenericUseCase injects the catalog repository.

func (*PatchGenericUseCase) Execute ​

go
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.

go
type PatchManufacturerUseCase struct {
    // contains filtered or unexported fields
}

func NewPatchManufacturerUseCase ​

go
func NewPatchManufacturerUseCase(repo ports.CatalogRepository) *PatchManufacturerUseCase

NewPatchManufacturerUseCase injects the catalog repository.

func (*PatchManufacturerUseCase) Execute ​

go
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.

go
type RestoreBrandUseCase struct {
    // contains filtered or unexported fields
}

func NewRestoreBrandUseCase ​

go
func NewRestoreBrandUseCase(repo ports.CatalogRepository) *RestoreBrandUseCase

NewRestoreBrandUseCase injects the catalog repository.

func (*RestoreBrandUseCase) Execute ​

go
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.

go
type RestoreDrugUseCase struct {
    // contains filtered or unexported fields
}

func NewRestoreDrugUseCase ​

go
func NewRestoreDrugUseCase(repo ports.CatalogRepository) *RestoreDrugUseCase

NewRestoreDrugUseCase injects the catalog repository.

func (*RestoreDrugUseCase) Execute ​

go
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.

go
type RestoreGenericUseCase struct {
    // contains filtered or unexported fields
}

func NewRestoreGenericUseCase ​

go
func NewRestoreGenericUseCase(repo ports.CatalogRepository) *RestoreGenericUseCase

NewRestoreGenericUseCase injects the catalog repository.

func (*RestoreGenericUseCase) Execute ​

go
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.

go
type RestoreManufacturerUseCase struct {
    // contains filtered or unexported fields
}

func NewRestoreManufacturerUseCase ​

go
func NewRestoreManufacturerUseCase(repo ports.CatalogRepository) *RestoreManufacturerUseCase

NewRestoreManufacturerUseCase injects the catalog repository.

func (*RestoreManufacturerUseCase) Execute ​

go
func (uc *RestoreManufacturerUseCase) Execute(ctx context.Context, input medicinepublic.RecordInput) (*medicinepublic.Manufacturer, error)

Execute runs the restore manufacturer use case.

Generated by gomarkdoc

Documentation follows the source. Planned contracts are marked explicitly.