common: Improve comments

This commit is contained in:
Aaron Lindsay 2017-04-12 21:39:54 -04:00
parent 6c20007ada
commit e670b52a08
1 changed files with 7 additions and 4 deletions

View File

@ -7,16 +7,18 @@ import (
"github.com/aclindsa/go/src/encoding/xml"
)
// Represents an OFX message in a message set
// Message represents an OFX message in a message set. it is used to ease
// marshalling and unmarshalling.
type Message interface {
Name() string // The name of the OFX transaction wrapper element this represents
Valid() (bool, error) // Called before a Message is marshaled and after
// it's unmarshaled to ensure the request or response is valid
Type() messageType // The message set this message belongs to
Valid() (bool, error) // Called before a Message is marshaled and after it's unmarshaled to ensure the request or response is valid
Type() messageType // The message set this message belongs to
}
type messageType uint
// These constants are returned by Messages' Type() functions to determine
// which message set they belong to
const (
// Requests
SignonRq messageType = iota
@ -34,6 +36,7 @@ const (
PresDlvRq
ProfRq
ImageRq
// Responses
SignonRs
SignupRs