Documentation ¶
Index ¶
- func HasMandatoryEndpoints(checker model.ConditionalityChecker, discoveryConfig *Model) (bool, []string, error)
- func HasValidEndpoints(checker model.ConditionalityChecker, discoveryConfig *Model) (bool, []string, error)
- func SupportedVersions() map[string]bool
- func Validate(checker model.ConditionalityChecker, discovery *Model) (bool, []string, error)
- func Version() string
- type Model
- type ModelAPISpecification
- type ModelConditionalProperties
- type ModelDiscovery
- type ModelDiscoveryItem
- type ModelEndpoint
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HasMandatoryEndpoints ¶
func HasMandatoryEndpoints(checker model.ConditionalityChecker, discoveryConfig *Model) (bool, []string, error)
HasMandatoryEndpoints - checks that all the mandatory endpoints have been defined in each discovery model, otherwise it returns a error with all the missing mandatory endpoints separated by a newline.
func HasValidEndpoints ¶
func HasValidEndpoints(checker model.ConditionalityChecker, discoveryConfig *Model) (bool, []string, error)
HasValidEndpoints - checks that all the endpoints defined in the discovery model are either mandatory, conditional or optional. Return false and errors indicating which endpoints are not valid.
func SupportedVersions ¶
SupportedVersions - returns map of supported versions
Types ¶
type Model ¶
type Model struct {
DiscoveryModel ModelDiscovery `json:"discoveryModel" validate:"required,dive"`
}
Model ... TODO: Document.
type ModelAPISpecification ¶
type ModelAPISpecification struct { Name string `json:"name" validate:"required"` URL string `json:"url" validate:"required,url"` Version string `json:"version" validate:"required"` SchemaVersion string `json:"schemaVersion" validate:"required,url"` }
ModelAPISpecification ... TODO: Document.
type ModelConditionalProperties ¶
type ModelConditionalProperties struct { Schema string `json:"schema" validate:"required"` Property string `json:"property" validate:"required"` Path string `json:"path" validate:"required"` }
ModelConditionalProperties ... TODO: Document.
type ModelDiscovery ¶
type ModelDiscovery struct { Version string `json:"version" validate:"required"` DiscoveryItems []ModelDiscoveryItem `json:"discoveryItems" validate:"required,gt=0,dive"` }
ModelDiscovery ... TODO: Document.
type ModelDiscoveryItem ¶
type ModelDiscoveryItem struct { APISpecification ModelAPISpecification `json:"apiSpecification" validate:"required"` OpenidConfigurationURI string `json:"openidConfigurationUri" validate:"required,url"` ResourceBaseURI string `json:"resourceBaseUri" validate:"required,url"` Endpoints []ModelEndpoint `json:"endpoints" validate:"required,gt=0,dive"` }
ModelDiscoveryItem ... TODO: Document.
type ModelEndpoint ¶
type ModelEndpoint struct { Method string `json:"method" validate:"required"` Path string `json:"path" validate:"required,uri"` ConditionalProperties []ModelConditionalProperties `json:"conditionalProperties,omitempty" validate:"dive"` }
ModelEndpoint ... TODO: Document.