Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Credentials ¶
type InternalPassClient ¶
type InternalPassClient struct { Requester ExternalBaseURI string InternalBaseURI string Credentials *Credentials }
InternalPassClient uses "private" backend URIs for interacting with the PASS repository It is intended for use on private networks. Public URIs will be converted to private URIs when accessing the repository.
func (*InternalPassClient) FetchEntity ¶
func (c *InternalPassClient) FetchEntity(url string, entityPointer interface{}) error
FetchEntity fetches and parses the PASS entity at the given URL to the struct or map pointed to by entityPointer
type PassEntityFetcher ¶
PassEntityFetcher retrieves the JSON-LD content at the given url, and unmarshals it into the provided struct.
entityPointer is expected to be a pointer to a struct or map (i.e. anything encoding/json can unmarshal into). An error will be returned otherwise.
type Request ¶
type Request struct {
Resources []string
}
Request is a schema service request, logically containing a list of URLs
type SchemaRef ¶
type SchemaRef struct {
Schemas []string `json:"schemas"`
}
SchemaRef is a "cut down" pass entity containing only an array of schema URIs. It is a subset of the pass Repository entity.
func (*SchemaRef) Resolve ¶
func (r *SchemaRef) Resolve(resolver jsonschema.Fetcher) ([]jsonschema.Instance, error)
Resolve fetches and parses all schemas referenced by this SchemaRef
type SchemaService ¶
type SchemaService struct { PassClient PassEntityFetcher SchemaFetcher jsonschema.Fetcher }
func (*SchemaService) Schemas ¶
func (s *SchemaService) Schemas(r *Request) ([]jsonschema.Instance, error)