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