Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Ref ¶
type Ref struct { Local bool `json:"local"` PeerName string `json:"peerName"` TargetID strfmt.UUID `json:"targetID"` Class string `json:"className"` }
Ref is an abstraction of the cross-refs which are specified in a URI format in the API. When this type is used it is safe to assume that a Ref is semantically valid. This guarantee would not be possible on the URI format, as the URI can be well-formed, but not contain the data we expect in it. Do not use directly, such as crossref.Ref{}, as you won't have any guarantees in this case. Always use one of the parsing options or New()
func New ¶
New is a safe way to generate a Reference, as all required arguments must be set in the constructor fn
func Parse ¶
Parse is a safe way to generate a Ref, as it will error if any of the input parameters are not as expected.
func ParseSingleRef ¶
ParseSingleRef is a safe way to generate a Ref from a models.SingleRef, a helper construct that represents the API structure. It will error if any of the input parameters are not as expected.
type RefSource ¶
type RefSource struct { Local bool `json:"local"` PeerName string `json:"peerName"` Property schema.PropertyName `json:"property"` Class schema.ClassName `json:"class"` TargetID strfmt.UUID `json:"targetID"` }
RefSource is an abstraction of the source of a cross-ref. The opposite would be Ref which represents the target insted. A RefSource is specified in a URI format in the API. When this type is used it is safe to assume that a Ref is semantically valid. This guarantuee would not be possible on the URI format, as the URI can be well-formed, but not contain the data we expect in it. Do not use directly, such as crossref.RefSource{}, as you won't have any guarantees in this case. Always use one of the parsing options or New()
func ParseSource ¶
ParseSource is a safe way to generate a RefSource, as it will error if any of the input parameters are not as expected.