Merge pull request #477 from beckn/feature/tagzero
added tag omitZero to the subscriber and subscription struct
This commit is contained in:
@@ -10,24 +10,24 @@ import (
|
|||||||
|
|
||||||
// Subscriber represents a unique operational configuration of a trusted platform on a network.
|
// Subscriber represents a unique operational configuration of a trusted platform on a network.
|
||||||
type Subscriber struct {
|
type Subscriber struct {
|
||||||
SubscriberID string `json:"subscriber_id"`
|
SubscriberID string `json:"subscriber_id,omitzero"`
|
||||||
URL string `json:"url" format:"uri"`
|
URL string `json:"url,omitzero" format:"uri"`
|
||||||
Type string `json:"type" enum:"BAP,BPP,BG"`
|
Type string `json:"type,omitzero" enum:"BAP,BPP,BG"`
|
||||||
Domain string `json:"domain"`
|
Domain string `json:"domain,omitzero"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Subscription represents subscription details of a network participant.
|
// Subscription represents subscription details of a network participant.
|
||||||
type Subscription struct {
|
type Subscription struct {
|
||||||
Subscriber `json:",inline"`
|
Subscriber `json:",inline"`
|
||||||
KeyID string `json:"key_id" format:"uuid"`
|
KeyID string `json:"key_id,omitzero" format:"uuid"`
|
||||||
SigningPublicKey string `json:"signing_public_key"`
|
SigningPublicKey string `json:"signing_public_key,omitzero"`
|
||||||
EncrPublicKey string `json:"encr_public_key"`
|
EncrPublicKey string `json:"encr_public_key,omitzero"`
|
||||||
ValidFrom time.Time `json:"valid_from" format:"date-time"`
|
ValidFrom time.Time `json:"valid_from,omitzero" format:"date-time"`
|
||||||
ValidUntil time.Time `json:"valid_until" format:"date-time"`
|
ValidUntil time.Time `json:"valid_until,omitzero" format:"date-time"`
|
||||||
Status string `json:"status" enum:"INITIATED,UNDER_SUBSCRIPTION,SUBSCRIBED,EXPIRED,UNSUBSCRIBED,INVALID_SSL"`
|
Status string `json:"status,omitzero" enum:"INITIATED,UNDER_SUBSCRIPTION,SUBSCRIBED,EXPIRED,UNSUBSCRIBED,INVALID_SSL"`
|
||||||
Created time.Time `json:"created" format:"date-time"`
|
Created time.Time `json:"created,omitzero" format:"date-time"`
|
||||||
Updated time.Time `json:"updated" format:"date-time"`
|
Updated time.Time `json:"updated,omitzero" format:"date-time"`
|
||||||
Nonce string
|
Nonce string `json:"nonce,omitzero"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Authorization-related constants for headers.
|
// Authorization-related constants for headers.
|
||||||
|
|||||||
Reference in New Issue
Block a user