Documentation ¶
Index ¶
- Variables
- type Greeter
- type GreeterRepo
- type GreeterUsecase
- type NotifyV1
- type NotifyV1Repo
- type NotifyV1Usecase
- func (uc *NotifyV1Usecase) CreateNotifyV1(ctx context.Context, n *NotifyV1) (*NotifyV1, error)
- func (uc *NotifyV1Usecase) CreateTaskJob(ctx context.Context, n *NotifyV1) (*NotifyV1, error)
- func (uc *NotifyV1Usecase) DeleteTaskJob(ctx context.Context, n *NotifyV1) (*NotifyV1, error)
- func (uc *NotifyV1Usecase) GetNotifyV1(ctx context.Context, n *NotifyV1) (*NotifyV1, error)
- type NotifyV2
- type NotifyV2Repo
- type NotifyV2Usecase
Constants ¶
This section is empty.
Variables ¶
var ( // ErrNotifyV1NotFound is notify not found. ErrNotifyV1NotFound = errors.NotFound(v1.ErrorReason_NOTIFY_NOT_FOUND.String(), "notify not found") ErrNotifyV1InternalServerError = errors.InternalServer(v1.ErrorReason_NOTIFY_INTERNAL_SERVER_ERROR.String(), "internal server error") )
var ( // ErrNotifyV2NotFound is notify not found. ErrNotifyV2NotFound = errors.NotFound(v2.ErrorReason_NOTIFY_NOT_FOUND.String(), "notify not found") ErrNotifyV2InternalServerError = errors.InternalServer(v2.ErrorReason_NOTIFY_INTERNAL_SERVER_ERROR.String(), "internal server error") )
var ( // ErrUserNotFound is user not found. ErrUserNotFound = errors.NotFound(v1.ErrorReason_USER_NOT_FOUND.String(), "user not found") )
var ProviderSet = wire.NewSet(NewGreeterUsecase, NewNotifyV1Usecase, NewNotifyV2Usecase)
ProviderSet is biz providers.
Functions ¶
This section is empty.
Types ¶
type GreeterRepo ¶
type GreeterRepo interface { Save(context.Context, *Greeter) (*Greeter, error) Update(context.Context, *Greeter) (*Greeter, error) FindByID(context.Context, int64) (*Greeter, error) ListByHello(context.Context, string) ([]*Greeter, error) ListAll(context.Context) ([]*Greeter, error) }
GreeterRepo is a Greater repo.
type GreeterUsecase ¶
type GreeterUsecase struct {
// contains filtered or unexported fields
}
GreeterUsecase is a Greeter usecase.
func NewGreeterUsecase ¶
func NewGreeterUsecase(repo GreeterRepo, logger log.Logger) *GreeterUsecase
NewGreeterUsecase new a Greeter usecase.
func (*GreeterUsecase) CreateGreeter ¶
CreateGreeter creates a Greeter, and returns the new Greeter.
type NotifyV1Repo ¶
type NotifyV1Repo interface { Create(context.Context, *NotifyV1) (*NotifyV1, error) Update(context.Context, *NotifyV1) (*NotifyV1, error) FindByID(context.Context, uint64) (*NotifyV1, error) DeleteByID(context.Context, uint64) (*NotifyV1, error) ListAll(context.Context) ([]*NotifyV1, error) CreateJob(context.Context, *NotifyV1) (*NotifyV1, error) DeleteJobByID(context.Context, string) (*NotifyV1, error) }
NotifyV1Repo is a NotifyV1 repo.
type NotifyV1Usecase ¶
type NotifyV1Usecase struct {
// contains filtered or unexported fields
}
NotifyV1Usecase is a Greeter usecase.
func NewNotifyV1Usecase ¶
func NewNotifyV1Usecase(repo NotifyV1Repo, logger log.Logger) *NotifyV1Usecase
NewNotifyV1Usecase new a Notify usecase.
func (*NotifyV1Usecase) CreateNotifyV1 ¶
CreateNotifyV1 creates a Notify, and returns the new Notify.
func (*NotifyV1Usecase) CreateTaskJob ¶
CreateTaskJob creates a TaskJob, and returns the new TaskJob.
func (*NotifyV1Usecase) DeleteTaskJob ¶ added in v0.0.2
DeleteTaskJob delete a TaskJob, and returns the new TaskJob.
func (*NotifyV1Usecase) GetNotifyV1 ¶
GetNotifyV1 get a Notify, and returns the new Notify.
type NotifyV2Repo ¶
type NotifyV2Repo interface { Create(context.Context, *NotifyV2) (*NotifyV2, error) Update(context.Context, *NotifyV2) (*NotifyV2, error) FindByID(context.Context, int64) (*NotifyV2, error) DeleteByID(context.Context, int64) (*NotifyV2, error) ListAll(context.Context) ([]*NotifyV2, error) CreateJob(context.Context, *NotifyV2) (*NotifyV2, error) DeleteJobByID(context.Context, string) (*NotifyV2, error) }
NotifyV2Repo is a NotifyV2 repo.
type NotifyV2Usecase ¶
type NotifyV2Usecase struct {
// contains filtered or unexported fields
}
NotifyV2Usecase is a Greeter usecase.
func NewNotifyV2Usecase ¶
func NewNotifyV2Usecase(repo NotifyV2Repo, logger log.Logger) *NotifyV2Usecase
NewNotifyV2Usecase new a Notify usecase.
func (*NotifyV2Usecase) CreateNotifyV2 ¶
CreateNotifyV2 creates a Notify, and returns the new Notify.
func (*NotifyV2Usecase) CreateToDoJob ¶
CreateToDoJob creates a ToDoJob, and returns the new ToDoJob.
func (*NotifyV2Usecase) DeleteToDoJob ¶
DeleteToDoJob delete a ToDoJob, and returns the new ToDoJob.