Add additional types for payments
This commit is contained in:
57
types.go
57
types.go
@ -21,7 +21,9 @@ type ChatAPI struct {
|
|||||||
Message string `json:"message,omitempty"`
|
Message string `json:"message,omitempty"`
|
||||||
ID int `json:"id,omitempty"`
|
ID int `json:"id,omitempty"`
|
||||||
Ratelimits []rateLimits `json:"ratelimits,omitempty"`
|
Ratelimits []rateLimits `json:"ratelimits,omitempty"`
|
||||||
|
Notification *notification `json:"notification"`
|
||||||
Result *result `json:"result,omitempty"`
|
Result *result `json:"result,omitempty"`
|
||||||
|
Pagination *pagination `json:"pagination"`
|
||||||
keybase Keybase // Some methods will need this, so I'm passing it but keeping it unexported
|
keybase Keybase // Some methods will need this, so I'm passing it but keeping it unexported
|
||||||
}
|
}
|
||||||
type sender struct {
|
type sender struct {
|
||||||
@ -114,9 +116,11 @@ type content struct {
|
|||||||
Reaction reaction `json:"reaction"`
|
Reaction reaction `json:"reaction"`
|
||||||
System system `json:"system"`
|
System system `json:"system"`
|
||||||
Text text `json:"text"`
|
Text text `json:"text"`
|
||||||
|
SendPayment SendPayment `json:"send_payment"`
|
||||||
}
|
}
|
||||||
type msg struct {
|
type msg struct {
|
||||||
ID int `json:"id"`
|
ID int `json:"id"`
|
||||||
|
ConversationID string `json:"conversation_id"`
|
||||||
Channel Channel `json:"channel"`
|
Channel Channel `json:"channel"`
|
||||||
Sender sender `json:"sender"`
|
Sender sender `json:"sender"`
|
||||||
SentAt int `json:"sent_at"`
|
SentAt int `json:"sent_at"`
|
||||||
@ -129,6 +133,55 @@ type msg struct {
|
|||||||
HasPairwiseMacs bool `json:"has_pairwise_macs"`
|
HasPairwiseMacs bool `json:"has_pairwise_macs"`
|
||||||
ChannelMention string `json:"channel_mention"`
|
ChannelMention string `json:"channel_mention"`
|
||||||
}
|
}
|
||||||
|
type summary struct {
|
||||||
|
ID string `json:"id"`
|
||||||
|
TxID string `json:"txID"`
|
||||||
|
Time int64 `json:"time"`
|
||||||
|
StatusSimplified int `json:"statusSimplified"`
|
||||||
|
StatusDescription string `json:"statusDescription"`
|
||||||
|
StatusDetail string `json:"statusDetail"`
|
||||||
|
ShowCancel bool `json:"showCancel"`
|
||||||
|
AmountDescription string `json:"amountDescription"`
|
||||||
|
Delta int `json:"delta"`
|
||||||
|
Worth string `json:"worth"`
|
||||||
|
WorthAtSendTime string `json:"worthAtSendTime"`
|
||||||
|
IssuerDescription string `json:"issuerDescription"`
|
||||||
|
FromType int `json:"fromType"`
|
||||||
|
ToType int `json:"toType"`
|
||||||
|
AssetCode string `json:"assetCode"`
|
||||||
|
FromAccountID string `json:"fromAccountID"`
|
||||||
|
FromAccountName string `json:"fromAccountName"`
|
||||||
|
FromUsername string `json:"fromUsername"`
|
||||||
|
ToAccountID string `json:"toAccountID"`
|
||||||
|
ToAccountName string `json:"toAccountName"`
|
||||||
|
ToUsername string `json:"toUsername"`
|
||||||
|
ToAssertion string `json:"toAssertion"`
|
||||||
|
OriginalToAssertion string `json:"originalToAssertion"`
|
||||||
|
Note string `json:"note"`
|
||||||
|
NoteErr string `json:"noteErr"`
|
||||||
|
SourceAmountMax string `json:"sourceAmountMax"`
|
||||||
|
SourceAmountActual string `json:"sourceAmountActual"`
|
||||||
|
SourceAsset sourceAsset `json:"sourceAsset"`
|
||||||
|
SourceConvRate string `json:"sourceConvRate"`
|
||||||
|
IsAdvanced bool `json:"isAdvanced"`
|
||||||
|
SummaryAdvanced string `json:"summaryAdvanced"`
|
||||||
|
Operations interface{} `json:"operations"`
|
||||||
|
Unread bool `json:"unread"`
|
||||||
|
BatchID string `json:"batchID"`
|
||||||
|
FromAirdrop bool `json:"fromAirdrop"`
|
||||||
|
IsInflation bool `json:"isInflation"`
|
||||||
|
}
|
||||||
|
type details struct {
|
||||||
|
PublicNote string `json:"publicNote"`
|
||||||
|
PublicNoteType string `json:"publicNoteType"`
|
||||||
|
ExternalTxURL string `json:"externalTxURL"`
|
||||||
|
FeeChargedDescription string `json:"feeChargedDescription"`
|
||||||
|
PathIntermediate interface{} `json:"pathIntermediate"`
|
||||||
|
}
|
||||||
|
type notification struct {
|
||||||
|
Summary summary `json:"summary"`
|
||||||
|
Details details `json:"details"`
|
||||||
|
}
|
||||||
|
|
||||||
// Channel holds information about a conversation
|
// Channel holds information about a conversation
|
||||||
type Channel struct {
|
type Channel struct {
|
||||||
@ -183,6 +236,9 @@ type conversation struct {
|
|||||||
ActiveAtMs int64 `json:"active_at_ms"`
|
ActiveAtMs int64 `json:"active_at_ms"`
|
||||||
MemberStatus string `json:"member_status"`
|
MemberStatus string `json:"member_status"`
|
||||||
}
|
}
|
||||||
|
type SendPayment struct {
|
||||||
|
PaymentID string `json:"paymentID"`
|
||||||
|
}
|
||||||
|
|
||||||
// Keybase holds basic information about the local Keybase executable
|
// Keybase holds basic information about the local Keybase executable
|
||||||
type Keybase struct {
|
type Keybase struct {
|
||||||
@ -228,6 +284,7 @@ type sourceAsset struct {
|
|||||||
IssuerName string `json:"issuerName"`
|
IssuerName string `json:"issuerName"`
|
||||||
Desc string `json:"desc"`
|
Desc string `json:"desc"`
|
||||||
InfoURL string `json:"infoUrl"`
|
InfoURL string `json:"infoUrl"`
|
||||||
|
InfoURLText string `json:"infoUrlText"`
|
||||||
}
|
}
|
||||||
type balance struct {
|
type balance struct {
|
||||||
Asset asset `json:"asset"`
|
Asset asset `json:"asset"`
|
||||||
|
|||||||
Reference in New Issue
Block a user