Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CachingDocumentLoader ¶
type CachingDocumentLoader struct {
// contains filtered or unexported fields
}
func NewCachingDocumentLoader ¶
func NewCachingDocumentLoader(upstream DocumentLoader) *CachingDocumentLoader
func (CachingDocumentLoader) LoadDocument ¶
func (dl CachingDocumentLoader) LoadDocument(ctx context.Context, u string, opts DocumentLoaderOptions) (RemoteDocument, error)
type DefaultDocumentLoader ¶
type DefaultDocumentLoader struct {
// contains filtered or unexported fields
}
func NewDefaultDocumentLoader ¶
func NewDefaultDocumentLoader(client *http.Client) *DefaultDocumentLoader
func (*DefaultDocumentLoader) LoadDocument ¶
func (dl *DefaultDocumentLoader) LoadDocument(ctx context.Context, u string, opts DocumentLoaderOptions) (RemoteDocument, error)
type DocumentLoader ¶
type DocumentLoader interface {
LoadDocument(ctx context.Context, url string, opts DocumentLoaderOptions) (RemoteDocument, error)
}
type DocumentLoaderFunc ¶
type DocumentLoaderFunc func(ctx context.Context, url string, opts DocumentLoaderOptions) (RemoteDocument, error)
func (DocumentLoaderFunc) LoadDocument ¶
func (f DocumentLoaderFunc) LoadDocument(ctx context.Context, url string, opts DocumentLoaderOptions) (RemoteDocument, error)
type DocumentLoaderOptions ¶
type ErrorCode ¶
type ErrorCode string
const ( CollidingKeywords ErrorCode = "colliding keywords" ConflictingIndexes ErrorCode = "conflicting indexes" ContextOverflow ErrorCode = "context overflow" CyclicIRIMapping ErrorCode = "cyclic IRI mapping" InvalidAtIDValue ErrorCode = "invalid @id value" InvalidAtImportValue ErrorCode = "invalid @import value" InvalidAtIncludedValue ErrorCode = "invalid @included value" InvalidAtIndexValue ErrorCode = "invalid @index value" InvalidAtNestValue ErrorCode = "invalid @nest value" InvalidAtPrefixValue ErrorCode = "invalid @prefix value" InvalidAtPropagateValue ErrorCode = "invalid @propagate value" InvalidAtProtectedValue ErrorCode = "invalid @protected value" InvalidAtReverseValue ErrorCode = "invalid @reverse value" InvalidAtVersionValue ErrorCode = "invalid @version value" InvalidBaseDirection ErrorCode = "invalid base direction" InvalidBaseIRI ErrorCode = "invalid base IRI" InvalidContainerMapping ErrorCode = "invalid container mapping" InvalidContextEntry ErrorCode = "invalid context entry" InvalidContextNullification ErrorCode = "invalid context nullification" InvalidDefaultLanguage ErrorCode = "invalid default language" InvalidIRIMapping ErrorCode = "invalid IRI mapping" InvalidJSONLiteral ErrorCode = "invalid JSON literal" InvalidKeywordAlias ErrorCode = "invalid keyword alias" InvalidLanguageMapValue ErrorCode = "invalid language map value" InvalidLanguageMapping ErrorCode = "invalid language mapping" InvalidLanguageTaggedString ErrorCode = "invalid language-tagged string" InvalidLanguageTaggedValue ErrorCode = "invalid language-tagged value" InvalidLocalContext ErrorCode = "invalid local context" InvalidRemoteContext ErrorCode = "invalid remote context" InvalidReversePropertyMap ErrorCode = "invalid reverse property map" InvalidReversePropertyValue ErrorCode = "invalid reverse property value" InvalidReverseProperty ErrorCode = "invalid reverse property" InvalidScopedContext ErrorCode = "invalid scoped context" InvalidScriptElement ErrorCode = "invalid script element" InvalidSetOrListObject ErrorCode = "invalid set or list object" InvalidTermDefinition ErrorCode = "invalid term definition" InvalidTypeMapping ErrorCode = "invalid type mapping" InvalidTypeValue ErrorCode = "invalid type value" InvalidTypedValue ErrorCode = "invalid typed value" InvalidValueObjectValue ErrorCode = "invalid value object value" InvalidValueObject ErrorCode = "invalid value object" InvalidVocabMapping ErrorCode = "invalid vocab mapping" IRIConfusedWithPrefix ErrorCode = "IRI confused with prefix" KeywordRedefinition ErrorCode = "keyword redefinition" LoadingDocumentFailed ErrorCode = "loading document failed" LoadingRemoteContextFailed ErrorCode = "loading remote context failed" MultipleContextLinkHeaders ErrorCode = "multiple context link headers" ProcessingModeConflict ErrorCode = "processing mode conflict" ProtectedTermRedefinition ErrorCode = "protected term redefinition" )
type ProcessorOptions ¶
type ProcessorOptions struct { ProcessingMode string BaseURL string DocumentLoader DocumentLoader ExpandContext inspectjson.Value }
type RemoteDocument ¶
type RemoteDocument struct { ContentType string ContextURL *url.URL Document inspectjson.Value DocumentURL *url.URL Profile string Headers http.Header }
[spec // 9.4.3] The RemoteDocument type is used by a LoadDocumentCallback to return information about a remote document or context.
type UnknownKeywordError ¶
type UnknownKeywordError struct {
Keyword string
}
func (*UnknownKeywordError) Error ¶
func (e *UnknownKeywordError) Error() string
Click to show internal directories.
Click to hide internal directories.