handler

package
v0.0.0-...-94edc7f Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	*User
	*Voucher
}

func New

func New(user *User, voucher *Voucher) *Handler

type User

type User struct {
	// contains filtered or unexported fields
}

func NewUser

func NewUser(svc UserService) *User

func (*User) CreateUser

func (h *User) CreateUser(ctx echo.Context) error

func (*User) GetUserById

func (h *User) GetUserById(ctx echo.Context, id int64) error

type UserService

type UserService interface {
	GetByID(ctx context.Context, id int64) (*model.User, error)
	Create(ctx context.Context, user *model.User) (*model.User, error)
}

type Voucher

type Voucher struct {
	// contains filtered or unexported fields
}

func NewVoucher

func NewVoucher(svc VoucherService) *Voucher

func (*Voucher) SearchVoucher

func (h *Voucher) SearchVoucher(ctx echo.Context, params genv1.SearchVoucherParams) error

type VoucherService

type VoucherService interface {
	Search(ctx context.Context, userID int64) (*model.Voucher, error)
}

Jump to

Keyboard shortcuts

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