1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491 |
- // Code generated by protoc-gen-gogo. DO NOT EDIT.
- // source: app/service/main/coupon/api/api.proto
- /*
- Package v1 is a generated protocol buffer package.
- use {app_id}.{version} as package name
- It is generated from these files:
- app/service/main/coupon/api/api.proto
- It has these top-level messages:
- CaptchaTokenReq
- CaptchaTokenReply
- UseCouponCodeReq
- UseCouponCodeResp
- UsableAllowanceCouponV2Req
- ModelPriceInfo
- UsableAllowanceCouponV2Reply
- ModelCouponAllowancePanelInfo
- */
- package v1
- import proto "github.com/gogo/protobuf/proto"
- import fmt "fmt"
- import math "math"
- import _ "github.com/gogo/protobuf/gogoproto"
- import context "golang.org/x/net/context"
- import grpc "google.golang.org/grpc"
- import binary "encoding/binary"
- import io "io"
- // Reference imports to suppress errors if they are not otherwise used.
- var _ = proto.Marshal
- var _ = fmt.Errorf
- var _ = math.Inf
- // This is a compile-time assertion to ensure that this generated file
- // is compatible with the proto package it is being compiled against.
- // A compilation error at this line likely means your copy of the
- // proto package needs to be updated.
- const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
- type CaptchaTokenReq struct {
- Ip string `protobuf:"bytes,1,opt,name=ip,proto3" json:"ip,omitempty"`
- }
- func (m *CaptchaTokenReq) Reset() { *m = CaptchaTokenReq{} }
- func (m *CaptchaTokenReq) String() string { return proto.CompactTextString(m) }
- func (*CaptchaTokenReq) ProtoMessage() {}
- func (*CaptchaTokenReq) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{0} }
- func (m *CaptchaTokenReq) GetIp() string {
- if m != nil {
- return m.Ip
- }
- return ""
- }
- type CaptchaTokenReply struct {
- Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
- Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"`
- }
- func (m *CaptchaTokenReply) Reset() { *m = CaptchaTokenReply{} }
- func (m *CaptchaTokenReply) String() string { return proto.CompactTextString(m) }
- func (*CaptchaTokenReply) ProtoMessage() {}
- func (*CaptchaTokenReply) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{1} }
- func (m *CaptchaTokenReply) GetToken() string {
- if m != nil {
- return m.Token
- }
- return ""
- }
- func (m *CaptchaTokenReply) GetUrl() string {
- if m != nil {
- return m.Url
- }
- return ""
- }
- type UseCouponCodeReq struct {
- Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
- Code string `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"`
- Verify string `protobuf:"bytes,3,opt,name=verify,proto3" json:"verify,omitempty"`
- Ip string `protobuf:"bytes,4,opt,name=ip,proto3" json:"ip,omitempty"`
- Mid int64 `protobuf:"varint,5,opt,name=mid,proto3" json:"mid,omitempty"`
- }
- func (m *UseCouponCodeReq) Reset() { *m = UseCouponCodeReq{} }
- func (m *UseCouponCodeReq) String() string { return proto.CompactTextString(m) }
- func (*UseCouponCodeReq) ProtoMessage() {}
- func (*UseCouponCodeReq) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{2} }
- func (m *UseCouponCodeReq) GetToken() string {
- if m != nil {
- return m.Token
- }
- return ""
- }
- func (m *UseCouponCodeReq) GetCode() string {
- if m != nil {
- return m.Code
- }
- return ""
- }
- func (m *UseCouponCodeReq) GetVerify() string {
- if m != nil {
- return m.Verify
- }
- return ""
- }
- func (m *UseCouponCodeReq) GetIp() string {
- if m != nil {
- return m.Ip
- }
- return ""
- }
- func (m *UseCouponCodeReq) GetMid() int64 {
- if m != nil {
- return m.Mid
- }
- return 0
- }
- type UseCouponCodeResp struct {
- CouponToken string `protobuf:"bytes,1,opt,name=coupon_token,json=couponToken,proto3" json:"coupon_token,omitempty"`
- CouponAmount float64 `protobuf:"fixed64,2,opt,name=coupon_amount,json=couponAmount,proto3" json:"coupon_amount,omitempty"`
- FullAmount float64 `protobuf:"fixed64,3,opt,name=full_amount,json=fullAmount,proto3" json:"full_amount,omitempty"`
- PlatfromLimitExplain string `protobuf:"bytes,4,opt,name=platfrom_limit_explain,json=platfromLimitExplain,proto3" json:"platfrom_limit_explain,omitempty"`
- ProductLimitMonth int32 `protobuf:"varint,5,opt,name=product_limit_month,json=productLimitMonth,proto3" json:"product_limit_month,omitempty"`
- ProductLimitRenewal int32 `protobuf:"varint,6,opt,name=product_limit_renewal,json=productLimitRenewal,proto3" json:"product_limit_renewal,omitempty"`
- }
- func (m *UseCouponCodeResp) Reset() { *m = UseCouponCodeResp{} }
- func (m *UseCouponCodeResp) String() string { return proto.CompactTextString(m) }
- func (*UseCouponCodeResp) ProtoMessage() {}
- func (*UseCouponCodeResp) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{3} }
- func (m *UseCouponCodeResp) GetCouponToken() string {
- if m != nil {
- return m.CouponToken
- }
- return ""
- }
- func (m *UseCouponCodeResp) GetCouponAmount() float64 {
- if m != nil {
- return m.CouponAmount
- }
- return 0
- }
- func (m *UseCouponCodeResp) GetFullAmount() float64 {
- if m != nil {
- return m.FullAmount
- }
- return 0
- }
- func (m *UseCouponCodeResp) GetPlatfromLimitExplain() string {
- if m != nil {
- return m.PlatfromLimitExplain
- }
- return ""
- }
- func (m *UseCouponCodeResp) GetProductLimitMonth() int32 {
- if m != nil {
- return m.ProductLimitMonth
- }
- return 0
- }
- func (m *UseCouponCodeResp) GetProductLimitRenewal() int32 {
- if m != nil {
- return m.ProductLimitRenewal
- }
- return 0
- }
- type UsableAllowanceCouponV2Req struct {
- Mid int64 `protobuf:"varint,1,opt,name=mid,proto3" json:"mid,omitempty"`
- PriceInfo []*ModelPriceInfo `protobuf:"bytes,2,rep,name=priceInfo" json:"priceInfo,omitempty"`
- }
- func (m *UsableAllowanceCouponV2Req) Reset() { *m = UsableAllowanceCouponV2Req{} }
- func (m *UsableAllowanceCouponV2Req) String() string { return proto.CompactTextString(m) }
- func (*UsableAllowanceCouponV2Req) ProtoMessage() {}
- func (*UsableAllowanceCouponV2Req) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{4} }
- func (m *UsableAllowanceCouponV2Req) GetMid() int64 {
- if m != nil {
- return m.Mid
- }
- return 0
- }
- func (m *UsableAllowanceCouponV2Req) GetPriceInfo() []*ModelPriceInfo {
- if m != nil {
- return m.PriceInfo
- }
- return nil
- }
- type ModelPriceInfo struct {
- Price float64 `protobuf:"fixed64,1,opt,name=price,proto3" json:"price,omitempty"`
- Plat int64 `protobuf:"varint,2,opt,name=plat,proto3" json:"plat,omitempty"`
- ProdLimMonth int32 `protobuf:"varint,3,opt,name=prodLimMonth,proto3" json:"prodLimMonth,omitempty"`
- ProdLimRenewal int32 `protobuf:"varint,4,opt,name=prodLimRenewal,proto3" json:"prodLimRenewal,omitempty"`
- }
- func (m *ModelPriceInfo) Reset() { *m = ModelPriceInfo{} }
- func (m *ModelPriceInfo) String() string { return proto.CompactTextString(m) }
- func (*ModelPriceInfo) ProtoMessage() {}
- func (*ModelPriceInfo) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{5} }
- func (m *ModelPriceInfo) GetPrice() float64 {
- if m != nil {
- return m.Price
- }
- return 0
- }
- func (m *ModelPriceInfo) GetPlat() int64 {
- if m != nil {
- return m.Plat
- }
- return 0
- }
- func (m *ModelPriceInfo) GetProdLimMonth() int32 {
- if m != nil {
- return m.ProdLimMonth
- }
- return 0
- }
- func (m *ModelPriceInfo) GetProdLimRenewal() int32 {
- if m != nil {
- return m.ProdLimRenewal
- }
- return 0
- }
- type UsableAllowanceCouponV2Reply struct {
- CouponTip string `protobuf:"bytes,1,opt,name=coupon_tip,json=couponTip,proto3" json:"coupon_tip,omitempty"`
- CouponInfo *ModelCouponAllowancePanelInfo `protobuf:"bytes,2,opt,name=coupon_info,json=couponInfo" json:"coupon_info,omitempty"`
- }
- func (m *UsableAllowanceCouponV2Reply) Reset() { *m = UsableAllowanceCouponV2Reply{} }
- func (m *UsableAllowanceCouponV2Reply) String() string { return proto.CompactTextString(m) }
- func (*UsableAllowanceCouponV2Reply) ProtoMessage() {}
- func (*UsableAllowanceCouponV2Reply) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{6} }
- func (m *UsableAllowanceCouponV2Reply) GetCouponTip() string {
- if m != nil {
- return m.CouponTip
- }
- return ""
- }
- func (m *UsableAllowanceCouponV2Reply) GetCouponInfo() *ModelCouponAllowancePanelInfo {
- if m != nil {
- return m.CouponInfo
- }
- return nil
- }
- type ModelCouponAllowancePanelInfo struct {
- CouponToken string `protobuf:"bytes,1,opt,name=coupon_token,json=couponToken,proto3" json:"coupon_token,omitempty"`
- CouponAmount float64 `protobuf:"fixed64,2,opt,name=coupon_amount,json=couponAmount,proto3" json:"coupon_amount,omitempty"`
- State int32 `protobuf:"varint,3,opt,name=state,proto3" json:"state,omitempty"`
- FullLimitExplain string `protobuf:"bytes,4,opt,name=full_limit_explain,json=fullLimitExplain,proto3" json:"full_limit_explain,omitempty"`
- ScopeExplain string `protobuf:"bytes,5,opt,name=scope_explain,json=scopeExplain,proto3" json:"scope_explain,omitempty"`
- FullAmount float64 `protobuf:"fixed64,6,opt,name=full_amount,json=fullAmount,proto3" json:"full_amount,omitempty"`
- CouponDiscountPrice float64 `protobuf:"fixed64,7,opt,name=coupon_discount_price,json=couponDiscountPrice,proto3" json:"coupon_discount_price,omitempty"`
- StartTime int64 `protobuf:"varint,8,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"`
- ExpireTime int64 `protobuf:"varint,9,opt,name=expire_time,json=expireTime,proto3" json:"expire_time,omitempty"`
- Selected int32 `protobuf:"varint,10,opt,name=selected,proto3" json:"selected,omitempty"`
- DisablesExplains string `protobuf:"bytes,11,opt,name=disables_explains,json=disablesExplains,proto3" json:"disables_explains,omitempty"`
- OrderNo string `protobuf:"bytes,12,opt,name=order_no,json=orderNo,proto3" json:"order_no,omitempty"`
- Name string `protobuf:"bytes,13,opt,name=name,proto3" json:"name,omitempty"`
- Usable int32 `protobuf:"varint,14,opt,name=usable,proto3" json:"usable,omitempty"`
- }
- func (m *ModelCouponAllowancePanelInfo) Reset() { *m = ModelCouponAllowancePanelInfo{} }
- func (m *ModelCouponAllowancePanelInfo) String() string { return proto.CompactTextString(m) }
- func (*ModelCouponAllowancePanelInfo) ProtoMessage() {}
- func (*ModelCouponAllowancePanelInfo) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{7} }
- func (m *ModelCouponAllowancePanelInfo) GetCouponToken() string {
- if m != nil {
- return m.CouponToken
- }
- return ""
- }
- func (m *ModelCouponAllowancePanelInfo) GetCouponAmount() float64 {
- if m != nil {
- return m.CouponAmount
- }
- return 0
- }
- func (m *ModelCouponAllowancePanelInfo) GetState() int32 {
- if m != nil {
- return m.State
- }
- return 0
- }
- func (m *ModelCouponAllowancePanelInfo) GetFullLimitExplain() string {
- if m != nil {
- return m.FullLimitExplain
- }
- return ""
- }
- func (m *ModelCouponAllowancePanelInfo) GetScopeExplain() string {
- if m != nil {
- return m.ScopeExplain
- }
- return ""
- }
- func (m *ModelCouponAllowancePanelInfo) GetFullAmount() float64 {
- if m != nil {
- return m.FullAmount
- }
- return 0
- }
- func (m *ModelCouponAllowancePanelInfo) GetCouponDiscountPrice() float64 {
- if m != nil {
- return m.CouponDiscountPrice
- }
- return 0
- }
- func (m *ModelCouponAllowancePanelInfo) GetStartTime() int64 {
- if m != nil {
- return m.StartTime
- }
- return 0
- }
- func (m *ModelCouponAllowancePanelInfo) GetExpireTime() int64 {
- if m != nil {
- return m.ExpireTime
- }
- return 0
- }
- func (m *ModelCouponAllowancePanelInfo) GetSelected() int32 {
- if m != nil {
- return m.Selected
- }
- return 0
- }
- func (m *ModelCouponAllowancePanelInfo) GetDisablesExplains() string {
- if m != nil {
- return m.DisablesExplains
- }
- return ""
- }
- func (m *ModelCouponAllowancePanelInfo) GetOrderNo() string {
- if m != nil {
- return m.OrderNo
- }
- return ""
- }
- func (m *ModelCouponAllowancePanelInfo) GetName() string {
- if m != nil {
- return m.Name
- }
- return ""
- }
- func (m *ModelCouponAllowancePanelInfo) GetUsable() int32 {
- if m != nil {
- return m.Usable
- }
- return 0
- }
- func init() {
- proto.RegisterType((*CaptchaTokenReq)(nil), "account.coupon.CaptchaTokenReq")
- proto.RegisterType((*CaptchaTokenReply)(nil), "account.coupon.CaptchaTokenReply")
- proto.RegisterType((*UseCouponCodeReq)(nil), "account.coupon.UseCouponCodeReq")
- proto.RegisterType((*UseCouponCodeResp)(nil), "account.coupon.UseCouponCodeResp")
- proto.RegisterType((*UsableAllowanceCouponV2Req)(nil), "account.coupon.UsableAllowanceCouponV2Req")
- proto.RegisterType((*ModelPriceInfo)(nil), "account.coupon.ModelPriceInfo")
- proto.RegisterType((*UsableAllowanceCouponV2Reply)(nil), "account.coupon.UsableAllowanceCouponV2Reply")
- proto.RegisterType((*ModelCouponAllowancePanelInfo)(nil), "account.coupon.ModelCouponAllowancePanelInfo")
- }
- // Reference imports to suppress errors if they are not otherwise used.
- var _ context.Context
- var _ grpc.ClientConn
- // This is a compile-time assertion to ensure that this generated file
- // is compatible with the grpc package it is being compiled against.
- const _ = grpc.SupportPackageIsVersion4
- // Client API for Coupon service
- type CouponClient interface {
- // CaptchaToken captcha token.
- CaptchaToken(ctx context.Context, in *CaptchaTokenReq, opts ...grpc.CallOption) (*CaptchaTokenReply, error)
- // UseCouponCode use coupon code.
- UseCouponCode(ctx context.Context, in *UseCouponCodeReq, opts ...grpc.CallOption) (*UseCouponCodeResp, error)
- // UsableAllowanceCouponV2 use allowance coupon v2.
- UsableAllowanceCouponV2(ctx context.Context, in *UsableAllowanceCouponV2Req, opts ...grpc.CallOption) (*UsableAllowanceCouponV2Reply, error)
- }
- type couponClient struct {
- cc *grpc.ClientConn
- }
- func NewCouponClient(cc *grpc.ClientConn) CouponClient {
- return &couponClient{cc}
- }
- func (c *couponClient) CaptchaToken(ctx context.Context, in *CaptchaTokenReq, opts ...grpc.CallOption) (*CaptchaTokenReply, error) {
- out := new(CaptchaTokenReply)
- err := grpc.Invoke(ctx, "/account.coupon.Coupon/CaptchaToken", in, out, c.cc, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *couponClient) UseCouponCode(ctx context.Context, in *UseCouponCodeReq, opts ...grpc.CallOption) (*UseCouponCodeResp, error) {
- out := new(UseCouponCodeResp)
- err := grpc.Invoke(ctx, "/account.coupon.Coupon/UseCouponCode", in, out, c.cc, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *couponClient) UsableAllowanceCouponV2(ctx context.Context, in *UsableAllowanceCouponV2Req, opts ...grpc.CallOption) (*UsableAllowanceCouponV2Reply, error) {
- out := new(UsableAllowanceCouponV2Reply)
- err := grpc.Invoke(ctx, "/account.coupon.Coupon/UsableAllowanceCouponV2", in, out, c.cc, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- // Server API for Coupon service
- type CouponServer interface {
- // CaptchaToken captcha token.
- CaptchaToken(context.Context, *CaptchaTokenReq) (*CaptchaTokenReply, error)
- // UseCouponCode use coupon code.
- UseCouponCode(context.Context, *UseCouponCodeReq) (*UseCouponCodeResp, error)
- // UsableAllowanceCouponV2 use allowance coupon v2.
- UsableAllowanceCouponV2(context.Context, *UsableAllowanceCouponV2Req) (*UsableAllowanceCouponV2Reply, error)
- }
- func RegisterCouponServer(s *grpc.Server, srv CouponServer) {
- s.RegisterService(&_Coupon_serviceDesc, srv)
- }
- func _Coupon_CaptchaToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(CaptchaTokenReq)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(CouponServer).CaptchaToken(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/account.coupon.Coupon/CaptchaToken",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(CouponServer).CaptchaToken(ctx, req.(*CaptchaTokenReq))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _Coupon_UseCouponCode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(UseCouponCodeReq)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(CouponServer).UseCouponCode(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/account.coupon.Coupon/UseCouponCode",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(CouponServer).UseCouponCode(ctx, req.(*UseCouponCodeReq))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _Coupon_UsableAllowanceCouponV2_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(UsableAllowanceCouponV2Req)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(CouponServer).UsableAllowanceCouponV2(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/account.coupon.Coupon/UsableAllowanceCouponV2",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(CouponServer).UsableAllowanceCouponV2(ctx, req.(*UsableAllowanceCouponV2Req))
- }
- return interceptor(ctx, in, info, handler)
- }
- var _Coupon_serviceDesc = grpc.ServiceDesc{
- ServiceName: "account.coupon.Coupon",
- HandlerType: (*CouponServer)(nil),
- Methods: []grpc.MethodDesc{
- {
- MethodName: "CaptchaToken",
- Handler: _Coupon_CaptchaToken_Handler,
- },
- {
- MethodName: "UseCouponCode",
- Handler: _Coupon_UseCouponCode_Handler,
- },
- {
- MethodName: "UsableAllowanceCouponV2",
- Handler: _Coupon_UsableAllowanceCouponV2_Handler,
- },
- },
- Streams: []grpc.StreamDesc{},
- Metadata: "app/service/main/coupon/api/api.proto",
- }
- func (m *CaptchaTokenReq) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
- }
- func (m *CaptchaTokenReq) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if len(m.Ip) > 0 {
- dAtA[i] = 0xa
- i++
- i = encodeVarintApi(dAtA, i, uint64(len(m.Ip)))
- i += copy(dAtA[i:], m.Ip)
- }
- return i, nil
- }
- func (m *CaptchaTokenReply) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
- }
- func (m *CaptchaTokenReply) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if len(m.Token) > 0 {
- dAtA[i] = 0xa
- i++
- i = encodeVarintApi(dAtA, i, uint64(len(m.Token)))
- i += copy(dAtA[i:], m.Token)
- }
- if len(m.Url) > 0 {
- dAtA[i] = 0x12
- i++
- i = encodeVarintApi(dAtA, i, uint64(len(m.Url)))
- i += copy(dAtA[i:], m.Url)
- }
- return i, nil
- }
- func (m *UseCouponCodeReq) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
- }
- func (m *UseCouponCodeReq) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if len(m.Token) > 0 {
- dAtA[i] = 0xa
- i++
- i = encodeVarintApi(dAtA, i, uint64(len(m.Token)))
- i += copy(dAtA[i:], m.Token)
- }
- if len(m.Code) > 0 {
- dAtA[i] = 0x12
- i++
- i = encodeVarintApi(dAtA, i, uint64(len(m.Code)))
- i += copy(dAtA[i:], m.Code)
- }
- if len(m.Verify) > 0 {
- dAtA[i] = 0x1a
- i++
- i = encodeVarintApi(dAtA, i, uint64(len(m.Verify)))
- i += copy(dAtA[i:], m.Verify)
- }
- if len(m.Ip) > 0 {
- dAtA[i] = 0x22
- i++
- i = encodeVarintApi(dAtA, i, uint64(len(m.Ip)))
- i += copy(dAtA[i:], m.Ip)
- }
- if m.Mid != 0 {
- dAtA[i] = 0x28
- i++
- i = encodeVarintApi(dAtA, i, uint64(m.Mid))
- }
- return i, nil
- }
- func (m *UseCouponCodeResp) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
- }
- func (m *UseCouponCodeResp) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if len(m.CouponToken) > 0 {
- dAtA[i] = 0xa
- i++
- i = encodeVarintApi(dAtA, i, uint64(len(m.CouponToken)))
- i += copy(dAtA[i:], m.CouponToken)
- }
- if m.CouponAmount != 0 {
- dAtA[i] = 0x11
- i++
- binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.CouponAmount))))
- i += 8
- }
- if m.FullAmount != 0 {
- dAtA[i] = 0x19
- i++
- binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.FullAmount))))
- i += 8
- }
- if len(m.PlatfromLimitExplain) > 0 {
- dAtA[i] = 0x22
- i++
- i = encodeVarintApi(dAtA, i, uint64(len(m.PlatfromLimitExplain)))
- i += copy(dAtA[i:], m.PlatfromLimitExplain)
- }
- if m.ProductLimitMonth != 0 {
- dAtA[i] = 0x28
- i++
- i = encodeVarintApi(dAtA, i, uint64(m.ProductLimitMonth))
- }
- if m.ProductLimitRenewal != 0 {
- dAtA[i] = 0x30
- i++
- i = encodeVarintApi(dAtA, i, uint64(m.ProductLimitRenewal))
- }
- return i, nil
- }
- func (m *UsableAllowanceCouponV2Req) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
- }
- func (m *UsableAllowanceCouponV2Req) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if m.Mid != 0 {
- dAtA[i] = 0x8
- i++
- i = encodeVarintApi(dAtA, i, uint64(m.Mid))
- }
- if len(m.PriceInfo) > 0 {
- for _, msg := range m.PriceInfo {
- dAtA[i] = 0x12
- i++
- i = encodeVarintApi(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- return i, nil
- }
- func (m *ModelPriceInfo) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
- }
- func (m *ModelPriceInfo) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if m.Price != 0 {
- dAtA[i] = 0x9
- i++
- binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Price))))
- i += 8
- }
- if m.Plat != 0 {
- dAtA[i] = 0x10
- i++
- i = encodeVarintApi(dAtA, i, uint64(m.Plat))
- }
- if m.ProdLimMonth != 0 {
- dAtA[i] = 0x18
- i++
- i = encodeVarintApi(dAtA, i, uint64(m.ProdLimMonth))
- }
- if m.ProdLimRenewal != 0 {
- dAtA[i] = 0x20
- i++
- i = encodeVarintApi(dAtA, i, uint64(m.ProdLimRenewal))
- }
- return i, nil
- }
- func (m *UsableAllowanceCouponV2Reply) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
- }
- func (m *UsableAllowanceCouponV2Reply) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if len(m.CouponTip) > 0 {
- dAtA[i] = 0xa
- i++
- i = encodeVarintApi(dAtA, i, uint64(len(m.CouponTip)))
- i += copy(dAtA[i:], m.CouponTip)
- }
- if m.CouponInfo != nil {
- dAtA[i] = 0x12
- i++
- i = encodeVarintApi(dAtA, i, uint64(m.CouponInfo.Size()))
- n1, err := m.CouponInfo.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n1
- }
- return i, nil
- }
- func (m *ModelCouponAllowancePanelInfo) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
- }
- func (m *ModelCouponAllowancePanelInfo) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if len(m.CouponToken) > 0 {
- dAtA[i] = 0xa
- i++
- i = encodeVarintApi(dAtA, i, uint64(len(m.CouponToken)))
- i += copy(dAtA[i:], m.CouponToken)
- }
- if m.CouponAmount != 0 {
- dAtA[i] = 0x11
- i++
- binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.CouponAmount))))
- i += 8
- }
- if m.State != 0 {
- dAtA[i] = 0x18
- i++
- i = encodeVarintApi(dAtA, i, uint64(m.State))
- }
- if len(m.FullLimitExplain) > 0 {
- dAtA[i] = 0x22
- i++
- i = encodeVarintApi(dAtA, i, uint64(len(m.FullLimitExplain)))
- i += copy(dAtA[i:], m.FullLimitExplain)
- }
- if len(m.ScopeExplain) > 0 {
- dAtA[i] = 0x2a
- i++
- i = encodeVarintApi(dAtA, i, uint64(len(m.ScopeExplain)))
- i += copy(dAtA[i:], m.ScopeExplain)
- }
- if m.FullAmount != 0 {
- dAtA[i] = 0x31
- i++
- binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.FullAmount))))
- i += 8
- }
- if m.CouponDiscountPrice != 0 {
- dAtA[i] = 0x39
- i++
- binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.CouponDiscountPrice))))
- i += 8
- }
- if m.StartTime != 0 {
- dAtA[i] = 0x40
- i++
- i = encodeVarintApi(dAtA, i, uint64(m.StartTime))
- }
- if m.ExpireTime != 0 {
- dAtA[i] = 0x48
- i++
- i = encodeVarintApi(dAtA, i, uint64(m.ExpireTime))
- }
- if m.Selected != 0 {
- dAtA[i] = 0x50
- i++
- i = encodeVarintApi(dAtA, i, uint64(m.Selected))
- }
- if len(m.DisablesExplains) > 0 {
- dAtA[i] = 0x5a
- i++
- i = encodeVarintApi(dAtA, i, uint64(len(m.DisablesExplains)))
- i += copy(dAtA[i:], m.DisablesExplains)
- }
- if len(m.OrderNo) > 0 {
- dAtA[i] = 0x62
- i++
- i = encodeVarintApi(dAtA, i, uint64(len(m.OrderNo)))
- i += copy(dAtA[i:], m.OrderNo)
- }
- if len(m.Name) > 0 {
- dAtA[i] = 0x6a
- i++
- i = encodeVarintApi(dAtA, i, uint64(len(m.Name)))
- i += copy(dAtA[i:], m.Name)
- }
- if m.Usable != 0 {
- dAtA[i] = 0x70
- i++
- i = encodeVarintApi(dAtA, i, uint64(m.Usable))
- }
- return i, nil
- }
- func encodeVarintApi(dAtA []byte, offset int, v uint64) int {
- for v >= 1<<7 {
- dAtA[offset] = uint8(v&0x7f | 0x80)
- v >>= 7
- offset++
- }
- dAtA[offset] = uint8(v)
- return offset + 1
- }
- func (m *CaptchaTokenReq) Size() (n int) {
- var l int
- _ = l
- l = len(m.Ip)
- if l > 0 {
- n += 1 + l + sovApi(uint64(l))
- }
- return n
- }
- func (m *CaptchaTokenReply) Size() (n int) {
- var l int
- _ = l
- l = len(m.Token)
- if l > 0 {
- n += 1 + l + sovApi(uint64(l))
- }
- l = len(m.Url)
- if l > 0 {
- n += 1 + l + sovApi(uint64(l))
- }
- return n
- }
- func (m *UseCouponCodeReq) Size() (n int) {
- var l int
- _ = l
- l = len(m.Token)
- if l > 0 {
- n += 1 + l + sovApi(uint64(l))
- }
- l = len(m.Code)
- if l > 0 {
- n += 1 + l + sovApi(uint64(l))
- }
- l = len(m.Verify)
- if l > 0 {
- n += 1 + l + sovApi(uint64(l))
- }
- l = len(m.Ip)
- if l > 0 {
- n += 1 + l + sovApi(uint64(l))
- }
- if m.Mid != 0 {
- n += 1 + sovApi(uint64(m.Mid))
- }
- return n
- }
- func (m *UseCouponCodeResp) Size() (n int) {
- var l int
- _ = l
- l = len(m.CouponToken)
- if l > 0 {
- n += 1 + l + sovApi(uint64(l))
- }
- if m.CouponAmount != 0 {
- n += 9
- }
- if m.FullAmount != 0 {
- n += 9
- }
- l = len(m.PlatfromLimitExplain)
- if l > 0 {
- n += 1 + l + sovApi(uint64(l))
- }
- if m.ProductLimitMonth != 0 {
- n += 1 + sovApi(uint64(m.ProductLimitMonth))
- }
- if m.ProductLimitRenewal != 0 {
- n += 1 + sovApi(uint64(m.ProductLimitRenewal))
- }
- return n
- }
- func (m *UsableAllowanceCouponV2Req) Size() (n int) {
- var l int
- _ = l
- if m.Mid != 0 {
- n += 1 + sovApi(uint64(m.Mid))
- }
- if len(m.PriceInfo) > 0 {
- for _, e := range m.PriceInfo {
- l = e.Size()
- n += 1 + l + sovApi(uint64(l))
- }
- }
- return n
- }
- func (m *ModelPriceInfo) Size() (n int) {
- var l int
- _ = l
- if m.Price != 0 {
- n += 9
- }
- if m.Plat != 0 {
- n += 1 + sovApi(uint64(m.Plat))
- }
- if m.ProdLimMonth != 0 {
- n += 1 + sovApi(uint64(m.ProdLimMonth))
- }
- if m.ProdLimRenewal != 0 {
- n += 1 + sovApi(uint64(m.ProdLimRenewal))
- }
- return n
- }
- func (m *UsableAllowanceCouponV2Reply) Size() (n int) {
- var l int
- _ = l
- l = len(m.CouponTip)
- if l > 0 {
- n += 1 + l + sovApi(uint64(l))
- }
- if m.CouponInfo != nil {
- l = m.CouponInfo.Size()
- n += 1 + l + sovApi(uint64(l))
- }
- return n
- }
- func (m *ModelCouponAllowancePanelInfo) Size() (n int) {
- var l int
- _ = l
- l = len(m.CouponToken)
- if l > 0 {
- n += 1 + l + sovApi(uint64(l))
- }
- if m.CouponAmount != 0 {
- n += 9
- }
- if m.State != 0 {
- n += 1 + sovApi(uint64(m.State))
- }
- l = len(m.FullLimitExplain)
- if l > 0 {
- n += 1 + l + sovApi(uint64(l))
- }
- l = len(m.ScopeExplain)
- if l > 0 {
- n += 1 + l + sovApi(uint64(l))
- }
- if m.FullAmount != 0 {
- n += 9
- }
- if m.CouponDiscountPrice != 0 {
- n += 9
- }
- if m.StartTime != 0 {
- n += 1 + sovApi(uint64(m.StartTime))
- }
- if m.ExpireTime != 0 {
- n += 1 + sovApi(uint64(m.ExpireTime))
- }
- if m.Selected != 0 {
- n += 1 + sovApi(uint64(m.Selected))
- }
- l = len(m.DisablesExplains)
- if l > 0 {
- n += 1 + l + sovApi(uint64(l))
- }
- l = len(m.OrderNo)
- if l > 0 {
- n += 1 + l + sovApi(uint64(l))
- }
- l = len(m.Name)
- if l > 0 {
- n += 1 + l + sovApi(uint64(l))
- }
- if m.Usable != 0 {
- n += 1 + sovApi(uint64(m.Usable))
- }
- return n
- }
- func sovApi(x uint64) (n int) {
- for {
- n++
- x >>= 7
- if x == 0 {
- break
- }
- }
- return n
- }
- func sozApi(x uint64) (n int) {
- return sovApi(uint64((x << 1) ^ uint64((int64(x) >> 63))))
- }
- func (m *CaptchaTokenReq) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowApi
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: CaptchaTokenReq: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: CaptchaTokenReq: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Ip", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowApi
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthApi
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Ip = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipApi(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthApi
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
- }
- func (m *CaptchaTokenReply) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowApi
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: CaptchaTokenReply: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: CaptchaTokenReply: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Token", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowApi
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthApi
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Token = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Url", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowApi
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthApi
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Url = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipApi(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthApi
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
- }
- func (m *UseCouponCodeReq) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowApi
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: UseCouponCodeReq: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: UseCouponCodeReq: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Token", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowApi
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthApi
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Token = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowApi
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthApi
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Code = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Verify", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowApi
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthApi
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Verify = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 4:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Ip", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowApi
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthApi
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Ip = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 5:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Mid", wireType)
- }
- m.Mid = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowApi
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.Mid |= (int64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- default:
- iNdEx = preIndex
- skippy, err := skipApi(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthApi
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
- }
- func (m *UseCouponCodeResp) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowApi
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: UseCouponCodeResp: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: UseCouponCodeResp: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field CouponToken", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowApi
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthApi
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.CouponToken = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 1 {
- return fmt.Errorf("proto: wrong wireType = %d for field CouponAmount", wireType)
- }
- var v uint64
- if (iNdEx + 8) > l {
- return io.ErrUnexpectedEOF
- }
- v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:]))
- iNdEx += 8
- m.CouponAmount = float64(math.Float64frombits(v))
- case 3:
- if wireType != 1 {
- return fmt.Errorf("proto: wrong wireType = %d for field FullAmount", wireType)
- }
- var v uint64
- if (iNdEx + 8) > l {
- return io.ErrUnexpectedEOF
- }
- v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:]))
- iNdEx += 8
- m.FullAmount = float64(math.Float64frombits(v))
- case 4:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field PlatfromLimitExplain", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowApi
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthApi
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.PlatfromLimitExplain = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 5:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field ProductLimitMonth", wireType)
- }
- m.ProductLimitMonth = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowApi
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.ProductLimitMonth |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 6:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field ProductLimitRenewal", wireType)
- }
- m.ProductLimitRenewal = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowApi
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.ProductLimitRenewal |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- default:
- iNdEx = preIndex
- skippy, err := skipApi(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthApi
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
- }
- func (m *UsableAllowanceCouponV2Req) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowApi
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: UsableAllowanceCouponV2Req: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: UsableAllowanceCouponV2Req: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Mid", wireType)
- }
- m.Mid = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowApi
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.Mid |= (int64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field PriceInfo", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowApi
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthApi
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.PriceInfo = append(m.PriceInfo, &ModelPriceInfo{})
- if err := m.PriceInfo[len(m.PriceInfo)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipApi(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthApi
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
- }
- func (m *ModelPriceInfo) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowApi
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: ModelPriceInfo: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: ModelPriceInfo: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 1 {
- return fmt.Errorf("proto: wrong wireType = %d for field Price", wireType)
- }
- var v uint64
- if (iNdEx + 8) > l {
- return io.ErrUnexpectedEOF
- }
- v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:]))
- iNdEx += 8
- m.Price = float64(math.Float64frombits(v))
- case 2:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Plat", wireType)
- }
- m.Plat = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowApi
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.Plat |= (int64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 3:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field ProdLimMonth", wireType)
- }
- m.ProdLimMonth = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowApi
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.ProdLimMonth |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 4:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field ProdLimRenewal", wireType)
- }
- m.ProdLimRenewal = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowApi
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.ProdLimRenewal |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- default:
- iNdEx = preIndex
- skippy, err := skipApi(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthApi
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
- }
- func (m *UsableAllowanceCouponV2Reply) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowApi
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: UsableAllowanceCouponV2Reply: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: UsableAllowanceCouponV2Reply: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field CouponTip", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowApi
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthApi
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.CouponTip = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field CouponInfo", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowApi
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthApi
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.CouponInfo == nil {
- m.CouponInfo = &ModelCouponAllowancePanelInfo{}
- }
- if err := m.CouponInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipApi(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthApi
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
- }
- func (m *ModelCouponAllowancePanelInfo) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowApi
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: ModelCouponAllowancePanelInfo: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: ModelCouponAllowancePanelInfo: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field CouponToken", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowApi
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthApi
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.CouponToken = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 1 {
- return fmt.Errorf("proto: wrong wireType = %d for field CouponAmount", wireType)
- }
- var v uint64
- if (iNdEx + 8) > l {
- return io.ErrUnexpectedEOF
- }
- v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:]))
- iNdEx += 8
- m.CouponAmount = float64(math.Float64frombits(v))
- case 3:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field State", wireType)
- }
- m.State = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowApi
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.State |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 4:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field FullLimitExplain", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowApi
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthApi
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.FullLimitExplain = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 5:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ScopeExplain", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowApi
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthApi
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.ScopeExplain = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 6:
- if wireType != 1 {
- return fmt.Errorf("proto: wrong wireType = %d for field FullAmount", wireType)
- }
- var v uint64
- if (iNdEx + 8) > l {
- return io.ErrUnexpectedEOF
- }
- v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:]))
- iNdEx += 8
- m.FullAmount = float64(math.Float64frombits(v))
- case 7:
- if wireType != 1 {
- return fmt.Errorf("proto: wrong wireType = %d for field CouponDiscountPrice", wireType)
- }
- var v uint64
- if (iNdEx + 8) > l {
- return io.ErrUnexpectedEOF
- }
- v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:]))
- iNdEx += 8
- m.CouponDiscountPrice = float64(math.Float64frombits(v))
- case 8:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field StartTime", wireType)
- }
- m.StartTime = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowApi
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.StartTime |= (int64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 9:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field ExpireTime", wireType)
- }
- m.ExpireTime = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowApi
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.ExpireTime |= (int64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 10:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Selected", wireType)
- }
- m.Selected = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowApi
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.Selected |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 11:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field DisablesExplains", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowApi
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthApi
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.DisablesExplains = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 12:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field OrderNo", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowApi
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthApi
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.OrderNo = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 13:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowApi
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthApi
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Name = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 14:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Usable", wireType)
- }
- m.Usable = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowApi
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.Usable |= (int32(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- default:
- iNdEx = preIndex
- skippy, err := skipApi(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthApi
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
- }
- func skipApi(dAtA []byte) (n int, err error) {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowApi
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- wireType := int(wire & 0x7)
- switch wireType {
- case 0:
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowApi
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- iNdEx++
- if dAtA[iNdEx-1] < 0x80 {
- break
- }
- }
- return iNdEx, nil
- case 1:
- iNdEx += 8
- return iNdEx, nil
- case 2:
- var length int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowApi
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- length |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- iNdEx += length
- if length < 0 {
- return 0, ErrInvalidLengthApi
- }
- return iNdEx, nil
- case 3:
- for {
- var innerWire uint64
- var start int = iNdEx
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowApi
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- innerWire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- innerWireType := int(innerWire & 0x7)
- if innerWireType == 4 {
- break
- }
- next, err := skipApi(dAtA[start:])
- if err != nil {
- return 0, err
- }
- iNdEx = start + next
- }
- return iNdEx, nil
- case 4:
- return iNdEx, nil
- case 5:
- iNdEx += 4
- return iNdEx, nil
- default:
- return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
- }
- }
- panic("unreachable")
- }
- var (
- ErrInvalidLengthApi = fmt.Errorf("proto: negative length found during unmarshaling")
- ErrIntOverflowApi = fmt.Errorf("proto: integer overflow")
- )
- func init() { proto.RegisterFile("app/service/main/coupon/api/api.proto", fileDescriptorApi) }
- var fileDescriptorApi = []byte{
- // 787 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x55, 0xcb, 0x6e, 0x2b, 0x45,
- 0x10, 0xd5, 0xd8, 0xb1, 0x13, 0x97, 0x1f, 0xd8, 0x9d, 0x07, 0x83, 0x45, 0x1c, 0x67, 0x22, 0x90,
- 0x05, 0x89, 0x2d, 0x0c, 0x3b, 0xd8, 0x84, 0xc0, 0x02, 0x29, 0x89, 0xa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