mirror of
https://github.com/aclindsa/ofxgo.git
synced 2025-07-01 11:48:38 -04:00
Add Type() to Message interface, check types when marshalling requests
This commit is contained in:
@ -25,6 +25,10 @@ func (r *ProfileRequest) Valid() (bool, error) {
|
||||
return true, nil
|
||||
}
|
||||
|
||||
func (r *ProfileRequest) Type() messageType {
|
||||
return ProfileRq
|
||||
}
|
||||
|
||||
type SignonInfo struct {
|
||||
XMLName xml.Name `xml:"SIGNONINFO"`
|
||||
SignonRealm String `xml:"SIGNONREALM"`
|
||||
@ -130,6 +134,10 @@ func (pr ProfileResponse) Valid() (bool, error) {
|
||||
return true, nil
|
||||
}
|
||||
|
||||
func (pr ProfileResponse) Type() messageType {
|
||||
return ProfileRs
|
||||
}
|
||||
|
||||
func decodeProfileMessageSet(d *xml.Decoder, start xml.StartElement) ([]Message, error) {
|
||||
var msgs []Message
|
||||
for {
|
||||
|
Reference in New Issue
Block a user