Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Endpoint ¶
type Endpoint struct {
// ID contains the ID of this endpoint. It must be unique for the vendor.
ID types.EndpointID `json:"id"`
// VendorID contains the ID of the vendor which owns this endpoint.
VendorID core.PartyID `json:"vid"`
// NotBefore contains the date/time indicating from when the endpoint could be used.
NotBefore time.Time `json:"nbf"`
// Expiry contains the date/time on or after which the service should not be used anymore. Optional.
Expiry *time.Time `json:"exp,omitempty"`
// Location contains the URL exposed by this endpoint.
Location URL `json:"loc"`
// Type contains the type of this endpoint
Type OIDURNValue `json:"type"`
}
Endpoint is a JSON marshalable implementation of an endpoint as specified by RFC006 Distributed Registry.
type OIDURNValue ¶
type OIDURNValue struct {
// contains filtered or unexported fields
}
OIDURNValue is a URN in the OID scheme in the format of `urn:oid:(some-oid):(some-value)`
func NewOIDURNValue ¶
func NewOIDURNValue(oid string, value string) (OIDURNValue, error)
NewOIDURNValue constructs a new OIDURNValue given the OID (e.g. `1.2.3.4`) and value (e.g. `some-value`).
func (OIDURNValue) MarshalJSON ¶
func (e OIDURNValue) MarshalJSON() ([]byte, error)
MarshalJSON marshals the OIDURNValue into a JSON string.
func (OIDURNValue) String ¶
func (e OIDURNValue) String() string
String formats the OIDURNValue as a string.
func (*OIDURNValue) UnmarshalJSON ¶
func (e *OIDURNValue) UnmarshalJSON(bytes []byte) error
UnmarshalJSON unmarshals a JSON string into a OIDURNValue. An error is returned if the format isn't `urn:oid:(some-oid):(some-value)`
type Organization ¶
type Organization struct {
// ID of the organization
ID core.PartyID `json:"id"`
// Name contains the name of this organization.
Name string `json:"name"`
// VendorID contains the ID of the vendor that registered this organization.
VendorID core.PartyID `json:"vid"`
// Proofs contains the pieces of cryptographically verifiable information that authenticate the organization. (TODO)
Proofs []Proof `json:"prfs,omitempty"`
}
Organization is a JSON marshalable implementation of an organization as specified by RFC006 Distributed Registry.
type Service ¶
type Service struct {
// VendorID contains the ID of the vendor which defined this service.
VendorID core.PartyID `json:"vid"`
// Organization contains the ID of the organization which offers this service.
OrganizationID core.PartyID `json:"oid"`
// Name contains the name of this service. It must be unique for the vendor/organization combination.
Name string `json:"name"`
// Endpoints contains an array of ID of endpoints (of the vendor) that are associated with this service.
Endpoints []types.EndpointID `json:"eps"`
// NotBefore contains the date/time indicating from when the service could be used.
NotBefore time.Time `json:"nbf"`
// Expiry contains the date/time on or after which the service should not be used anymore. Optional.
Expiry *time.Time `json:"exp,omitempty"`
}
Service is a JSON marshalable implementation of an service as specified by RFC006 Distributed Registry.
type URL ¶
URL wraps url.URL to aid JSON marshaling.
func (URL) MarshalJSON ¶
MarshalJSON marshals the URL into a JSON string.
func (*URL) UnmarshalJSON ¶
UnmarshalJSON unmarshals a JSON URL (e.g. "https://nuts.nl"). If the URL can't be parsed or isn't abosolute an error is returned.
type Vendor ¶
type Vendor struct {
// Certificates contains the CA certificates of the organization
Certificates []*cert.NutsCertificate `json:"certs"`
// Proofs contains the pieces of cryptographically verifiable information that authenticate the vendor. (TODO)
Proofs []Proof `json:"prfs,omitempty"`
}
Vendor is a JSON marshalable implementation of a vendor as specified by RFC006 Distributed Registry.