Documentation
¶
Overview ¶
Package knowlapi contains generated public HTTP transport bindings for Knowl.
Package knowlapi provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.5.1 DO NOT EDIT.
Index ¶
- Constants
- func Handler(si ServerInterface) http.Handler
- func HandlerFromMux(si ServerInterface, m ServeMux) http.Handler
- func HandlerFromMuxWithBaseURL(si ServerInterface, m ServeMux, baseURL string) http.Handler
- func HandlerWithOptions(si ServerInterface, options StdHTTPServerOptions) http.Handler
- type Citation
- type CitationKind
- type ErrorResponse
- type EvidenceItem
- type Failure
- type GetHealth200JSONResponse
- type GetHealthRequestObject
- type GetHealthResponseObject
- type GetOperation200JSONResponse
- type GetOperation400JSONResponse
- type GetOperation401JSONResponse
- type GetOperation403JSONResponse
- type GetOperation404JSONResponse
- type GetOperation422JSONResponse
- type GetOperation503JSONResponse
- type GetOperationRequestObject
- type GetOperationResponseObject
- type GetReady200JSONResponse
- type GetReady503JSONResponse
- type GetReadyRequestObject
- type GetReadyResponseObject
- type HealthResponse
- type HealthResponseStatus
- type IngestKnowledge200JSONResponse
- type IngestKnowledge400JSONResponse
- type IngestKnowledge401JSONResponse
- type IngestKnowledge403JSONResponse
- type IngestKnowledge422JSONResponse
- type IngestKnowledge503JSONResponse
- type IngestKnowledgeJSONRequestBody
- type IngestKnowledgeRequestObject
- type IngestKnowledgeResponseObject
- type IngestRequest
- type IngestResult
- type IngestResultStatus
- type InvalidParamFormatError
- type JSONBodyBadRequest
- type JSONBodyBadRequestJSONResponse
- type MiddlewareFunc
- type NotFound
- type NotFoundJSONResponse
- type OKFAttester
- type OKFExecutor
- type OKFExtensions
- type OKFGeneration
- type OKFMetadata
- type OKFMetadataEffectiveStatus
- type OKFMetadataStatus
- type OKFMetadataTrustTier
- type OKFParameter
- type OKFSource
- type OKFUsageWindow
- type OKFVerification
- type OperationFailed
- type OperationFailedJSONResponse
- type OperationID
- type OperationIDBadRequest
- type OperationIDBadRequestJSONResponse
- type OperationResult
- type OperationResultStatus
- type QueryStringBadRequest
- type QueryStringBadRequestJSONResponse
- type ReadyResponse
- type ReadyResponseStatus
- type RequiredHeaderError
- type RequiredParamError
- type RetrieveKnowledge200JSONResponse
- type RetrieveKnowledge400JSONResponse
- type RetrieveKnowledge401JSONResponse
- type RetrieveKnowledge403JSONResponse
- type RetrieveKnowledge422JSONResponse
- type RetrieveKnowledge503JSONResponse
- type RetrieveKnowledgeParams
- type RetrieveKnowledgeRequestObject
- type RetrieveKnowledgeResponseObject
- type RetrieveQuery
- type RetrieveResult
- type RetrieveSource
- type ScopeOverrideForbidden
- type ScopeOverrideForbiddenJSONResponse
- type ServeMux
- type ServerInterface
- type ServerInterfaceWrapper
- func (siw *ServerInterfaceWrapper) GetHealth(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetOperation(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetReady(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) IngestKnowledge(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) RetrieveKnowledge(w http.ResponseWriter, r *http.Request)
- type SourceDocument
- type StdHTTPServerOptions
- type StrictHTTPServerOptions
- type StrictHandlerFunc
- type StrictMiddlewareFunc
- type StrictServerInterface
- type TooManyValuesForParamError
- type Unauthorized
- type UnauthorizedJSONResponse
- type UnauthorizedResponseHeaders
- type UnavailableError
- type UnavailableErrorJSONResponse
- type UnescapedCookieParamError
- type UnmarshalingParamError
Constants ¶
const (
BearerAuthScopes = "bearerAuth.Scopes"
)
Variables ¶
This section is empty.
Functions ¶
func Handler ¶
func Handler(si ServerInterface) http.Handler
Handler creates http.Handler with routing matching OpenAPI spec.
func HandlerFromMux ¶
func HandlerFromMux(si ServerInterface, m ServeMux) http.Handler
HandlerFromMux creates http.Handler with routing matching OpenAPI spec based on the provided mux.
func HandlerFromMuxWithBaseURL ¶
func HandlerFromMuxWithBaseURL(si ServerInterface, m ServeMux, baseURL string) http.Handler
func HandlerWithOptions ¶
func HandlerWithOptions(si ServerInterface, options StdHTTPServerOptions) http.Handler
HandlerWithOptions creates http.Handler with additional options
Types ¶
type Citation ¶
type Citation struct {
Kind CitationKind `json:"kind"`
PageId *string `json:"page_id,omitempty"`
Path *string `json:"path,omitempty"`
Reference string `json:"reference"`
SourceRef *string `json:"source_ref,omitempty"`
Untrusted bool `json:"untrusted"`
}
Citation defines model for Citation.
type CitationKind ¶
type CitationKind string
CitationKind defines model for Citation.Kind.
const ( Raw CitationKind = "raw" Wiki CitationKind = "wiki" )
Defines values for CitationKind.
type ErrorResponse ¶
type ErrorResponse struct {
Error string `json:"error"`
}
ErrorResponse defines model for ErrorResponse.
type EvidenceItem ¶
type EvidenceItem struct {
DocumentId *string `json:"document_id,omitempty"`
Okf *OKFMetadata `json:"okf,omitempty"`
PageId string `json:"page_id"`
Revision *string `json:"revision,omitempty"`
Snippet string `json:"snippet"`
SourceDocuments *[]SourceDocument `json:"source_documents,omitempty"`
SourceId *string `json:"source_id,omitempty"`
SourceRefs *[]string `json:"source_refs,omitempty"`
Title string `json:"title"`
Untrusted bool `json:"untrusted"`
Uri *string `json:"uri,omitempty"`
}
EvidenceItem defines model for EvidenceItem.
type GetHealth200JSONResponse ¶
type GetHealth200JSONResponse HealthResponse
func (GetHealth200JSONResponse) VisitGetHealthResponse ¶
func (response GetHealth200JSONResponse) VisitGetHealthResponse(w http.ResponseWriter) error
type GetHealthRequestObject ¶
type GetHealthRequestObject struct {
}
type GetHealthResponseObject ¶
type GetHealthResponseObject interface {
VisitGetHealthResponse(w http.ResponseWriter) error
}
type GetOperation200JSONResponse ¶
type GetOperation200JSONResponse OperationResult
func (GetOperation200JSONResponse) VisitGetOperationResponse ¶
func (response GetOperation200JSONResponse) VisitGetOperationResponse(w http.ResponseWriter) error
type GetOperation400JSONResponse ¶
type GetOperation400JSONResponse struct {
OperationIDBadRequestJSONResponse
}
func (GetOperation400JSONResponse) VisitGetOperationResponse ¶
func (response GetOperation400JSONResponse) VisitGetOperationResponse(w http.ResponseWriter) error
type GetOperation401JSONResponse ¶
func (GetOperation401JSONResponse) VisitGetOperationResponse ¶
func (response GetOperation401JSONResponse) VisitGetOperationResponse(w http.ResponseWriter) error
type GetOperation403JSONResponse ¶
type GetOperation403JSONResponse struct {
ScopeOverrideForbiddenJSONResponse
}
func (GetOperation403JSONResponse) VisitGetOperationResponse ¶
func (response GetOperation403JSONResponse) VisitGetOperationResponse(w http.ResponseWriter) error
type GetOperation404JSONResponse ¶
type GetOperation404JSONResponse struct{ NotFoundJSONResponse }
func (GetOperation404JSONResponse) VisitGetOperationResponse ¶
func (response GetOperation404JSONResponse) VisitGetOperationResponse(w http.ResponseWriter) error
type GetOperation422JSONResponse ¶
type GetOperation422JSONResponse struct{ OperationFailedJSONResponse }
func (GetOperation422JSONResponse) VisitGetOperationResponse ¶
func (response GetOperation422JSONResponse) VisitGetOperationResponse(w http.ResponseWriter) error
type GetOperation503JSONResponse ¶
func (GetOperation503JSONResponse) VisitGetOperationResponse ¶
func (response GetOperation503JSONResponse) VisitGetOperationResponse(w http.ResponseWriter) error
type GetOperationRequestObject ¶
type GetOperationRequestObject struct {
OperationId OperationID `json:"operation_id"`
}
type GetOperationResponseObject ¶
type GetOperationResponseObject interface {
VisitGetOperationResponse(w http.ResponseWriter) error
}
type GetReady200JSONResponse ¶
type GetReady200JSONResponse ReadyResponse
func (GetReady200JSONResponse) VisitGetReadyResponse ¶
func (response GetReady200JSONResponse) VisitGetReadyResponse(w http.ResponseWriter) error
type GetReady503JSONResponse ¶
type GetReady503JSONResponse ReadyResponse
func (GetReady503JSONResponse) VisitGetReadyResponse ¶
func (response GetReady503JSONResponse) VisitGetReadyResponse(w http.ResponseWriter) error
type GetReadyRequestObject ¶
type GetReadyRequestObject struct {
}
type GetReadyResponseObject ¶
type GetReadyResponseObject interface {
VisitGetReadyResponse(w http.ResponseWriter) error
}
type HealthResponse ¶
type HealthResponse struct {
Service string `json:"service"`
Status HealthResponseStatus `json:"status"`
}
HealthResponse defines model for HealthResponse.
type HealthResponseStatus ¶
type HealthResponseStatus string
HealthResponseStatus defines model for HealthResponse.Status.
const (
Ok HealthResponseStatus = "ok"
)
Defines values for HealthResponseStatus.
type IngestKnowledge200JSONResponse ¶
type IngestKnowledge200JSONResponse IngestResult
func (IngestKnowledge200JSONResponse) VisitIngestKnowledgeResponse ¶
func (response IngestKnowledge200JSONResponse) VisitIngestKnowledgeResponse(w http.ResponseWriter) error
type IngestKnowledge400JSONResponse ¶
type IngestKnowledge400JSONResponse struct{ JSONBodyBadRequestJSONResponse }
func (IngestKnowledge400JSONResponse) VisitIngestKnowledgeResponse ¶
func (response IngestKnowledge400JSONResponse) VisitIngestKnowledgeResponse(w http.ResponseWriter) error
type IngestKnowledge401JSONResponse ¶
func (IngestKnowledge401JSONResponse) VisitIngestKnowledgeResponse ¶
func (response IngestKnowledge401JSONResponse) VisitIngestKnowledgeResponse(w http.ResponseWriter) error
type IngestKnowledge403JSONResponse ¶
type IngestKnowledge403JSONResponse struct {
ScopeOverrideForbiddenJSONResponse
}
func (IngestKnowledge403JSONResponse) VisitIngestKnowledgeResponse ¶
func (response IngestKnowledge403JSONResponse) VisitIngestKnowledgeResponse(w http.ResponseWriter) error
type IngestKnowledge422JSONResponse ¶
type IngestKnowledge422JSONResponse struct{ OperationFailedJSONResponse }
func (IngestKnowledge422JSONResponse) VisitIngestKnowledgeResponse ¶
func (response IngestKnowledge422JSONResponse) VisitIngestKnowledgeResponse(w http.ResponseWriter) error
type IngestKnowledge503JSONResponse ¶
func (IngestKnowledge503JSONResponse) VisitIngestKnowledgeResponse ¶
func (response IngestKnowledge503JSONResponse) VisitIngestKnowledgeResponse(w http.ResponseWriter) error
type IngestKnowledgeJSONRequestBody ¶
type IngestKnowledgeJSONRequestBody = IngestRequest
IngestKnowledgeJSONRequestBody defines body for IngestKnowledge for application/json ContentType.
type IngestKnowledgeRequestObject ¶
type IngestKnowledgeRequestObject struct {
Body *IngestKnowledgeJSONRequestBody
}
type IngestKnowledgeResponseObject ¶
type IngestKnowledgeResponseObject interface {
VisitIngestKnowledgeResponse(w http.ResponseWriter) error
}
type IngestRequest ¶
type IngestRequest struct {
// Content Raw source content.
Content *string `json:"content,omitempty"`
IdempotencyKey *string `json:"idempotency_key,omitempty"`
MediaType *string `json:"media_type,omitempty"`
Origin *string `json:"origin,omitempty"`
// Uri External source URI.
Uri *string `json:"uri,omitempty"`
}
IngestRequest defines model for IngestRequest.
type IngestResult ¶
type IngestResult struct {
OperationId string `json:"operation_id"`
Status IngestResultStatus `json:"status"`
}
IngestResult defines model for IngestResult.
type IngestResultStatus ¶
type IngestResultStatus string
IngestResultStatus defines model for IngestResult.Status.
const ( IngestResultStatusCompleted IngestResultStatus = "completed" IngestResultStatusFailed IngestResultStatus = "failed" IngestResultStatusQueued IngestResultStatus = "queued" IngestResultStatusRunning IngestResultStatus = "running" )
Defines values for IngestResultStatus.
type InvalidParamFormatError ¶
func (*InvalidParamFormatError) Error ¶
func (e *InvalidParamFormatError) Error() string
func (*InvalidParamFormatError) Unwrap ¶
func (e *InvalidParamFormatError) Unwrap() error
type JSONBodyBadRequest ¶
type JSONBodyBadRequest = ErrorResponse
JSONBodyBadRequest defines model for JSONBodyBadRequest.
type JSONBodyBadRequestJSONResponse ¶
type JSONBodyBadRequestJSONResponse ErrorResponse
type NotFoundJSONResponse ¶
type NotFoundJSONResponse ErrorResponse
type OKFAttester ¶ added in v0.3.0
type OKFAttester struct {
Extensions *OKFExtensions `json:"extensions,omitempty"`
Resource string `json:"resource"`
}
OKFAttester defines model for OKFAttester.
type OKFExecutor ¶ added in v0.3.0
type OKFExecutor struct {
Extensions *OKFExtensions `json:"extensions,omitempty"`
Receipt *[]string `json:"receipt,omitempty"`
Resource string `json:"resource"`
}
OKFExecutor defines model for OKFExecutor.
type OKFExtensions ¶ added in v0.3.0
type OKFExtensions map[string]interface{}
OKFExtensions defines model for OKFExtensions.
type OKFGeneration ¶ added in v0.3.0
type OKFGeneration struct {
At *time.Time `json:"at,omitempty"`
By string `json:"by"`
Extensions *OKFExtensions `json:"extensions,omitempty"`
}
OKFGeneration defines model for OKFGeneration.
type OKFMetadata ¶ added in v0.3.0
type OKFMetadata struct {
Attester *OKFAttester `json:"attester,omitempty"`
Computation *string `json:"computation,omitempty"`
Description *string `json:"description,omitempty"`
EffectiveStatus *OKFMetadataEffectiveStatus `json:"effective_status,omitempty"`
Executor *OKFExecutor `json:"executor,omitempty"`
Extensions *OKFExtensions `json:"extensions,omitempty"`
Generated *OKFGeneration `json:"generated,omitempty"`
Parameters *[]OKFParameter `json:"parameters,omitempty"`
Resource *string `json:"resource,omitempty"`
Runtime *string `json:"runtime,omitempty"`
Sources *[]OKFSource `json:"sources,omitempty"`
Stale *bool `json:"stale,omitempty"`
StaleAfter *time.Time `json:"stale_after,omitempty"`
Status *OKFMetadataStatus `json:"status,omitempty"`
Tags *[]string `json:"tags,omitempty"`
Title *string `json:"title,omitempty"`
TrustTier *OKFMetadataTrustTier `json:"trust_tier,omitempty"`
Type string `json:"type"`
UsageWindow *OKFUsageWindow `json:"usage_window,omitempty"`
Verified *[]OKFVerification `json:"verified,omitempty"`
}
OKFMetadata defines model for OKFMetadata.
type OKFMetadataEffectiveStatus ¶ added in v0.3.0
type OKFMetadataEffectiveStatus string
OKFMetadataEffectiveStatus defines model for OKFMetadata.EffectiveStatus.
const ( OKFMetadataEffectiveStatusDeprecated OKFMetadataEffectiveStatus = "deprecated" OKFMetadataEffectiveStatusDraft OKFMetadataEffectiveStatus = "draft" OKFMetadataEffectiveStatusStable OKFMetadataEffectiveStatus = "stable" )
Defines values for OKFMetadataEffectiveStatus.
type OKFMetadataStatus ¶ added in v0.3.0
type OKFMetadataStatus string
OKFMetadataStatus defines model for OKFMetadata.Status.
const ( OKFMetadataStatusDeprecated OKFMetadataStatus = "deprecated" OKFMetadataStatusDraft OKFMetadataStatus = "draft" OKFMetadataStatusStable OKFMetadataStatus = "stable" )
Defines values for OKFMetadataStatus.
type OKFMetadataTrustTier ¶ added in v0.3.0
type OKFMetadataTrustTier string
OKFMetadataTrustTier defines model for OKFMetadata.TrustTier.
const ( HumanReviewed OKFMetadataTrustTier = "human-reviewed" MachineConfirmed OKFMetadataTrustTier = "machine-confirmed" Unverified OKFMetadataTrustTier = "unverified" )
Defines values for OKFMetadataTrustTier.
type OKFParameter ¶ added in v0.3.0
type OKFParameter struct {
Extensions *OKFExtensions `json:"extensions,omitempty"`
Name string `json:"name"`
Required bool `json:"required"`
Type string `json:"type"`
}
OKFParameter defines model for OKFParameter.
type OKFSource ¶ added in v0.3.0
type OKFSource struct {
Author *string `json:"author,omitempty"`
Extensions *OKFExtensions `json:"extensions,omitempty"`
Id *string `json:"id,omitempty"`
LastModified *time.Time `json:"last_modified,omitempty"`
Resource string `json:"resource"`
Title *string `json:"title,omitempty"`
UsageCount *uint64 `json:"usage_count,omitempty"`
UsageWindow *OKFUsageWindow `json:"usage_window,omitempty"`
}
OKFSource defines model for OKFSource.
type OKFUsageWindow ¶ added in v0.3.0
type OKFUsageWindow struct {
Extensions *OKFExtensions `json:"extensions,omitempty"`
From time.Time `json:"from"`
To time.Time `json:"to"`
}
OKFUsageWindow defines model for OKFUsageWindow.
type OKFVerification ¶ added in v0.3.0
type OKFVerification struct {
At time.Time `json:"at"`
By string `json:"by"`
Extensions *OKFExtensions `json:"extensions,omitempty"`
}
OKFVerification defines model for OKFVerification.
type OperationFailed ¶
type OperationFailed = ErrorResponse
OperationFailed defines model for OperationFailed.
type OperationFailedJSONResponse ¶
type OperationFailedJSONResponse ErrorResponse
type OperationIDBadRequest ¶
type OperationIDBadRequest = ErrorResponse
OperationIDBadRequest defines model for OperationIDBadRequest.
type OperationIDBadRequestJSONResponse ¶
type OperationIDBadRequestJSONResponse ErrorResponse
type OperationResult ¶
type OperationResult struct {
Failure *Failure `json:"failure,omitempty"`
Id string `json:"id"`
Status OperationResultStatus `json:"status"`
UpdatedAt time.Time `json:"updated_at"`
}
OperationResult defines model for OperationResult.
type OperationResultStatus ¶
type OperationResultStatus string
OperationResultStatus defines model for OperationResult.Status.
const ( OperationResultStatusCompleted OperationResultStatus = "completed" OperationResultStatusFailed OperationResultStatus = "failed" OperationResultStatusQueued OperationResultStatus = "queued" OperationResultStatusRunning OperationResultStatus = "running" )
Defines values for OperationResultStatus.
type QueryStringBadRequest ¶
type QueryStringBadRequest = ErrorResponse
QueryStringBadRequest defines model for QueryStringBadRequest.
type QueryStringBadRequestJSONResponse ¶
type QueryStringBadRequestJSONResponse ErrorResponse
type ReadyResponse ¶
type ReadyResponse struct {
// Scope Trusted scope reported only when the host is ready.
Scope *string `json:"scope,omitempty"`
Service string `json:"service"`
Status ReadyResponseStatus `json:"status"`
}
ReadyResponse defines model for ReadyResponse.
type ReadyResponseStatus ¶
type ReadyResponseStatus string
ReadyResponseStatus defines model for ReadyResponse.Status.
const ( NotReady ReadyResponseStatus = "not_ready" Ready ReadyResponseStatus = "ready" )
Defines values for ReadyResponseStatus.
type RequiredHeaderError ¶
func (*RequiredHeaderError) Error ¶
func (e *RequiredHeaderError) Error() string
func (*RequiredHeaderError) Unwrap ¶
func (e *RequiredHeaderError) Unwrap() error
type RequiredParamError ¶
type RequiredParamError struct {
ParamName string
}
func (*RequiredParamError) Error ¶
func (e *RequiredParamError) Error() string
type RetrieveKnowledge200JSONResponse ¶
type RetrieveKnowledge200JSONResponse RetrieveResult
func (RetrieveKnowledge200JSONResponse) VisitRetrieveKnowledgeResponse ¶
func (response RetrieveKnowledge200JSONResponse) VisitRetrieveKnowledgeResponse(w http.ResponseWriter) error
type RetrieveKnowledge400JSONResponse ¶
type RetrieveKnowledge400JSONResponse struct {
QueryStringBadRequestJSONResponse
}
func (RetrieveKnowledge400JSONResponse) VisitRetrieveKnowledgeResponse ¶
func (response RetrieveKnowledge400JSONResponse) VisitRetrieveKnowledgeResponse(w http.ResponseWriter) error
type RetrieveKnowledge401JSONResponse ¶
func (RetrieveKnowledge401JSONResponse) VisitRetrieveKnowledgeResponse ¶
func (response RetrieveKnowledge401JSONResponse) VisitRetrieveKnowledgeResponse(w http.ResponseWriter) error
type RetrieveKnowledge403JSONResponse ¶
type RetrieveKnowledge403JSONResponse struct {
ScopeOverrideForbiddenJSONResponse
}
func (RetrieveKnowledge403JSONResponse) VisitRetrieveKnowledgeResponse ¶
func (response RetrieveKnowledge403JSONResponse) VisitRetrieveKnowledgeResponse(w http.ResponseWriter) error
type RetrieveKnowledge422JSONResponse ¶
type RetrieveKnowledge422JSONResponse struct{ OperationFailedJSONResponse }
func (RetrieveKnowledge422JSONResponse) VisitRetrieveKnowledgeResponse ¶
func (response RetrieveKnowledge422JSONResponse) VisitRetrieveKnowledgeResponse(w http.ResponseWriter) error
type RetrieveKnowledge503JSONResponse ¶
func (RetrieveKnowledge503JSONResponse) VisitRetrieveKnowledgeResponse ¶
func (response RetrieveKnowledge503JSONResponse) VisitRetrieveKnowledgeResponse(w http.ResponseWriter) error
type RetrieveKnowledgeParams ¶
type RetrieveKnowledgeParams struct {
// Query Free-text retrieval query.
Query RetrieveQuery `form:"query" json:"query"`
// Source Optional repeatable source identity filter. Empty means all sources and curated pages.
Source *RetrieveSource `form:"source,omitempty" json:"source,omitempty"`
}
RetrieveKnowledgeParams defines parameters for RetrieveKnowledge.
type RetrieveKnowledgeRequestObject ¶
type RetrieveKnowledgeRequestObject struct {
Params RetrieveKnowledgeParams
}
type RetrieveKnowledgeResponseObject ¶
type RetrieveKnowledgeResponseObject interface {
VisitRetrieveKnowledgeResponse(w http.ResponseWriter) error
}
type RetrieveResult ¶
type RetrieveResult struct {
Citations *[]Citation `json:"citations,omitempty"`
Evidence []EvidenceItem `json:"evidence"`
Query string `json:"query"`
}
RetrieveResult defines model for RetrieveResult.
type RetrieveSource ¶ added in v0.3.0
type RetrieveSource = []string
RetrieveSource defines model for RetrieveSource.
type ScopeOverrideForbidden ¶
type ScopeOverrideForbidden = ErrorResponse
ScopeOverrideForbidden defines model for ScopeOverrideForbidden.
type ScopeOverrideForbiddenJSONResponse ¶
type ScopeOverrideForbiddenJSONResponse ErrorResponse
type ServeMux ¶
type ServeMux interface {
HandleFunc(pattern string, handler func(http.ResponseWriter, *http.Request))
ServeHTTP(w http.ResponseWriter, r *http.Request)
}
ServeMux is an abstraction of http.ServeMux.
type ServerInterface ¶
type ServerInterface interface {
// Liveness probe
// (GET /healthz)
GetHealth(w http.ResponseWriter, r *http.Request)
// Readiness probe
// (GET /readyz)
GetReady(w http.ResponseWriter, r *http.Request)
// Submit one bounded source to the trusted Knowl ingest pipeline
// (POST /v1/ingest)
IngestKnowledge(w http.ResponseWriter, r *http.Request)
// Read one durable Knowl operation status
// (GET /v1/operations/{operation_id})
GetOperation(w http.ResponseWriter, r *http.Request, operationId OperationID)
// Retrieve bounded evidence from the trusted Knowl scope
// (GET /v1/retrieve)
RetrieveKnowledge(w http.ResponseWriter, r *http.Request, params RetrieveKnowledgeParams)
}
ServerInterface represents all server handlers.
func NewStrictHandler ¶
func NewStrictHandler(ssi StrictServerInterface, middlewares []StrictMiddlewareFunc) ServerInterface
func NewStrictHandlerWithOptions ¶
func NewStrictHandlerWithOptions(ssi StrictServerInterface, middlewares []StrictMiddlewareFunc, options StrictHTTPServerOptions) ServerInterface
type ServerInterfaceWrapper ¶
type ServerInterfaceWrapper struct {
Handler ServerInterface
HandlerMiddlewares []MiddlewareFunc
ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
}
ServerInterfaceWrapper converts contexts to parameters.
func (*ServerInterfaceWrapper) GetHealth ¶
func (siw *ServerInterfaceWrapper) GetHealth(w http.ResponseWriter, r *http.Request)
GetHealth operation middleware
func (*ServerInterfaceWrapper) GetOperation ¶
func (siw *ServerInterfaceWrapper) GetOperation(w http.ResponseWriter, r *http.Request)
GetOperation operation middleware
func (*ServerInterfaceWrapper) GetReady ¶
func (siw *ServerInterfaceWrapper) GetReady(w http.ResponseWriter, r *http.Request)
GetReady operation middleware
func (*ServerInterfaceWrapper) IngestKnowledge ¶
func (siw *ServerInterfaceWrapper) IngestKnowledge(w http.ResponseWriter, r *http.Request)
IngestKnowledge operation middleware
func (*ServerInterfaceWrapper) RetrieveKnowledge ¶
func (siw *ServerInterfaceWrapper) RetrieveKnowledge(w http.ResponseWriter, r *http.Request)
RetrieveKnowledge operation middleware
type SourceDocument ¶ added in v0.3.0
type SourceDocument struct {
DocumentId string `json:"document_id"`
Revision string `json:"revision"`
SourceId string `json:"source_id"`
Uri string `json:"uri"`
}
SourceDocument defines model for SourceDocument.
type StdHTTPServerOptions ¶
type StdHTTPServerOptions struct {
BaseURL string
BaseRouter ServeMux
Middlewares []MiddlewareFunc
ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
}
type StrictHTTPServerOptions ¶
type StrictHTTPServerOptions struct {
RequestErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
ResponseErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
}
type StrictHandlerFunc ¶
type StrictHandlerFunc = strictnethttp.StrictHTTPHandlerFunc
type StrictMiddlewareFunc ¶
type StrictMiddlewareFunc = strictnethttp.StrictHTTPMiddlewareFunc
type StrictServerInterface ¶
type StrictServerInterface interface {
// Liveness probe
// (GET /healthz)
GetHealth(ctx context.Context, request GetHealthRequestObject) (GetHealthResponseObject, error)
// Readiness probe
// (GET /readyz)
GetReady(ctx context.Context, request GetReadyRequestObject) (GetReadyResponseObject, error)
// Submit one bounded source to the trusted Knowl ingest pipeline
// (POST /v1/ingest)
IngestKnowledge(ctx context.Context, request IngestKnowledgeRequestObject) (IngestKnowledgeResponseObject, error)
// Read one durable Knowl operation status
// (GET /v1/operations/{operation_id})
GetOperation(ctx context.Context, request GetOperationRequestObject) (GetOperationResponseObject, error)
// Retrieve bounded evidence from the trusted Knowl scope
// (GET /v1/retrieve)
RetrieveKnowledge(ctx context.Context, request RetrieveKnowledgeRequestObject) (RetrieveKnowledgeResponseObject, error)
}
StrictServerInterface represents all server handlers.
type TooManyValuesForParamError ¶
func (*TooManyValuesForParamError) Error ¶
func (e *TooManyValuesForParamError) Error() string
type UnauthorizedJSONResponse ¶
type UnauthorizedJSONResponse struct {
}
type UnauthorizedResponseHeaders ¶
type UnauthorizedResponseHeaders struct {
}
type UnavailableError ¶
type UnavailableError = ErrorResponse
UnavailableError defines model for UnavailableError.
type UnavailableErrorJSONResponse ¶
type UnavailableErrorJSONResponse ErrorResponse
type UnescapedCookieParamError ¶
func (*UnescapedCookieParamError) Error ¶
func (e *UnescapedCookieParamError) Error() string
func (*UnescapedCookieParamError) Unwrap ¶
func (e *UnescapedCookieParamError) Unwrap() error
type UnmarshalingParamError ¶
func (*UnmarshalingParamError) Error ¶
func (e *UnmarshalingParamError) Error() string
func (*UnmarshalingParamError) Unwrap ¶
func (e *UnmarshalingParamError) Unwrap() error