Documentation ¶
Index ¶
- func JpegToPng(pngdata []byte) ([]byte, error)
- type Voucher
- type VoucherBatch
- type VoucherDB
- func (v *VoucherDB) CreateNewVoucher(voubatch_id string, phonenumber string, customername string, code string) (voucher *Voucher, err error)
- func (v *VoucherDB) GetAllUnusedVoucherByPhoneNumber(voubatch_id string, phonenumber string) (vouchers []*Voucher, err error)
- func (v *VoucherDB) GetSingleVoucherByPhoneNumber(voubatch_id string, phonenumber string) (voucher *Voucher, err error)
- func (v *VoucherDB) GetVoucher(vou_id string) (*Voucher, error)
- func (v *VoucherDB) GetVoucherBatch(voubatch_id string) (*VoucherBatch, error)
- func (v *VoucherDB) GetVoucherByPhoneNumber(voubatch_id string, phonenumber string, code string) (voucher *Voucher, err error)
- func (v *VoucherDB) ParseMessage(msg string) *VoucherMessageIntent
- func (v *VoucherDB) VerifyBatchRequest(vb *VoucherBatch) (bool, error)
- func (v *VoucherDB) VerifyCode(code string) (string, bool)
- type VoucherMessageIntent
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Voucher ¶
type Voucher struct { Id string BatchId string IsActive bool IsUse bool AssignTo string AssignName string AssignCode string UsedBy string UsedDate string ExpiredDate time.Time Description string BrandId string HeaderLogoData []byte IconLogoData []byte No int Rmin int Rmax int Value float32 BatchCode string Type string }
func (*Voucher) CreateVoucherQrJPG ¶
func (*Voucher) CreateVoucherQrPNG ¶
func (*Voucher) CreateVoucherQrSvg ¶
type VoucherBatch ¶
type VoucherBatch struct { Id string Type *string BrandId *string Description *string Greeting *string CrmEventId *string DtStart time.Time DtEnd time.Time DtActive time.Time DtExpired time.Time Value float32 IsGenerated bool IsMultiple bool UseActivationCode bool // contains filtered or unexported fields }
type VoucherDB ¶
func NewVoucherDB ¶
func (*VoucherDB) CreateNewVoucher ¶
func (*VoucherDB) GetAllUnusedVoucherByPhoneNumber ¶
func (*VoucherDB) GetSingleVoucherByPhoneNumber ¶
func (*VoucherDB) GetVoucherBatch ¶
func (v *VoucherDB) GetVoucherBatch(voubatch_id string) (*VoucherBatch, error)
func (*VoucherDB) GetVoucherByPhoneNumber ¶
func (*VoucherDB) ParseMessage ¶
func (v *VoucherDB) ParseMessage(msg string) *VoucherMessageIntent
func (*VoucherDB) VerifyBatchRequest ¶
func (v *VoucherDB) VerifyBatchRequest(vb *VoucherBatch) (bool, error)
type VoucherMessageIntent ¶
type VoucherMessageIntent struct {
VoubatchId string
}
Click to show internal directories.
Click to hide internal directories.