biz

package
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 12, 2022 License: MIT Imports: 7 Imported by: 0

README

Biz

Documentation

Index

Constants

This section is empty.

Variables

View Source
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")
)
View Source
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")
)
View Source
var (
	// ErrUserNotFound is user not found.
	ErrUserNotFound = errors.NotFound(v1.ErrorReason_USER_NOT_FOUND.String(), "user not found")
)

ProviderSet is biz providers.

Functions

This section is empty.

Types

type Greeter

type Greeter struct {
	Hello string
}

Greeter is a Greeter model.

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

func (uc *GreeterUsecase) CreateGreeter(ctx context.Context, g *Greeter) (*Greeter, error)

CreateGreeter creates a Greeter, and returns the new Greeter.

type NotifyV1

type NotifyV1 struct {
	Id   uint64
	Task struct {
		TaskId string
	}
}

NotifyV1 is a NotifyV1 model.

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

func (uc *NotifyV1Usecase) CreateNotifyV1(ctx context.Context, n *NotifyV1) (*NotifyV1, error)

CreateNotifyV1 creates a Notify, and returns the new Notify.

func (*NotifyV1Usecase) CreateTaskJob

func (uc *NotifyV1Usecase) CreateTaskJob(ctx context.Context, n *NotifyV1) (*NotifyV1, error)

CreateTaskJob creates a TaskJob, and returns the new TaskJob.

func (*NotifyV1Usecase) DeleteTaskJob added in v0.0.2

func (uc *NotifyV1Usecase) DeleteTaskJob(ctx context.Context, n *NotifyV1) (*NotifyV1, error)

DeleteTaskJob delete a TaskJob, and returns the new TaskJob.

func (*NotifyV1Usecase) GetNotifyV1

func (uc *NotifyV1Usecase) GetNotifyV1(ctx context.Context, n *NotifyV1) (*NotifyV1, error)

GetNotifyV1 get a Notify, and returns the new Notify.

type NotifyV2

type NotifyV2 struct {
	Hello string
}

NotifyV2 is a NotifyV2 model.

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

func (uc *NotifyV2Usecase) CreateNotifyV2(ctx context.Context, n *NotifyV2) (*NotifyV2, error)

CreateNotifyV2 creates a Notify, and returns the new Notify.

func (*NotifyV2Usecase) CreateToDoJob

func (uc *NotifyV2Usecase) CreateToDoJob(ctx context.Context, n *NotifyV2) (*NotifyV2, error)

CreateToDoJob creates a ToDoJob, and returns the new ToDoJob.

func (*NotifyV2Usecase) DeleteToDoJob

func (uc *NotifyV2Usecase) DeleteToDoJob(ctx context.Context, todoJobId string) (*NotifyV2, error)

DeleteToDoJob delete a ToDoJob, and returns the new ToDoJob.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL