Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OrgUsecase ¶
type OrgUsecase interface {
Create(ctx context.Context, request dto.CreateOrgReq) (*domains.Org, error)
GetByID(ctx context.Context, id int64) (*domains.Org, error)
Fetch(ctx context.Context, req dto.SearchOrgsReq) ([]*domains.Org, int64, error)
Update(ctx context.Context, id int64, request dto.UpdateOrgReq) error
Delete(ctx context.Context, id int64) error
Invite(ctx context.Context, id int64, request dto.InviteUsers) error
}
OrgUsecase represent the org's usecase contract
func NewOrgUsecase ¶
func NewOrgUsecase( orgRepo repositories.OrgRepository, userOrgRepo repositories.UserOrgRepository, sqlxTrans *sqlTools.SqlxTransaction, ) OrgUsecase
NewOrgUsecase will create new an orgUsecase object representation of OrgUsecase interface
type UserUsecase ¶
type UserUsecase interface {
Create(ctx context.Context, request dto.CreateUserReq) (*domains.User, error)
GetByID(ctx context.Context, id int64) (*domains.User, error)
Fetch(ctx context.Context, req dto.SearchUsersReq) ([]*domains.User, int64, error)
Update(ctx context.Context, id int64, request dto.UpdateUserReq) error
Delete(ctx context.Context, id int64) error
GetByCode(ctx context.Context, code string) (*domains.User, error)
GetByEmail(ctx context.Context, email string) (*domains.User, error)
Register(ctx context.Context, request dto.CreateUserReq) (*domains.User, error)
}
UserUsecase represent the user's usecase contract
func NewUserUsecase ¶
func NewUserUsecase(userRepo repositories.UserRepository, orgUsecase OrgUsecase) UserUsecase
NewUserUsecase will create new an userUsecase object representation of UserUsecase interface
Click to show internal directories.
Click to hide internal directories.