1
0
mirror of https://github.com/aclindsa/ofxgo.git synced 2025-07-01 11:48:38 -04:00

Use named constants instead of strings for enum-like OFX fields

This adds a python script to generate constants.go when `go generate` is
called, and updates the structs, tests, and command-line client to all
use the new named constants.
This commit is contained in:
2017-04-06 05:58:22 -04:00
parent ea700b33a9
commit 4521bb377a
16 changed files with 3030 additions and 382 deletions

View File

@ -233,11 +233,11 @@ NEWFILEUID:NONE
Name: "SIGNONMSGSETV1",
Ver: 1,
Url: "https://ofx.example.com/cgi-ofx/exampleofx",
OfxSec: "NONE",
OfxSec: ofxgo.OfxSecNone,
TranspSec: true,
SignonRealm: "Example Trade",
Language: []ofxgo.String{"ENG"},
SyncMode: "LITE",
SyncMode: ofxgo.SyncModeLite,
RespFileER: false,
// Ignored: <INTU.TIMEOUT>300
},
@ -245,11 +245,11 @@ NEWFILEUID:NONE
Name: "SIGNUPMSGSETV1",
Ver: 1,
Url: "https://ofx.example.com/cgi-ofx/exampleofx",
OfxSec: "NONE",
OfxSec: ofxgo.OfxSecNone,
TranspSec: true,
SignonRealm: "Example Trade",
Language: []ofxgo.String{"ENG"},
SyncMode: "LITE",
SyncMode: ofxgo.SyncModeLite,
RespFileER: false,
// Ignored: <INTU.TIMEOUT>300
},
@ -257,11 +257,11 @@ NEWFILEUID:NONE
Name: "INVSTMTMSGSETV1",
Ver: 1,
Url: "https://ofx.example.com/cgi-ofx/exampleofx",
OfxSec: "NONE",
OfxSec: ofxgo.OfxSecNone,
TranspSec: true,
SignonRealm: "Example Trade",
Language: []ofxgo.String{"ENG"},
SyncMode: "LITE",
SyncMode: ofxgo.SyncModeLite,
RespFileER: false,
// Ignored: <INTU.TIMEOUT>300
},
@ -269,11 +269,11 @@ NEWFILEUID:NONE
Name: "SECLISTMSGSETV1",
Ver: 1,
Url: "https://ofx.example.com/cgi-ofx/exampleofx",
OfxSec: "NONE",
OfxSec: ofxgo.OfxSecNone,
TranspSec: true,
SignonRealm: "Example Trade",
Language: []ofxgo.String{"ENG"},
SyncMode: "LITE",
SyncMode: ofxgo.SyncModeLite,
RespFileER: false,
// Ignored: <INTU.TIMEOUT>300
},
@ -281,11 +281,11 @@ NEWFILEUID:NONE
Name: "PROFMSGSETV1",
Ver: 1,
Url: "https://ofx.example.com/cgi-ofx/exampleofx",
OfxSec: "NONE",
OfxSec: ofxgo.OfxSecNone,
TranspSec: true,
SignonRealm: "Example Trade",
Language: []ofxgo.String{"ENG"},
SyncMode: "LITE",
SyncMode: ofxgo.SyncModeLite,
RespFileER: false,
// Ignored: <INTU.TIMEOUT>300
},
@ -295,7 +295,7 @@ NEWFILEUID:NONE
SignonRealm: "Example Trade",
Min: 1,
Max: 32,
CharType: "ALPHAORNUMERIC",
CharType: ofxgo.CharTypeAlphaOrNumeric,
CaseSen: false,
Special: true,
Spaces: false,