voucher

package
v0.0.0-...-37234c6 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultVoucherRepo

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

func (*DefaultVoucherRepo) GetVoucherByID

func (r *DefaultVoucherRepo) GetVoucherByID(id string) (*models.Voucher, error)

func (*DefaultVoucherRepo) GetVoucherRedeem

func (r *DefaultVoucherRepo) GetVoucherRedeem(userId uint, voucherId string) (*models.VoucherRedeem, error)

type VoucherRepo

type VoucherRepo interface {
	GetVoucherByID(id string) (*models.Voucher, error)
	GetVoucherRedeem(userId uint, voucherId string) (*models.VoucherRedeem, error)
}

func NewDefaultVoucherRepo

func NewDefaultVoucherRepo(db *gorm.DB) VoucherRepo

Jump to

Keyboard shortcuts

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