Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
IRMA
Github mirrors
irmago
Commits
04112b93
Commit
04112b93
authored
Oct 03, 2019
by
Sietse Ringers
Committed by
Sietse Ringers
Oct 24, 2019
Browse files
feat: add deprecation tags to credential types and issuers
parent
b7b4715c
Changes
2
Hide whitespace changes
Inline
Side-by-side
descriptions.go
View file @
04112b93
...
...
@@ -49,6 +49,7 @@ type Issuer struct {
SchemeManagerID
string
`xml:"SchemeManager"`
ContactAddress
string
ContactEMail
string
DeprecatedSince
Timestamp
XMLVersion
int
`xml:"version,attr"`
Valid
bool
`xml:"-"`
...
...
@@ -68,6 +69,7 @@ type CredentialType struct {
XMLVersion
int
`xml:"version,attr"`
XMLName
xml
.
Name
`xml:"IssueSpecification"`
IssueURL
TranslatedString
`xml:"IssueURL"`
DeprecatedSince
Timestamp
Valid
bool
`xml:"-"`
}
...
...
requests.go
View file @
04112b93
...
...
@@ -2,6 +2,7 @@ package irma
import
(
"encoding/json"
"encoding/xml"
"fmt"
"io/ioutil"
"strconv"
...
...
@@ -652,6 +653,19 @@ func (t Timestamp) After(u Timestamp) bool {
return
time
.
Time
(
t
)
.
After
(
time
.
Time
(
u
))
}
func
(
t
*
Timestamp
)
MarshalXML
(
e
*
xml
.
Encoder
,
start
xml
.
StartElement
)
error
{
return
e
.
EncodeElement
(
t
.
String
(),
start
)
}
func
(
t
*
Timestamp
)
UnmarshalXML
(
d
*
xml
.
Decoder
,
start
xml
.
StartElement
)
error
{
var
ts
int64
if
err
:=
d
.
DecodeElement
(
&
ts
,
&
start
);
err
!=
nil
{
return
err
}
*
t
=
Timestamp
(
time
.
Unix
(
ts
,
0
))
return
nil
}
// MarshalJSON marshals a timestamp.
func
(
t
*
Timestamp
)
MarshalJSON
()
([]
byte
,
error
)
{
return
[]
byte
(
t
.
String
()),
nil
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment