Documentation ¶
Index ¶
- type BCCBReq
- type BCCBResp
- type CheckFingerPrintRequest
- type DonationImage
- type DrawRequest
- type DrawResp
- type FingerRequest
- type FingerResponse
- type FundsDetailRequest
- type FundsDistributed
- type FundsDonation
- type FundsReceived
- type ImageUploadResp
- type LoginRequest
- type LoginResp
- type OrgCharitiesDetailItem
- type OrgCharitiesDetailRequest
- type OrgCharitiesDetailResp
- type OrgCharitiesItems
- type PubAddress
- type PubFundsDetail
- type PubProofImageRequest
- type PubProofImageResp
- type PubReq
- type PubResp
- type PubRespData
- type PubSuppliesDetail
- type PubUserItem
- type PubUserRequest
- type PubUserResp
- type PubUserzRequest
- type QueryFundsItems
- type QueryFundsRequest
- type QueryFundsResp
- type QueryOrgCharitiesRequest
- type QueryOrgCharitiesResp
- type QueryParams
- type QuerySuppliesItems
- type QuerySuppliesRequest
- type QuerySuppliesResp
- type ReceiveFundsRequest
- type ReceiveFundsResp
- type ReceiveSuppliesRequest
- type ReceiveSuppliesRespItem
- type RegisterReq
- type RegisterResp
- type RegisterRespData
- type SuppliesDetailRequest
- type SuppliesDistributed
- type SuppliesDonation
- type SuppliesItem
- type SuppliesReceived
- type TokenResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BCCBReq ¶
type BCCBReq struct { BlockChain string `json:"blockchain" binding:"required"` // block chain name ID string `json:"id" binding:"required"` // block chain id BlockNum int64 `json:"block_num" binding:"required"` // block number in block chain TxID string `json:"tx_id" binding:"required"` // publicity data tx id of block chain tx Time int64 `json:"time" binding:"required"` // time }
BCCBReq defines the request of block chain call back information
type CheckFingerPrintRequest ¶
type CheckFingerPrintRequest struct { ID int `json:"id" binding:"required"` JSONString string `json:"json_string"` JSONSignature string `json:"json_signature"` }
CheckFingerPrintRequest ...
type DonationImage ¶
type DonationImage struct { URL string `json:"url"` // image url Hash string `json:"hash"` // image hash }
DonationImage defines the donation proof image
type DrawRequest ¶
type DrawRequest struct { DrawType string `form:"draw_type"` DonationType string `form:"donation_type"` DonationID string `form:"donation_id"` Scene string `form:"scene"` }
DrawRequest defines the request of query draw
type DrawResp ¶
type DrawResp struct { Icon string `json:"icon"` Title string `json:"title"` Content string `json:"content"` ImageURL string `json:"image_url"` }
DrawResp defines the response of image draw
type FingerRequest ¶
type FingerRequest struct { OpenID string `json:"openid"` JSONString string `json:"json_string"` JSONSignature string `json:"json_signature"` }
FingerRequest ...
type FingerResponse ¶
type FingerResponse struct { IsOK bool `json:"is_ok"` Errcode int `json:"errcode"` Errmsg string `json:"errmsg"` }
FingerResponse ...
type FundsDetailRequest ¶
type FundsDetailRequest struct {
FundsID string `form:"funds_id"` // id of funds
}
FundsDetailRequest defines the request of query detail funds
type FundsDistributed ¶
type FundsDistributed struct { ID string `json:"id"` // funds id TargetUID string `json:"target_uid"` // charity user id TargetName string `json:"target_name"` // user name of the one who receive donation TargetBankCardNum string `json:"target_bank_card_num"` // bank card number of charity AidName string `json:"aid_name"` // user name of the one who aided Time int64 `json:"time"` // distribute time Amount string `json:"amount"` // the amount of publicity funds DonationImages []*DonationImage `json:"donation_images"` // donation proof images }
FundsDistributed defines the distributed funds
type FundsDonation ¶
type FundsDonation struct { ID string `json:"id"` // funds id UID string `json:"uid"` // user id DonorName string `json:"donor_name"` // user name of the one who donate Time int64 `json:"time"` // donate time Amount string `json:"amount"` // the amount of publicity funds TargetName string `json:"target_name"` // user name of the one who receive donation TargetBankCardNum string `json:"target_bank_card_num"` // bank card number of charity DonationImages []*DonationImage `json:"donation_images"` // donation proof images }
FundsDonation defines the funds of donation
type FundsReceived ¶
type FundsReceived struct { ID string `json:"id"` // funds id TargetUID string `json:"target_uid"` // charity user id TargetName string `json:"target_name"` // user name of the one who receive donation DonorName string `json:"donor_name"` // user name of the one who donate Time int64 `json:"time"` // received time Amount string `json:"amount"` // the amount of publicity funds TargetBankCardNum string `json:"target_bank_card_num"` // bank card number of charity DonationImages []*DonationImage `json:"donation_images"` // donation proof images }
FundsReceived defines the received funds
type ImageUploadResp ¶
type ImageUploadResp struct {
ID string `json:"id"` // image id
}
ImageUploadResp defines the response of image upload
type LoginRequest ¶
type LoginRequest struct { Access string `json:"access"` // user name Phone string `json:"phone"` // user phone Email string `json:"email"` // user email Password string `json:"password"` // user password Nickname string `json:"nickname"` // nickname SmsCode string `json:"sms_code"` // sms code CertCode string `json:"cert_code"` // temporary login credentials of wechat ComponentID string `json:"component_id"` // component id of wechat ID int `json:"id"` // id of wechat app user AppID string `json:"app_id"` // app id Remark string `json:"remark"` // user description }
LoginRequest defines the request of user registration
type LoginResp ¶
type LoginResp struct {
UID string `json:"uid"` // user id
}
LoginResp defines the response of user registration
type OrgCharitiesDetailItem ¶
type OrgCharitiesDetailItem struct { UID string `json:"uid"` // user id of the one who donate URL string `json:"url"` // image url NickName string `json:"nick_name"` // nick name Country string `json:"country"` // country Province string `json:"province"` // province City string `json:"city"` // city District string `json:"district"` // district Address string `json:"address"` // detail address Phone string `json:"phone"` // phone num BankCardNum string `json:"bank_card_num"` // bank card num Remark string `json:"remark"` // remark }
OrgCharitiesDetailItem defines the struct of charities detail item
type OrgCharitiesDetailRequest ¶
type OrgCharitiesDetailRequest struct {
UID string `form:"uid"` // user id of the one who donate
}
OrgCharitiesDetailRequest defines the request of query charities detail
type OrgCharitiesDetailResp ¶
type OrgCharitiesDetailResp struct { UID string `json:"uid"` // user id of the one who donate URL string `json:"url"` // image url NickName string `json:"nick_name"` // nick name Address string `json:"address"` // detail address Phone string `json:"phone"` // phone num BankCardNum string `json:"bank_card_num"` // bank card num Remark string `json:"remark"` // remark }
OrgCharitiesDetailResp defines the response of charities detail
type OrgCharitiesItems ¶
type OrgCharitiesItems struct { ID string `json:"id"` // donation stat id UID string `json:"uid"` // user id of the one who donate URL string `json:"url"` // organization logo NickName string `json:"nick_name"` // nick name ReceivedFunds decimal.Decimal `json:"received_funds"` // receiving funds ReceivedSupplies int64 `json:"received_supplies"` // receiving supplies DistributedFunds decimal.Decimal `json:"distributed_funds"` // distributing funds DistributedSupplies int64 `json:"distributed_supplies"` // distributing supplies CreatedAt int64 `json:"created_at"` // create time Time time.Time `json:"-"` // time }
OrgCharitiesItems defines the struct of organization item
func (*OrgCharitiesItems) ConvertTime ¶
func (ois *OrgCharitiesItems) ConvertTime()
ConvertTime defines the covert of created_at
type PubAddress ¶
type PubAddress struct { ID string `json:"id"` // address id Type string `json:"type"` // address type Country string `json:"country"` // country Province string `json:"province"` // province City string `json:"city"` // city District string `json:"district"` // district Address string `json:"address"` // detail address ZipCode string `json:"zip_code"` // zip code }
PubAddress defines the shipping address of publicity funds detail information
type PubFundsDetail ¶
type PubFundsDetail struct { PubFunds QueryFundsItems `json:"pub_funds"` // publicity funds BillingAddress PubAddress `json:"billing_addr"` // billing address ShippingAddress PubAddress `json:"shipping_addr"` // shipping address ProofImages []*PubProofImageResp `json:"proof_images"` // the proof of donation }
PubFundsDetail defines the detail information of publicity funds
type PubProofImageRequest ¶
type PubProofImageRequest struct { Type string `json:"type" binding:"required"` // image type URL string `json:"url" binding:"required"` // image url Index string `json:"index" binding:"required"` // image index Format string `json:"format"` // image file format }
PubProofImageRequest defines the request proof image of publicity detail information
type PubProofImageResp ¶
type PubProofImageResp struct { ID string `json:"id"` // image id Type string `json:"type"` // user type URL string `json:"url"` // image url Hash string `json:"hash"` // image hash Index string `json:"index"` // image index Format string `json:"format"` // image file format }
PubProofImageResp defines the proof image of publicity detail information
type PubResp ¶
type PubResp struct { Code int `json:"code"` Msg string `json:"msg"` Data PubRespData `json:"data"` }
PubResp defines the response of publicity
type PubRespData ¶
type PubRespData struct {
ID string `json:"id"` // block chain id
}
PubRespData ...
type PubSuppliesDetail ¶
type PubSuppliesDetail struct { PubSupplies QuerySuppliesItems `json:"pub_supplies"` // publicity supplies BillingAddress PubAddress `json:"billing_addr"` // billing address ShippingAddress PubAddress `json:"shipping_addr"` // shipping address ProofImages []*PubProofImageResp `json:"proof_images"` // the proof of donation }
PubSuppliesDetail defines the detail information of publicity supplies
type PubUserItem ¶
type PubUserItem struct { ID string `json:"id"` // funds id Type string `json:"type"` // publicity type UID string `json:"uid"` // user id DonorName string `json:"donor_name"` // user name of the one who donate UserType string `json:"user_type"` // user type AidUID string `json:"aid_uid"` // aid user id AidName string `json:"aid_name"` // user name of the one who accept donation TargetUID string `json:"target_uid"` // user id of charity TargetName string `json:"target_name"` // user name of the one who receive donation PubType string `json:"pub_type"` // the type of publicity PayType string `json:"pay_type"` // pay type of funds Amount string `json:"amount"` // the amount of funds Name string `json:"name"` // name of supplies Number int64 `json:"number"` // number of supplies Unit string `json:"unit"` // unit of supplies TxID string `json:"tx_id"` // block chain tx id Remark string `json:"remark"` // remark BlockType string `json:"block_type"` // block type BlockHeight int64 `json:"block_height"` // block height BlockTime int64 `json:"block_time"` // block time CreatedAt int64 `json:"created_at"` // created time Time time.Time `json:"-"` // time }
PubUserItem defines the item of publicity information
func (*PubUserItem) ConvertTime ¶
func (pui *PubUserItem) ConvertTime()
ConvertTime defines the covert of created_at
func (*PubUserItem) Count ¶
func (pui *PubUserItem) Count(fundsNum, suppliesNum *int64)
Count defines the number of items donated
type PubUserRequest ¶
type PubUserRequest struct { UserType string `form:"user_type"` // user type TargetUID string `form:"target_uid"` // user id of charity PubType string `form:"pub_type" binding:"required"` // publicity type PageNum int `form:"page_num"` // page num PageLimit int `form:"page_limit"` // page limit StartTime int64 `form:"start_time"` // start time EndTime int64 `form:"end_time"` // end time }
PubUserRequest defines the request of publicity information
type PubUserResp ¶
type PubUserResp struct { PageNum int `json:"page_num"` // page num PageLimit int `json:"page_limit"` // page limit StartTime int64 `json:"start_time"` // start time EndTime int64 `json:"end_time"` // end time Total int64 `json:"total"` // total number of query result SuppliesNum int64 `json:"supplies_num"` // total number of query supplies FundsNum int64 `json:"funds_num"` // total number of query funds Results []*PubUserItem `json:"results"` // funds items }
PubUserResp defines the response of publicity information
type PubUserzRequest ¶
type PubUserzRequest struct { UID string `form:"uid"` // uid UserType string `form:"user_type"` // user type TargetUID string `form:"target_uid"` // user id of charity PubType string `form:"pub_type" binding:"required"` // publicity type PageNum int `form:"page_num"` // page num PageLimit int `form:"page_limit"` // page limit StartTime int64 `form:"start_time"` // start time EndTime int64 `form:"end_time"` // end time }
PubUserzRequest defines the request of publicity information
type QueryFundsItems ¶
type QueryFundsItems struct { ID string `json:"id"` // funds id UID string `json:"uid"` // user id DonorName string `json:"donor_name"` // user name of the one who donate UserType string `json:"user_type"` // user type AidUID string `json:"aid_uid"` // aid user id AidName string `json:"aid_name"` // user name of the one who accept donation AidBankCardNum string `json:"aid_bank_card_num"` // aid bank card number TargetUID string `json:"target_uid"` // user id of charity TargetName string `json:"target_name"` // user name of the one who receive donation TargetBankCardNum string `json:"target_bank_card_num"` // target bank card number PubType string `json:"pub_type"` // the type of publicity PayType string `json:"pay_type"` // pay type Amount string `json:"amount"` // the amount of publicity funds TxID string `json:"tx_id"` // block chain tx id Remark string `json:"remark"` // remark BlockID string `json:"block_id"` // block id BlockType string `json:"block_type"` // block type BlockHeight int64 `json:"block_height"` // block height BlockTime int64 `json:"block_time"` // block time CreatedAt int64 `json:"created_at"` // created time }
QueryFundsItems defines the struct of funds item
type QueryFundsRequest ¶
type QueryFundsRequest struct { UID string `form:"uid"` // user id of the one who donate TargetUID string `form:"target_uid"` // user id of charity UserType string `form:"user_type"` // user type PubType string `form:"pub_type"` // publicity type PageNum int `form:"page_num"` // page num PageLimit int `form:"page_limit"` // page limit StartTime int64 `form:"start_time"` // start time EndTime int64 `form:"end_time"` // end time }
QueryFundsRequest defines the request of query funds
type QueryFundsResp ¶
type QueryFundsResp struct { PageNum int `json:"page_num"` // page num PageLimit int `json:"page_limit"` // page limit StartTime int64 `json:"start_time"` // start time EndTime int64 `json:"end_time"` // end time Total int64 `json:"total"` // total number of query result Results []*QueryFundsItems `json:"results"` // funds items }
QueryFundsResp defines the response of funds
type QueryOrgCharitiesRequest ¶
type QueryOrgCharitiesRequest struct { PageNum int `form:"page_num"` // page num PageLimit int `form:"page_limit"` // page limit StartTime int64 `form:"start_time"` // start time EndTime int64 `form:"end_time"` // end time }
QueryOrgCharitiesRequest defines the request of query organizations
type QueryOrgCharitiesResp ¶
type QueryOrgCharitiesResp struct { PageNum int `json:"page_num"` // page num PageLimit int `json:"page_limit"` // page limit StartTime int64 `json:"start_time"` // start time EndTime int64 `json:"end_time"` // end time Total int64 `json:"total"` // total number of query result Results []*OrgCharitiesItems `json:"results"` // orgs items }
QueryOrgCharitiesResp defines the response of organizations
type QueryParams ¶
type QueryParams struct { PageNum int // page num PageLimit int // page limit StartTime int64 // start time EndTime int64 // end time Total int64 // total number of query results }
QueryParams defines the struct of query by page params
type QuerySuppliesItems ¶
type QuerySuppliesItems struct { ID string `json:"id"` // supplies id WayBillNum string `json:"way_bill_num"` // supplies way bill number UID string `json:"uid"` // user id DonorName string `json:"donor_name"` // user name of the one who donate UserType string `json:"user_type"` // user type AidUID string `json:"aid_uid"` // aid user id AidName string `json:"aid_name"` // user name of the one who accept donation TargetUID string `json:"target_uid"` // user id of charity TargetName string `json:"target_name"` // user name of the one who receive donation PubType string `json:"pub_type"` // the type of publicity Name string `json:"name"` // name Number int64 `json:"number"` // number Unit string `json:"unit"` // unit TxID string `json:"tx_id"` // block chain tx id Remark string `json:"remark"` // remark BlockID string `json:"block_id"` // block id BlockType string `json:"block_type"` // block type BlockHeight int64 `json:"block_height"` // block height BlockTime int64 `json:"block_time"` // block time CreatedAt int64 `json:"created_at"` // created time }
QuerySuppliesItems defines the struct of supplies item
type QuerySuppliesRequest ¶
type QuerySuppliesRequest struct { UID string `form:"uid"` // user id of the one who donate TargetUID string `form:"target_uid"` // user id of charity UserType string `form:"user_type"` // user type PubType string `form:"pub_type"` // publicity type PageNum int `form:"page_num"` // page num PageLimit int `form:"page_limit"` // page limit StartTime int64 `form:"start_time"` // start time EndTime int64 `form:"end_time"` // end time }
QuerySuppliesRequest defines the request of supplies
type QuerySuppliesResp ¶
type QuerySuppliesResp struct { PageNum int `json:"page_num"` // page num PageLimit int `json:"page_limit"` // page limit StartTime int64 `json:"start_time"` // start time EndTime int64 `json:"end_time"` // end time Total int64 `json:"total"` // total number of query result Results []*QuerySuppliesItems `json:"results"` // funds items }
QuerySuppliesResp defines the response of supplies
type ReceiveFundsRequest ¶
type ReceiveFundsRequest struct { UID string `json:"uid" binding:"required"` // user id of the one who donate DonorUID string `json:"donor_uid" binding:"required"` // user did DonorName string `json:"donor_name" binding:"required"` // user name of the one who donate UserType string `json:"user_type" binding:"required"` // user type TargetUID string `json:"target_uid" binding:"required"` // user id of charity TargetName string `json:"target_name" binding:"required"` // user name of the one who receive donation TargetBankCardNum string `json:"target_bank_card_num" binding:"required"` // target bank card number PubType string `json:"pub_type" binding:"required"` // publicity type PayType string `json:"pay_type"` // pay type Amount decimal.Decimal `json:"amount" binding:"required"` // pay amount Remark string `json:"remark"` // remark text PubProofImage []*PubProofImageRequest `json:"proof_images" binding:"required"` // images of proof }
ReceiveFundsRequest defines the request of receiving funds
func (*ReceiveFundsRequest) GetUIDByFundsReq ¶
func (rsr *ReceiveFundsRequest) GetUIDByFundsReq() string
GetUIDByFundsReq implement get funds uid
type ReceiveFundsResp ¶
type ReceiveFundsResp struct {
FundsID string `json:"funds_id"` // funds id
}
ReceiveFundsResp defines the response of receiving funds
type ReceiveSuppliesRequest ¶
type ReceiveSuppliesRequest struct { UID string `json:"uid"` // user id DonorUID string `json:"donor_uid"` // user id of the one who donate DonorName string `json:"donor_name"` // user name of the one who donate UserType string `json:"user_type"` // user type TargetUID string `json:"target_uid" binding:"required"` // user id of charity TargetName string `json:"target_name"` // user name of the one who receive donation PubType string `json:"pub_type" binding:"required"` // the type of publicity SuppliesItem []*SuppliesItem `json:"supplies_item" binding:"required"` // the supplies item Remark string `json:"remark"` // remark WayBillNum string `json:"way_bill_num"` // supplies way bill number BillingAddress PubAddress `json:"billing_addr"` // billing address ShippingAddress PubAddress `json:"shipping_addr"` // donation shipping address PubProofImage []*PubProofImageRequest `json:"proof_images" binding:"required"` // images of proof }
ReceiveSuppliesRequest defines the struct of received supplies
func (*ReceiveSuppliesRequest) GetUIDBySuppliesReq ¶
func (rsr *ReceiveSuppliesRequest) GetUIDBySuppliesReq() string
GetUIDBySuppliesReq defines get the uid of who originated
type ReceiveSuppliesRespItem ¶
type ReceiveSuppliesRespItem struct {
SuppliesID string `json:"supplies_id"` // supplies id
}
ReceiveSuppliesRespItem defines the response of receiving supplies
type RegisterReq ¶
type RegisterReq struct {
AccountID string `json:"account_id"` // user account id
}
RegisterReq defines the request of user register
type RegisterResp ¶
type RegisterResp struct { Code int `json:"code"` Msg string `json:"msg"` Data RegisterRespData `json:"data"` }
RegisterResp defines the response of user register
type RegisterRespData ¶
type RegisterRespData struct {
ID string `json:"id"` // block chain id
}
RegisterRespData defines the response data of block chain register interface
type SuppliesDetailRequest ¶
type SuppliesDetailRequest struct {
SuppliesID string `form:"supplies_id" binding:"required"` // id of supplies
}
SuppliesDetailRequest defines the request of query detail supplies
type SuppliesDistributed ¶
type SuppliesDistributed struct { ID string `json:"id"` // supplies id TargetUID string `json:"target_uid"` // charity user id TargetName string `json:"target_name"` // user name of the one who receive donation BillingAddress string `json:"billing_addr"` // billing address Name string `json:"name"` // name Number int64 `json:"number"` // number Unit string `json:"-"` // unit Time int64 `json:"time"` // received time AidName string `json:"aid_name"` // user name of the one who aided ShippingAddress string `json:"shipping_addr"` // donation shipping address WayBillNum string `json:"way_bill_num"` // supplies way bill number DonationImages []*DonationImage `json:"donation_images"` // donation proof images }
SuppliesDistributed defines the distributed supplies
type SuppliesDonation ¶
type SuppliesDonation struct { ID string `json:"id"` // supplies id UID string `json:"uid"` // user id DonorName string `json:"donor_name"` // user name of the one who donate BillingAddress string `json:"billing_addr"` // billing address Time int64 `json:"time"` // donate time Name string `json:"name"` // name Number int64 `json:"number"` // number Unit string `json:"-"` // unit TargetName string `json:"target_name"` // user name of the one who receive donation ShippingAddress string `json:"shipping_addr"` // donation shipping address WayBillNum string `json:"way_bill_num"` // supplies way bill number DonationImages []*DonationImage `json:"donation_images"` // donation proof images }
SuppliesDonation defines the supplies of donation
type SuppliesItem ¶
type SuppliesItem struct { Name string `json:"name" binding:"required"` // name Number int64 `json:"number" binding:"required"` // number Unit string `json:"unit" binding:"required"` // unit }
SuppliesItem defines the struct item of received supplies
type SuppliesReceived ¶
type SuppliesReceived struct { ID string `json:"id"` // supplies id TargetUID string `json:"target_uid"` // charity user id DonorName string `json:"donor_name"` // user name of the one who donate BillingAddress string `json:"billing_addr"` // billing address Time int64 `json:"time"` // received time Name string `json:"name"` // name Number int64 `json:"number"` // number Unit string `json:"-"` // unit TargetName string `json:"target_name"` // user name of the one who receive donation ShippingAddress string `json:"shipping_addr"` // donation shipping address WayBillNum string `json:"way_bill_num"` // supplies way bill number DonationImages []*DonationImage `json:"donation_images"` // donation proof images }
SuppliesReceived defines the received supplies
type TokenResponse ¶
type TokenResponse struct { AccessToken string `json:"access_token"` ExpiresIn int64 `json:"expires_in"` }
TokenResponse ...