Documentation
¶
Overview ¶
Package gen provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.8.2 DO NOT EDIT.
Index ¶
- 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 Annotation
- type AnnotationKind
- type AnnotationList
- type AnnotationPatch
- type BodyTooLarge
- type BodyTooLargeJSONResponse
- type ChatCitation
- type ChatDelta
- type ChatDisabled
- type ChatDisabledJSONResponse
- type ChatDone
- type ChatError
- type ChatErrorCode
- type ChatNotFound
- type ChatTool
- type ChatUsage
- type Citation
- type CodeLang
- type Conversation
- type ConversationDetail
- type ConversationList
- type CreateAnnotation201JSONResponse
- type CreateAnnotation400JSONResponse
- type CreateAnnotation401JSONResponse
- type CreateAnnotation403JSONResponse
- type CreateAnnotation404JSONResponse
- type CreateAnnotation413JSONResponse
- type CreateAnnotation422JSONResponse
- type CreateAnnotation429JSONResponse
- type CreateAnnotation500JSONResponse
- type CreateAnnotationJSONRequestBody
- type CreateAnnotationRequestObject
- type CreateAnnotationResponseObject
- type CreateConversation201JSONResponse
- type CreateConversation400JSONResponse
- type CreateConversation401JSONResponse
- type CreateConversation403JSONResponse
- type CreateConversation404JSONResponse
- type CreateConversation413JSONResponse
- type CreateConversation429JSONResponse
- type CreateConversation500JSONResponse
- type CreateConversation503JSONResponse
- type CreateConversationJSONRequestBody
- type CreateConversationRequest
- type CreateConversationRequestObject
- type CreateConversationResponseObject
- type CreateImport200JSONResponse
- type CreateImport202JSONResponse
- type CreateImport400JSONResponse
- type CreateImport401JSONResponse
- type CreateImport403JSONResponse
- type CreateImport413JSONResponse
- type CreateImport429JSONResponse
- type CreateImport500JSONResponse
- type CreateImportJSONRequestBody
- type CreateImportRequest
- type CreateImportRequestObject
- type CreateImportResponseObject
- type CreatePdfImport200JSONResponse
- type CreatePdfImport202JSONResponse
- type CreatePdfImport400JSONResponse
- type CreatePdfImport401JSONResponse
- type CreatePdfImport403JSONResponse
- type CreatePdfImport413JSONResponse
- type CreatePdfImport429JSONResponse
- type CreatePdfImport500JSONResponse
- type CreatePdfImportMultipartRequestBody
- type CreatePdfImportRequest
- type CreatePdfImportRequestObject
- type CreatePdfImportResponseObject
- type CrossOrigin
- type CrossOriginJSONResponse
- type DeleteAccountRequest
- type DeleteAnnotation204Response
- type DeleteAnnotation400JSONResponse
- type DeleteAnnotation401JSONResponse
- type DeleteAnnotation403JSONResponse
- type DeleteAnnotation404JSONResponse
- type DeleteAnnotation429JSONResponse
- type DeleteAnnotation500JSONResponse
- type DeleteAnnotationRequestObject
- type DeleteAnnotationResponseObject
- type DeleteConversation204Response
- type DeleteConversation400JSONResponse
- type DeleteConversation401JSONResponse
- type DeleteConversation403JSONResponse
- type DeleteConversation404JSONResponse
- type DeleteConversation429JSONResponse
- type DeleteConversation500JSONResponse
- type DeleteConversation503JSONResponse
- type DeleteConversationRequestObject
- type DeleteConversationResponseObject
- type DeleteDocument204Response
- type DeleteDocument400JSONResponse
- type DeleteDocument401JSONResponse
- type DeleteDocument403JSONResponse
- type DeleteDocument404JSONResponse
- type DeleteDocument429JSONResponse
- type DeleteDocument500JSONResponse
- type DeleteDocumentRequestObject
- type DeleteDocumentResponseObject
- type DocBlock
- type DocContent
- type Document
- type DocumentList
- type DocumentResponse
- type DocumentSummary
- type Error
- type ErrorBody
- type ErrorCode
- type ExistingImportResponse
- type GetConversation200JSONResponse
- type GetConversation400JSONResponse
- type GetConversation401JSONResponse
- type GetConversation404JSONResponse
- type GetConversation429JSONResponse
- type GetConversation500JSONResponse
- type GetConversation503JSONResponse
- type GetConversationRequestObject
- type GetConversationResponseObject
- type GetDocument200JSONResponse
- type GetDocument400JSONResponse
- type GetDocument401JSONResponse
- type GetDocument404JSONResponse
- type GetDocument429JSONResponse
- type GetDocument500JSONResponse
- type GetDocumentOriginal200ApplicationPdfResponse
- type GetDocumentOriginal200ResponseHeaders
- type GetDocumentOriginal400JSONResponse
- type GetDocumentOriginal401JSONResponse
- type GetDocumentOriginal404JSONResponse
- type GetDocumentOriginal429JSONResponse
- type GetDocumentOriginal500JSONResponse
- type GetDocumentOriginalRequestObject
- type GetDocumentOriginalResponseObject
- type GetDocumentRequestObject
- type GetDocumentResponseObject
- type GetImport200JSONResponse
- type GetImport400JSONResponse
- type GetImport401JSONResponse
- type GetImport404JSONResponse
- type GetImport429JSONResponse
- type GetImport500JSONResponse
- type GetImportRequestObject
- type GetImportResponseObject
- type GetMe200JSONResponse
- type GetMe401JSONResponse
- type GetMe429JSONResponse
- type GetMe500JSONResponse
- type GetMeRequestObject
- type GetMeResponseObject
- type ID
- type IRBlock
- type IRCell
- type IRDocument
- type IRExtractor
- type IRInline
- type IRItem
- type IRLink
- type IRPDF
- type IRSource
- type IRWarning
- type Import
- type ImportErrorCode
- type ImportEvent
- type ImportKind
- type ImportResponse
- type ImportStatus
- type InternalError
- type InternalErrorJSONResponse
- type InvalidParamFormatError
- type InvalidParameter
- type InvalidParameterJSONResponse
- type ListAnnotations200JSONResponse
- type ListAnnotations400JSONResponse
- type ListAnnotations401JSONResponse
- type ListAnnotations404JSONResponse
- type ListAnnotations429JSONResponse
- type ListAnnotations500JSONResponse
- type ListAnnotationsRequestObject
- type ListAnnotationsResponseObject
- type ListConversations200JSONResponse
- type ListConversations400JSONResponse
- type ListConversations401JSONResponse
- type ListConversations429JSONResponse
- type ListConversations500JSONResponse
- type ListConversations503JSONResponse
- type ListConversationsParams
- type ListConversationsRequestObject
- type ListConversationsResponseObject
- type ListDocuments200JSONResponse
- type ListDocuments400JSONResponse
- type ListDocuments401JSONResponse
- type ListDocuments429JSONResponse
- type ListDocuments500JSONResponse
- type ListDocumentsParams
- type ListDocumentsRequestObject
- type ListDocumentsResponseObject
- type Me
- type Message
- type MessageRole
- type MessageSegment
- type MessageStatus
- type MiddlewareFunc
- type NewAnnotation
- type NotFound
- type NotFoundJSONResponse
- type RateLimited
- type RateLimitedJSONResponse
- type RateLimitedResponseHeaders
- type ReanchorAnnotations200JSONResponse
- type ReanchorAnnotations400JSONResponse
- type ReanchorAnnotations401JSONResponse
- type ReanchorAnnotations403JSONResponse
- type ReanchorAnnotations404JSONResponse
- type ReanchorAnnotations409JSONResponse
- type ReanchorAnnotations413JSONResponse
- type ReanchorAnnotations422JSONResponse
- type ReanchorAnnotations429JSONResponse
- type ReanchorAnnotations500JSONResponse
- type ReanchorAnnotationsJSONRequestBody
- type ReanchorAnnotationsRequestObject
- type ReanchorAnnotationsResponseObject
- type ReanchorRequest
- type RequiredHeaderError
- type RequiredParamError
- type ResolveDocuments200JSONResponse
- type ResolveDocuments400JSONResponse
- type ResolveDocuments401JSONResponse
- type ResolveDocuments403JSONResponse
- type ResolveDocuments413JSONResponse
- type ResolveDocuments429JSONResponse
- type ResolveDocuments500JSONResponse
- type ResolveDocumentsJSONRequestBody
- type ResolveDocumentsRequest
- type ResolveDocumentsRequestObject
- type ResolveDocumentsResponseObject
- type ResolvedLink
- type ResolvedLinks
- type RevertBlock200JSONResponse
- type RevertBlock400JSONResponse
- type RevertBlock401JSONResponse
- type RevertBlock403JSONResponse
- type RevertBlock404JSONResponse
- type RevertBlock429JSONResponse
- type RevertBlock500JSONResponse
- type RevertBlockRequestObject
- type RevertBlockResponseObject
- type SaveDocument200JSONResponse
- type SaveDocument400JSONResponse
- type SaveDocument401JSONResponse
- type SaveDocument403JSONResponse
- type SaveDocument404JSONResponse
- type SaveDocument409JSONResponse
- type SaveDocument413JSONResponse
- type SaveDocument422JSONResponse
- type SaveDocument429JSONResponse
- type SaveDocument500JSONResponse
- type SaveDocumentJSONRequestBody
- type SaveDocumentRequest
- type SaveDocumentRequestObject
- type SaveDocumentResponseObject
- type SavedDocument
- type Search200JSONResponse
- type Search400JSONResponse
- type Search401JSONResponse
- type Search429JSONResponse
- type Search500JSONResponse
- type SearchParams
- type SearchRequestObject
- type SearchResponseObject
- type SearchResult
- type SearchResultKind
- type SearchResults
- type SearchScore
- type SendMessageRequest
- type ServeMux
- type ServerInterface
- type ServerInterfaceWrapper
- func (siw *ServerInterfaceWrapper) CreateAnnotation(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) CreateConversation(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) CreateImport(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) CreatePdfImport(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) DeleteAnnotation(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) DeleteConversation(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) DeleteDocument(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetConversation(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetDocument(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetDocumentOriginal(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetImport(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetMe(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListAnnotations(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListConversations(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListDocuments(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ReanchorAnnotations(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ResolveDocuments(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) RevertBlock(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) SaveDocument(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) Search(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) StopConversation(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) UpdateAnnotation(w http.ResponseWriter, r *http.Request)
- type SignInErrorCode
- type SnippetPart
- type StdHTTPServerOptions
- type StopConversation204Response
- type StopConversation400JSONResponse
- type StopConversation401JSONResponse
- type StopConversation403JSONResponse
- type StopConversation404JSONResponse
- type StopConversation429JSONResponse
- type StopConversation500JSONResponse
- type StopConversation503JSONResponse
- type StopConversationRequestObject
- type StopConversationResponseObject
- type StrictHTTPServerOptions
- type StrictHandlerFunc
- type StrictMiddlewareFunc
- type StrictServerInterface
- type TextSelector
- type TooManyImports
- type TooManyImportsJSONResponse
- type TooManyImportsResponseHeaders
- type TooManyQuestions
- type TooManyQuestionsJSONResponse
- type TooManyQuestionsResponseHeaders
- type TooManyValuesForParamError
- type Unauthenticated
- type UnauthenticatedJSONResponse
- type UnescapedCookieParamError
- type UnmarshalingParamError
- type UpdateAnnotation200JSONResponse
- type UpdateAnnotation400JSONResponse
- type UpdateAnnotation401JSONResponse
- type UpdateAnnotation403JSONResponse
- type UpdateAnnotation404JSONResponse
- type UpdateAnnotation409JSONResponse
- type UpdateAnnotation413JSONResponse
- type UpdateAnnotation422JSONResponse
- type UpdateAnnotation429JSONResponse
- type UpdateAnnotation500JSONResponse
- type UpdateAnnotationJSONRequestBody
- type UpdateAnnotationRequestObject
- type UpdateAnnotationResponseObject
- type UserBlockKind
- type VersionConflict
Constants ¶
This section is empty.
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 Annotation ¶
type Annotation struct {
// BlockID The block, at any depth of the content, the selector points into.
BlockID string `json:"block_id"`
CreatedAt time.Time `json:"created_at"`
DocumentID openapi_types.UUID `json:"document_id"`
ID openapi_types.UUID `json:"id"`
// Kind What an annotation is. Highlights are the one kind so far.
Kind AnnotationKind `json:"kind"`
Note *string `json:"note"`
// Selector A range of one block's plain text: a heading's or paragraph's runs joined, or a code block's text. Offsets count UTF-16 code units, end exclusive. exact is the text in the range when it was saved; prefix and suffix, the text just around it, tell repeats apart when the text changes.
Selector TextSelector `json:"selector"`
UpdatedAt time.Time `json:"updated_at"`
Version int `json:"version"`
}
Annotation defines model for Annotation.
type AnnotationKind ¶
type AnnotationKind string
AnnotationKind What an annotation is. Highlights are the one kind so far.
const (
Highlight AnnotationKind = "highlight"
)
Defines values for AnnotationKind.
func (AnnotationKind) Valid ¶
func (e AnnotationKind) Valid() bool
Valid indicates whether the value is a known member of the AnnotationKind enum.
type AnnotationList ¶
type AnnotationList struct {
Annotations []Annotation `json:"annotations"`
}
AnnotationList defines model for AnnotationList.
type AnnotationPatch ¶
type AnnotationPatch struct {
BlockID *string `json:"block_id,omitempty"`
Note *string `json:"note,omitempty"`
// Selector A range of one block's plain text: a heading's or paragraph's runs joined, or a code block's text. Offsets count UTF-16 code units, end exclusive. exact is the text in the range when it was saved; prefix and suffix, the text just around it, tell repeats apart when the text changes.
Selector *TextSelector `json:"selector,omitempty"`
Version int `json:"version"`
}
AnnotationPatch What to change: the note (empty removes it), and the range, as block_id and selector together. Anything left out stays.
type BodyTooLargeJSONResponse ¶
type BodyTooLargeJSONResponse Error
type ChatCitation ¶
type ChatCitation struct {
// Citation Blocks of one of the user's documents that an answer cites, and their text as the model read it.
Citation Citation `json:"citation"`
Segment int `json:"segment"`
}
ChatCitation defines model for ChatCitation.
type ChatDisabledJSONResponse ¶
type ChatDisabledJSONResponse Error
type ChatDone ¶
type ChatDone struct {
// Message A question, or an answer: generated text, never part of a document (docs/adr/0012-chat.md). A not_found answer is the model saying the library doesn't answer, with not_found saying what is missing; an unsourced one has text and no citation, so it can't be checked against the library.
Message Message `json:"message"`
MessagesLeftToday int `json:"messages_left_today"`
}
ChatDone defines model for ChatDone.
type ChatError ¶
type ChatError struct {
// Code Why an answer failed: the model didn't answer or was overloaded (model_unavailable), declined (model_refused), or the server failed (internal_error).
Code ChatErrorCode `json:"code"`
}
ChatError defines model for ChatError.
type ChatErrorCode ¶
type ChatErrorCode string
ChatErrorCode Why an answer failed: the model didn't answer or was overloaded (model_unavailable), declined (model_refused), or the server failed (internal_error).
const ( ChatErrorCodeInternalError ChatErrorCode = "internal_error" ChatErrorCodeModelRefused ChatErrorCode = "model_refused" )
Defines values for ChatErrorCode.
func (ChatErrorCode) Valid ¶
func (e ChatErrorCode) Valid() bool
Valid indicates whether the value is a known member of the ChatErrorCode enum.
type ChatNotFound ¶
type ChatNotFound struct {
// Missing One sentence on what the library lacks.
Missing string `json:"missing"`
// Suggest The kind of page to import, never a URL.
Suggest string `json:"suggest"`
}
ChatNotFound What the model said the library lacks, on a not_found answer.
type ChatTool ¶
type ChatTool struct {
Query string `json:"query"`
}
ChatTool defines model for ChatTool.
type ChatUsage ¶
type ChatUsage struct {
CacheCreationInputTokens int `json:"cache_creation_input_tokens"`
CacheReadInputTokens int `json:"cache_read_input_tokens"`
CostMicrousd int64 `json:"cost_microusd"`
FirstTokenMs int `json:"first_token_ms"`
InputTokens int `json:"input_tokens"`
LatencyMs int `json:"latency_ms"`
Model string `json:"model"`
OutputTokens int `json:"output_tokens"`
}
ChatUsage What an answer cost, across its calls to the model.
type Citation ¶
type Citation struct {
BlockIds []string `json:"block_ids"`
CitedText string `json:"cited_text"`
DocumentID openapi_types.UUID `json:"document_id"`
// N The citation's number in its answer, from 1.
N int `json:"n"`
// Title The document's title and the blocks' headings, as "Title > Heading".
Title string `json:"title"`
}
Citation Blocks of one of the user's documents that an answer cites, and their text as the model read it.
type CodeLang ¶
type CodeLang string
CodeLang A language a user may choose for a code block. plaintext means no highlighting.
const ( Bash CodeLang = "bash" C CodeLang = "c" CSS CodeLang = "css" Console CodeLang = "console" Cpp CodeLang = "cpp" Csharp CodeLang = "csharp" Diff CodeLang = "diff" Dockerfile CodeLang = "dockerfile" Go CodeLang = "go" HTML CodeLang = "html" Ini CodeLang = "ini" JSON CodeLang = "json" Java CodeLang = "java" Javascript CodeLang = "javascript" Jsx CodeLang = "jsx" Kotlin CodeLang = "kotlin" Makefile CodeLang = "makefile" Markdown CodeLang = "markdown" Php CodeLang = "php" Plaintext CodeLang = "plaintext" Python CodeLang = "python" Ruby CodeLang = "ruby" Rust CodeLang = "rust" SQL CodeLang = "sql" Swift CodeLang = "swift" Toml CodeLang = "toml" Tsx CodeLang = "tsx" Typescript CodeLang = "typescript" XML CodeLang = "xml" Yaml CodeLang = "yaml" )
Defines values for CodeLang.
type Conversation ¶
type Conversation struct {
CreatedAt time.Time `json:"created_at"`
// DocumentID The document the conversation is about; absent for the whole library.
DocumentID *openapi_types.UUID `json:"document_id,omitempty"`
DocumentTitle *string `json:"document_title,omitempty"`
ID openapi_types.UUID `json:"id"`
// Title The first question, cut; empty until there is one.
Title string `json:"title"`
UpdatedAt time.Time `json:"updated_at"`
}
Conversation defines model for Conversation.
type ConversationDetail ¶
type ConversationDetail struct {
Conversation Conversation `json:"conversation"`
Messages []Message `json:"messages"`
}
ConversationDetail defines model for ConversationDetail.
type ConversationList ¶
type ConversationList struct {
Conversations []Conversation `json:"conversations"`
// MessagesLeftToday Questions the user may still ask in the last 24 hours' quota.
MessagesLeftToday int `json:"messages_left_today"`
// NextCursor Present when there are more conversations.
NextCursor *string `json:"next_cursor,omitempty"`
}
ConversationList defines model for ConversationList.
type CreateAnnotation201JSONResponse ¶
type CreateAnnotation201JSONResponse Annotation
func (CreateAnnotation201JSONResponse) VisitCreateAnnotationResponse ¶
func (response CreateAnnotation201JSONResponse) VisitCreateAnnotationResponse(w http.ResponseWriter) error
type CreateAnnotation400JSONResponse ¶
type CreateAnnotation400JSONResponse Error
func (CreateAnnotation400JSONResponse) VisitCreateAnnotationResponse ¶
func (response CreateAnnotation400JSONResponse) VisitCreateAnnotationResponse(w http.ResponseWriter) error
type CreateAnnotation401JSONResponse ¶
type CreateAnnotation401JSONResponse struct{ UnauthenticatedJSONResponse }
func (CreateAnnotation401JSONResponse) VisitCreateAnnotationResponse ¶
func (response CreateAnnotation401JSONResponse) VisitCreateAnnotationResponse(w http.ResponseWriter) error
type CreateAnnotation403JSONResponse ¶
type CreateAnnotation403JSONResponse struct{ CrossOriginJSONResponse }
func (CreateAnnotation403JSONResponse) VisitCreateAnnotationResponse ¶
func (response CreateAnnotation403JSONResponse) VisitCreateAnnotationResponse(w http.ResponseWriter) error
type CreateAnnotation404JSONResponse ¶
type CreateAnnotation404JSONResponse struct{ NotFoundJSONResponse }
func (CreateAnnotation404JSONResponse) VisitCreateAnnotationResponse ¶
func (response CreateAnnotation404JSONResponse) VisitCreateAnnotationResponse(w http.ResponseWriter) error
type CreateAnnotation413JSONResponse ¶
type CreateAnnotation413JSONResponse struct{ BodyTooLargeJSONResponse }
func (CreateAnnotation413JSONResponse) VisitCreateAnnotationResponse ¶
func (response CreateAnnotation413JSONResponse) VisitCreateAnnotationResponse(w http.ResponseWriter) error
type CreateAnnotation422JSONResponse ¶
type CreateAnnotation422JSONResponse Error
func (CreateAnnotation422JSONResponse) VisitCreateAnnotationResponse ¶
func (response CreateAnnotation422JSONResponse) VisitCreateAnnotationResponse(w http.ResponseWriter) error
type CreateAnnotation429JSONResponse ¶
type CreateAnnotation429JSONResponse struct{ RateLimitedJSONResponse }
func (CreateAnnotation429JSONResponse) VisitCreateAnnotationResponse ¶
func (response CreateAnnotation429JSONResponse) VisitCreateAnnotationResponse(w http.ResponseWriter) error
type CreateAnnotation500JSONResponse ¶
type CreateAnnotation500JSONResponse struct{ InternalErrorJSONResponse }
func (CreateAnnotation500JSONResponse) VisitCreateAnnotationResponse ¶
func (response CreateAnnotation500JSONResponse) VisitCreateAnnotationResponse(w http.ResponseWriter) error
type CreateAnnotationJSONRequestBody ¶
type CreateAnnotationJSONRequestBody = NewAnnotation
CreateAnnotationJSONRequestBody defines body for CreateAnnotation for application/json ContentType.
type CreateAnnotationRequestObject ¶
type CreateAnnotationRequestObject struct {
ID ID `json:"id"`
Body *CreateAnnotationJSONRequestBody
}
type CreateAnnotationResponseObject ¶
type CreateAnnotationResponseObject interface {
VisitCreateAnnotationResponse(w http.ResponseWriter) error
}
type CreateConversation201JSONResponse ¶
type CreateConversation201JSONResponse Conversation
func (CreateConversation201JSONResponse) VisitCreateConversationResponse ¶
func (response CreateConversation201JSONResponse) VisitCreateConversationResponse(w http.ResponseWriter) error
type CreateConversation400JSONResponse ¶
type CreateConversation400JSONResponse Error
func (CreateConversation400JSONResponse) VisitCreateConversationResponse ¶
func (response CreateConversation400JSONResponse) VisitCreateConversationResponse(w http.ResponseWriter) error
type CreateConversation401JSONResponse ¶
type CreateConversation401JSONResponse struct{ UnauthenticatedJSONResponse }
func (CreateConversation401JSONResponse) VisitCreateConversationResponse ¶
func (response CreateConversation401JSONResponse) VisitCreateConversationResponse(w http.ResponseWriter) error
type CreateConversation403JSONResponse ¶
type CreateConversation403JSONResponse struct{ CrossOriginJSONResponse }
func (CreateConversation403JSONResponse) VisitCreateConversationResponse ¶
func (response CreateConversation403JSONResponse) VisitCreateConversationResponse(w http.ResponseWriter) error
type CreateConversation404JSONResponse ¶
type CreateConversation404JSONResponse struct{ NotFoundJSONResponse }
func (CreateConversation404JSONResponse) VisitCreateConversationResponse ¶
func (response CreateConversation404JSONResponse) VisitCreateConversationResponse(w http.ResponseWriter) error
type CreateConversation413JSONResponse ¶
type CreateConversation413JSONResponse struct{ BodyTooLargeJSONResponse }
func (CreateConversation413JSONResponse) VisitCreateConversationResponse ¶
func (response CreateConversation413JSONResponse) VisitCreateConversationResponse(w http.ResponseWriter) error
type CreateConversation429JSONResponse ¶
type CreateConversation429JSONResponse struct{ RateLimitedJSONResponse }
func (CreateConversation429JSONResponse) VisitCreateConversationResponse ¶
func (response CreateConversation429JSONResponse) VisitCreateConversationResponse(w http.ResponseWriter) error
type CreateConversation500JSONResponse ¶
type CreateConversation500JSONResponse struct{ InternalErrorJSONResponse }
func (CreateConversation500JSONResponse) VisitCreateConversationResponse ¶
func (response CreateConversation500JSONResponse) VisitCreateConversationResponse(w http.ResponseWriter) error
type CreateConversation503JSONResponse ¶
type CreateConversation503JSONResponse struct{ ChatDisabledJSONResponse }
func (CreateConversation503JSONResponse) VisitCreateConversationResponse ¶
func (response CreateConversation503JSONResponse) VisitCreateConversationResponse(w http.ResponseWriter) error
type CreateConversationJSONRequestBody ¶
type CreateConversationJSONRequestBody = CreateConversationRequest
CreateConversationJSONRequestBody defines body for CreateConversation for application/json ContentType.
type CreateConversationRequest ¶
type CreateConversationRequest struct {
// DocumentID The user's document to ask about; leave it out for the whole library.
DocumentID *openapi_types.UUID `json:"document_id,omitempty"`
}
CreateConversationRequest defines model for CreateConversationRequest.
type CreateConversationRequestObject ¶
type CreateConversationRequestObject struct {
Body *CreateConversationJSONRequestBody
}
type CreateConversationResponseObject ¶
type CreateConversationResponseObject interface {
VisitCreateConversationResponse(w http.ResponseWriter) error
}
type CreateImport200JSONResponse ¶
type CreateImport200JSONResponse ExistingImportResponse
func (CreateImport200JSONResponse) VisitCreateImportResponse ¶
func (response CreateImport200JSONResponse) VisitCreateImportResponse(w http.ResponseWriter) error
type CreateImport202JSONResponse ¶
type CreateImport202JSONResponse ImportResponse
func (CreateImport202JSONResponse) VisitCreateImportResponse ¶
func (response CreateImport202JSONResponse) VisitCreateImportResponse(w http.ResponseWriter) error
type CreateImport400JSONResponse ¶
type CreateImport400JSONResponse Error
func (CreateImport400JSONResponse) VisitCreateImportResponse ¶
func (response CreateImport400JSONResponse) VisitCreateImportResponse(w http.ResponseWriter) error
type CreateImport401JSONResponse ¶
type CreateImport401JSONResponse struct{ UnauthenticatedJSONResponse }
func (CreateImport401JSONResponse) VisitCreateImportResponse ¶
func (response CreateImport401JSONResponse) VisitCreateImportResponse(w http.ResponseWriter) error
type CreateImport403JSONResponse ¶
type CreateImport403JSONResponse struct{ CrossOriginJSONResponse }
func (CreateImport403JSONResponse) VisitCreateImportResponse ¶
func (response CreateImport403JSONResponse) VisitCreateImportResponse(w http.ResponseWriter) error
type CreateImport413JSONResponse ¶
type CreateImport413JSONResponse struct{ BodyTooLargeJSONResponse }
func (CreateImport413JSONResponse) VisitCreateImportResponse ¶
func (response CreateImport413JSONResponse) VisitCreateImportResponse(w http.ResponseWriter) error
type CreateImport429JSONResponse ¶
type CreateImport429JSONResponse struct{ TooManyImportsJSONResponse }
func (CreateImport429JSONResponse) VisitCreateImportResponse ¶
func (response CreateImport429JSONResponse) VisitCreateImportResponse(w http.ResponseWriter) error
type CreateImport500JSONResponse ¶
type CreateImport500JSONResponse struct{ InternalErrorJSONResponse }
func (CreateImport500JSONResponse) VisitCreateImportResponse ¶
func (response CreateImport500JSONResponse) VisitCreateImportResponse(w http.ResponseWriter) error
type CreateImportJSONRequestBody ¶
type CreateImportJSONRequestBody = CreateImportRequest
CreateImportJSONRequestBody defines body for CreateImport for application/json ContentType.
type CreateImportRequest ¶
type CreateImportRequest struct {
URL string `json:"url"`
}
CreateImportRequest defines model for CreateImportRequest.
type CreateImportRequestObject ¶
type CreateImportRequestObject struct {
Body *CreateImportJSONRequestBody
}
type CreateImportResponseObject ¶
type CreateImportResponseObject interface {
VisitCreateImportResponse(w http.ResponseWriter) error
}
type CreatePdfImport200JSONResponse ¶
type CreatePdfImport200JSONResponse ExistingImportResponse
func (CreatePdfImport200JSONResponse) VisitCreatePdfImportResponse ¶
func (response CreatePdfImport200JSONResponse) VisitCreatePdfImportResponse(w http.ResponseWriter) error
type CreatePdfImport202JSONResponse ¶
type CreatePdfImport202JSONResponse ImportResponse
func (CreatePdfImport202JSONResponse) VisitCreatePdfImportResponse ¶
func (response CreatePdfImport202JSONResponse) VisitCreatePdfImportResponse(w http.ResponseWriter) error
type CreatePdfImport400JSONResponse ¶
type CreatePdfImport400JSONResponse Error
func (CreatePdfImport400JSONResponse) VisitCreatePdfImportResponse ¶
func (response CreatePdfImport400JSONResponse) VisitCreatePdfImportResponse(w http.ResponseWriter) error
type CreatePdfImport401JSONResponse ¶
type CreatePdfImport401JSONResponse struct{ UnauthenticatedJSONResponse }
func (CreatePdfImport401JSONResponse) VisitCreatePdfImportResponse ¶
func (response CreatePdfImport401JSONResponse) VisitCreatePdfImportResponse(w http.ResponseWriter) error
type CreatePdfImport403JSONResponse ¶
type CreatePdfImport403JSONResponse struct{ CrossOriginJSONResponse }
func (CreatePdfImport403JSONResponse) VisitCreatePdfImportResponse ¶
func (response CreatePdfImport403JSONResponse) VisitCreatePdfImportResponse(w http.ResponseWriter) error
type CreatePdfImport413JSONResponse ¶
type CreatePdfImport413JSONResponse Error
func (CreatePdfImport413JSONResponse) VisitCreatePdfImportResponse ¶
func (response CreatePdfImport413JSONResponse) VisitCreatePdfImportResponse(w http.ResponseWriter) error
type CreatePdfImport429JSONResponse ¶
type CreatePdfImport429JSONResponse struct{ TooManyImportsJSONResponse }
func (CreatePdfImport429JSONResponse) VisitCreatePdfImportResponse ¶
func (response CreatePdfImport429JSONResponse) VisitCreatePdfImportResponse(w http.ResponseWriter) error
type CreatePdfImport500JSONResponse ¶
type CreatePdfImport500JSONResponse struct{ InternalErrorJSONResponse }
func (CreatePdfImport500JSONResponse) VisitCreatePdfImportResponse ¶
func (response CreatePdfImport500JSONResponse) VisitCreatePdfImportResponse(w http.ResponseWriter) error
type CreatePdfImportMultipartRequestBody ¶
type CreatePdfImportMultipartRequestBody = CreatePdfImportRequest
CreatePdfImportMultipartRequestBody defines body for CreatePdfImport for multipart/form-data ContentType.
type CreatePdfImportRequest ¶
type CreatePdfImportRequest struct {
// File The PDF, at most 25 MB.
File openapi_types.File `json:"file"`
}
CreatePdfImportRequest defines model for CreatePdfImportRequest.
type CreatePdfImportResponseObject ¶
type CreatePdfImportResponseObject interface {
VisitCreatePdfImportResponse(w http.ResponseWriter) error
}
type CrossOriginJSONResponse ¶
type CrossOriginJSONResponse Error
type DeleteAccountRequest ¶
type DeleteAccountRequest struct {
// Confirm The user's GitHub login, typed to confirm.
Confirm string `json:"confirm"`
}
DeleteAccountRequest defines model for DeleteAccountRequest.
type DeleteAnnotation204Response ¶
type DeleteAnnotation204Response struct {
}
func (DeleteAnnotation204Response) VisitDeleteAnnotationResponse ¶
func (response DeleteAnnotation204Response) VisitDeleteAnnotationResponse(w http.ResponseWriter) error
type DeleteAnnotation400JSONResponse ¶
type DeleteAnnotation400JSONResponse struct{ InvalidParameterJSONResponse }
func (DeleteAnnotation400JSONResponse) VisitDeleteAnnotationResponse ¶
func (response DeleteAnnotation400JSONResponse) VisitDeleteAnnotationResponse(w http.ResponseWriter) error
type DeleteAnnotation401JSONResponse ¶
type DeleteAnnotation401JSONResponse struct{ UnauthenticatedJSONResponse }
func (DeleteAnnotation401JSONResponse) VisitDeleteAnnotationResponse ¶
func (response DeleteAnnotation401JSONResponse) VisitDeleteAnnotationResponse(w http.ResponseWriter) error
type DeleteAnnotation403JSONResponse ¶
type DeleteAnnotation403JSONResponse struct{ CrossOriginJSONResponse }
func (DeleteAnnotation403JSONResponse) VisitDeleteAnnotationResponse ¶
func (response DeleteAnnotation403JSONResponse) VisitDeleteAnnotationResponse(w http.ResponseWriter) error
type DeleteAnnotation404JSONResponse ¶
type DeleteAnnotation404JSONResponse struct{ NotFoundJSONResponse }
func (DeleteAnnotation404JSONResponse) VisitDeleteAnnotationResponse ¶
func (response DeleteAnnotation404JSONResponse) VisitDeleteAnnotationResponse(w http.ResponseWriter) error
type DeleteAnnotation429JSONResponse ¶
type DeleteAnnotation429JSONResponse struct{ RateLimitedJSONResponse }
func (DeleteAnnotation429JSONResponse) VisitDeleteAnnotationResponse ¶
func (response DeleteAnnotation429JSONResponse) VisitDeleteAnnotationResponse(w http.ResponseWriter) error
type DeleteAnnotation500JSONResponse ¶
type DeleteAnnotation500JSONResponse struct{ InternalErrorJSONResponse }
func (DeleteAnnotation500JSONResponse) VisitDeleteAnnotationResponse ¶
func (response DeleteAnnotation500JSONResponse) VisitDeleteAnnotationResponse(w http.ResponseWriter) error
type DeleteAnnotationRequestObject ¶
type DeleteAnnotationRequestObject struct {
ID ID `json:"id"`
}
type DeleteAnnotationResponseObject ¶
type DeleteAnnotationResponseObject interface {
VisitDeleteAnnotationResponse(w http.ResponseWriter) error
}
type DeleteConversation204Response ¶
type DeleteConversation204Response struct {
}
func (DeleteConversation204Response) VisitDeleteConversationResponse ¶
func (response DeleteConversation204Response) VisitDeleteConversationResponse(w http.ResponseWriter) error
type DeleteConversation400JSONResponse ¶
type DeleteConversation400JSONResponse struct{ InvalidParameterJSONResponse }
func (DeleteConversation400JSONResponse) VisitDeleteConversationResponse ¶
func (response DeleteConversation400JSONResponse) VisitDeleteConversationResponse(w http.ResponseWriter) error
type DeleteConversation401JSONResponse ¶
type DeleteConversation401JSONResponse struct{ UnauthenticatedJSONResponse }
func (DeleteConversation401JSONResponse) VisitDeleteConversationResponse ¶
func (response DeleteConversation401JSONResponse) VisitDeleteConversationResponse(w http.ResponseWriter) error
type DeleteConversation403JSONResponse ¶
type DeleteConversation403JSONResponse struct{ CrossOriginJSONResponse }
func (DeleteConversation403JSONResponse) VisitDeleteConversationResponse ¶
func (response DeleteConversation403JSONResponse) VisitDeleteConversationResponse(w http.ResponseWriter) error
type DeleteConversation404JSONResponse ¶
type DeleteConversation404JSONResponse struct{ NotFoundJSONResponse }
func (DeleteConversation404JSONResponse) VisitDeleteConversationResponse ¶
func (response DeleteConversation404JSONResponse) VisitDeleteConversationResponse(w http.ResponseWriter) error
type DeleteConversation429JSONResponse ¶
type DeleteConversation429JSONResponse struct{ RateLimitedJSONResponse }
func (DeleteConversation429JSONResponse) VisitDeleteConversationResponse ¶
func (response DeleteConversation429JSONResponse) VisitDeleteConversationResponse(w http.ResponseWriter) error
type DeleteConversation500JSONResponse ¶
type DeleteConversation500JSONResponse struct{ InternalErrorJSONResponse }
func (DeleteConversation500JSONResponse) VisitDeleteConversationResponse ¶
func (response DeleteConversation500JSONResponse) VisitDeleteConversationResponse(w http.ResponseWriter) error
type DeleteConversation503JSONResponse ¶
type DeleteConversation503JSONResponse struct{ ChatDisabledJSONResponse }
func (DeleteConversation503JSONResponse) VisitDeleteConversationResponse ¶
func (response DeleteConversation503JSONResponse) VisitDeleteConversationResponse(w http.ResponseWriter) error
type DeleteConversationRequestObject ¶
type DeleteConversationRequestObject struct {
ID ID `json:"id"`
}
type DeleteConversationResponseObject ¶
type DeleteConversationResponseObject interface {
VisitDeleteConversationResponse(w http.ResponseWriter) error
}
type DeleteDocument204Response ¶
type DeleteDocument204Response struct {
}
func (DeleteDocument204Response) VisitDeleteDocumentResponse ¶
func (response DeleteDocument204Response) VisitDeleteDocumentResponse(w http.ResponseWriter) error
type DeleteDocument400JSONResponse ¶
type DeleteDocument400JSONResponse struct{ InvalidParameterJSONResponse }
func (DeleteDocument400JSONResponse) VisitDeleteDocumentResponse ¶
func (response DeleteDocument400JSONResponse) VisitDeleteDocumentResponse(w http.ResponseWriter) error
type DeleteDocument401JSONResponse ¶
type DeleteDocument401JSONResponse struct{ UnauthenticatedJSONResponse }
func (DeleteDocument401JSONResponse) VisitDeleteDocumentResponse ¶
func (response DeleteDocument401JSONResponse) VisitDeleteDocumentResponse(w http.ResponseWriter) error
type DeleteDocument403JSONResponse ¶
type DeleteDocument403JSONResponse struct{ CrossOriginJSONResponse }
func (DeleteDocument403JSONResponse) VisitDeleteDocumentResponse ¶
func (response DeleteDocument403JSONResponse) VisitDeleteDocumentResponse(w http.ResponseWriter) error
type DeleteDocument404JSONResponse ¶
type DeleteDocument404JSONResponse struct{ NotFoundJSONResponse }
func (DeleteDocument404JSONResponse) VisitDeleteDocumentResponse ¶
func (response DeleteDocument404JSONResponse) VisitDeleteDocumentResponse(w http.ResponseWriter) error
type DeleteDocument429JSONResponse ¶
type DeleteDocument429JSONResponse struct{ RateLimitedJSONResponse }
func (DeleteDocument429JSONResponse) VisitDeleteDocumentResponse ¶
func (response DeleteDocument429JSONResponse) VisitDeleteDocumentResponse(w http.ResponseWriter) error
type DeleteDocument500JSONResponse ¶
type DeleteDocument500JSONResponse struct{ InternalErrorJSONResponse }
func (DeleteDocument500JSONResponse) VisitDeleteDocumentResponse ¶
func (response DeleteDocument500JSONResponse) VisitDeleteDocumentResponse(w http.ResponseWriter) error
type DeleteDocumentRequestObject ¶
type DeleteDocumentRequestObject struct {
ID ID `json:"id"`
}
type DeleteDocumentResponseObject ¶
type DeleteDocumentResponseObject interface {
VisitDeleteDocumentResponse(w http.ResponseWriter) error
}
type DocBlock ¶
type DocBlock = doccontent.Block
DocBlock A top-level block: an IRBlock's fields, plus where it came from. Source blocks set edited and source_block_id (equal to id); user blocks set neither, and have UUIDv7 ids. A spec test keeps these properties IRBlock's plus the three.
type Document ¶
type Document struct {
Content DocContent `json:"content"`
CreatedAt time.Time `json:"created_at"`
ID openapi_types.UUID `json:"id"`
Pdf *IRPDF `json:"pdf,omitempty"`
// SourceURL The canonical URL of the page the document came from; empty for a PDF.
SourceURL string `json:"source_url"`
Title string `json:"title"`
UpdatedAt time.Time `json:"updated_at"`
// Version Counts edits, for optimistic concurrency; starts at 1.
Version int `json:"version"`
// Warnings What the extractor was unsure of when it made the document's source blocks.
Warnings []IRWarning `json:"warnings"`
}
Document defines model for Document.
type DocumentList ¶
type DocumentList struct {
Documents []DocumentSummary `json:"documents"`
// NextCursor Present when there are more documents.
NextCursor *string `json:"next_cursor,omitempty"`
}
DocumentList defines model for DocumentList.
type DocumentResponse ¶
type DocumentResponse struct {
Document Document `json:"document"`
}
DocumentResponse defines model for DocumentResponse.
type DocumentSummary ¶
type DocumentSummary struct {
CreatedAt time.Time `json:"created_at"`
ID openapi_types.UUID `json:"id"`
Pdf *IRPDF `json:"pdf,omitempty"`
// SourceURL The canonical URL of the page the document came from; empty for a PDF.
SourceURL string `json:"source_url"`
Title string `json:"title"`
UpdatedAt time.Time `json:"updated_at"`
// Version Counts edits, for optimistic concurrency; starts at 1.
Version int `json:"version"`
}
DocumentSummary defines model for DocumentSummary.
type ErrorBody ¶
type ErrorBody struct {
// Code Why a request failed. Each response lists the codes it can carry.
Code ErrorCode `json:"code"`
Message string `json:"message"`
RequestID string `json:"request_id"`
}
ErrorBody defines model for ErrorBody.
type ErrorCode ¶
type ErrorCode string
ErrorCode Why a request failed. Each response lists the codes it can carry.
const ( ErrorCodeAnnotationLimit ErrorCode = "annotation_limit" ErrorCodeBlockKindNotAllowed ErrorCode = "block_kind_not_allowed" ErrorCodeBodyTooLarge ErrorCode = "body_too_large" ErrorCodeChatDisabled ErrorCode = "chat_disabled" ErrorCodeChatSpendCapReached ErrorCode = "chat_spend_cap_reached" ErrorCodeConversationBusy ErrorCode = "conversation_busy" ErrorCodeCrossOrigin ErrorCode = "cross_origin" ErrorCodeIPLiteralHost ErrorCode = "ip_literal_host" ErrorCodeInternalError ErrorCode = "internal_error" ErrorCodeInvalidContent ErrorCode = "invalid_content" ErrorCodeInvalidCursor ErrorCode = "invalid_cursor" ErrorCodeInvalidParameter ErrorCode = "invalid_parameter" ErrorCodeInvalidRequest ErrorCode = "invalid_request" ErrorCodeInvalidURL ErrorCode = "invalid_url" ErrorCodeMethodNotAllowed ErrorCode = "method_not_allowed" ErrorCodeNotAPdf ErrorCode = "not_a_pdf" ErrorCodeNotFound ErrorCode = "not_found" ErrorCodePdfTooLarge ErrorCode = "pdf_too_large" ErrorCodeQuotaExceeded ErrorCode = "quota_exceeded" ErrorCodeQuoteMismatch ErrorCode = "quote_mismatch" ErrorCodeRateLimited ErrorCode = "rate_limited" ErrorCodeSourceBlockModified ErrorCode = "source_block_modified" ErrorCodeURLTooLong ErrorCode = "url_too_long" ErrorCodeUnauthenticated ErrorCode = "unauthenticated" ErrorCodeUnknownBlock ErrorCode = "unknown_block" ErrorCodeUnknownSourceBlock ErrorCode = "unknown_source_block" ErrorCodeUnsupportedScheme ErrorCode = "unsupported_scheme" ErrorCodeVersionConflict ErrorCode = "version_conflict" )
Defines values for ErrorCode.
type ExistingImportResponse ¶
type ExistingImportResponse struct {
Document DocumentSummary `json:"document"`
// Import An import of a web page (kind web: requested_url and canonical_url) or of an uploaded PDF (kind pdf: filename).
Import Import `json:"import"`
}
ExistingImportResponse defines model for ExistingImportResponse.
type GetConversation200JSONResponse ¶
type GetConversation200JSONResponse ConversationDetail
func (GetConversation200JSONResponse) VisitGetConversationResponse ¶
func (response GetConversation200JSONResponse) VisitGetConversationResponse(w http.ResponseWriter) error
type GetConversation400JSONResponse ¶
type GetConversation400JSONResponse struct{ InvalidParameterJSONResponse }
func (GetConversation400JSONResponse) VisitGetConversationResponse ¶
func (response GetConversation400JSONResponse) VisitGetConversationResponse(w http.ResponseWriter) error
type GetConversation401JSONResponse ¶
type GetConversation401JSONResponse struct{ UnauthenticatedJSONResponse }
func (GetConversation401JSONResponse) VisitGetConversationResponse ¶
func (response GetConversation401JSONResponse) VisitGetConversationResponse(w http.ResponseWriter) error
type GetConversation404JSONResponse ¶
type GetConversation404JSONResponse struct{ NotFoundJSONResponse }
func (GetConversation404JSONResponse) VisitGetConversationResponse ¶
func (response GetConversation404JSONResponse) VisitGetConversationResponse(w http.ResponseWriter) error
type GetConversation429JSONResponse ¶
type GetConversation429JSONResponse struct{ RateLimitedJSONResponse }
func (GetConversation429JSONResponse) VisitGetConversationResponse ¶
func (response GetConversation429JSONResponse) VisitGetConversationResponse(w http.ResponseWriter) error
type GetConversation500JSONResponse ¶
type GetConversation500JSONResponse struct{ InternalErrorJSONResponse }
func (GetConversation500JSONResponse) VisitGetConversationResponse ¶
func (response GetConversation500JSONResponse) VisitGetConversationResponse(w http.ResponseWriter) error
type GetConversation503JSONResponse ¶
type GetConversation503JSONResponse struct{ ChatDisabledJSONResponse }
func (GetConversation503JSONResponse) VisitGetConversationResponse ¶
func (response GetConversation503JSONResponse) VisitGetConversationResponse(w http.ResponseWriter) error
type GetConversationRequestObject ¶
type GetConversationRequestObject struct {
ID ID `json:"id"`
}
type GetConversationResponseObject ¶
type GetConversationResponseObject interface {
VisitGetConversationResponse(w http.ResponseWriter) error
}
type GetDocument200JSONResponse ¶
type GetDocument200JSONResponse Document
func (GetDocument200JSONResponse) VisitGetDocumentResponse ¶
func (response GetDocument200JSONResponse) VisitGetDocumentResponse(w http.ResponseWriter) error
type GetDocument400JSONResponse ¶
type GetDocument400JSONResponse struct{ InvalidParameterJSONResponse }
func (GetDocument400JSONResponse) VisitGetDocumentResponse ¶
func (response GetDocument400JSONResponse) VisitGetDocumentResponse(w http.ResponseWriter) error
type GetDocument401JSONResponse ¶
type GetDocument401JSONResponse struct{ UnauthenticatedJSONResponse }
func (GetDocument401JSONResponse) VisitGetDocumentResponse ¶
func (response GetDocument401JSONResponse) VisitGetDocumentResponse(w http.ResponseWriter) error
type GetDocument404JSONResponse ¶
type GetDocument404JSONResponse struct{ NotFoundJSONResponse }
func (GetDocument404JSONResponse) VisitGetDocumentResponse ¶
func (response GetDocument404JSONResponse) VisitGetDocumentResponse(w http.ResponseWriter) error
type GetDocument429JSONResponse ¶
type GetDocument429JSONResponse struct{ RateLimitedJSONResponse }
func (GetDocument429JSONResponse) VisitGetDocumentResponse ¶
func (response GetDocument429JSONResponse) VisitGetDocumentResponse(w http.ResponseWriter) error
type GetDocument500JSONResponse ¶
type GetDocument500JSONResponse struct{ InternalErrorJSONResponse }
func (GetDocument500JSONResponse) VisitGetDocumentResponse ¶
func (response GetDocument500JSONResponse) VisitGetDocumentResponse(w http.ResponseWriter) error
type GetDocumentOriginal200ApplicationPdfResponse ¶
type GetDocumentOriginal200ApplicationPdfResponse struct {
Body io.Reader
Headers GetDocumentOriginal200ResponseHeaders
ContentLength int64
}
func (GetDocumentOriginal200ApplicationPdfResponse) VisitGetDocumentOriginalResponse ¶
func (response GetDocumentOriginal200ApplicationPdfResponse) VisitGetDocumentOriginalResponse(w http.ResponseWriter) error
type GetDocumentOriginal400JSONResponse ¶
type GetDocumentOriginal400JSONResponse struct{ InvalidParameterJSONResponse }
func (GetDocumentOriginal400JSONResponse) VisitGetDocumentOriginalResponse ¶
func (response GetDocumentOriginal400JSONResponse) VisitGetDocumentOriginalResponse(w http.ResponseWriter) error
type GetDocumentOriginal401JSONResponse ¶
type GetDocumentOriginal401JSONResponse struct{ UnauthenticatedJSONResponse }
func (GetDocumentOriginal401JSONResponse) VisitGetDocumentOriginalResponse ¶
func (response GetDocumentOriginal401JSONResponse) VisitGetDocumentOriginalResponse(w http.ResponseWriter) error
type GetDocumentOriginal404JSONResponse ¶
type GetDocumentOriginal404JSONResponse struct{ NotFoundJSONResponse }
func (GetDocumentOriginal404JSONResponse) VisitGetDocumentOriginalResponse ¶
func (response GetDocumentOriginal404JSONResponse) VisitGetDocumentOriginalResponse(w http.ResponseWriter) error
type GetDocumentOriginal429JSONResponse ¶
type GetDocumentOriginal429JSONResponse struct{ RateLimitedJSONResponse }
func (GetDocumentOriginal429JSONResponse) VisitGetDocumentOriginalResponse ¶
func (response GetDocumentOriginal429JSONResponse) VisitGetDocumentOriginalResponse(w http.ResponseWriter) error
type GetDocumentOriginal500JSONResponse ¶
type GetDocumentOriginal500JSONResponse struct{ InternalErrorJSONResponse }
func (GetDocumentOriginal500JSONResponse) VisitGetDocumentOriginalResponse ¶
func (response GetDocumentOriginal500JSONResponse) VisitGetDocumentOriginalResponse(w http.ResponseWriter) error
type GetDocumentOriginalRequestObject ¶
type GetDocumentOriginalRequestObject struct {
ID ID `json:"id"`
}
type GetDocumentOriginalResponseObject ¶
type GetDocumentOriginalResponseObject interface {
VisitGetDocumentOriginalResponse(w http.ResponseWriter) error
}
type GetDocumentRequestObject ¶
type GetDocumentRequestObject struct {
ID ID `json:"id"`
}
type GetDocumentResponseObject ¶
type GetDocumentResponseObject interface {
VisitGetDocumentResponse(w http.ResponseWriter) error
}
type GetImport200JSONResponse ¶
type GetImport200JSONResponse ImportResponse
func (GetImport200JSONResponse) VisitGetImportResponse ¶
func (response GetImport200JSONResponse) VisitGetImportResponse(w http.ResponseWriter) error
type GetImport400JSONResponse ¶
type GetImport400JSONResponse struct{ InvalidParameterJSONResponse }
func (GetImport400JSONResponse) VisitGetImportResponse ¶
func (response GetImport400JSONResponse) VisitGetImportResponse(w http.ResponseWriter) error
type GetImport401JSONResponse ¶
type GetImport401JSONResponse struct{ UnauthenticatedJSONResponse }
func (GetImport401JSONResponse) VisitGetImportResponse ¶
func (response GetImport401JSONResponse) VisitGetImportResponse(w http.ResponseWriter) error
type GetImport404JSONResponse ¶
type GetImport404JSONResponse struct{ NotFoundJSONResponse }
func (GetImport404JSONResponse) VisitGetImportResponse ¶
func (response GetImport404JSONResponse) VisitGetImportResponse(w http.ResponseWriter) error
type GetImport429JSONResponse ¶
type GetImport429JSONResponse struct{ RateLimitedJSONResponse }
func (GetImport429JSONResponse) VisitGetImportResponse ¶
func (response GetImport429JSONResponse) VisitGetImportResponse(w http.ResponseWriter) error
type GetImport500JSONResponse ¶
type GetImport500JSONResponse struct{ InternalErrorJSONResponse }
func (GetImport500JSONResponse) VisitGetImportResponse ¶
func (response GetImport500JSONResponse) VisitGetImportResponse(w http.ResponseWriter) error
type GetImportRequestObject ¶
type GetImportRequestObject struct {
ID ID `json:"id"`
}
type GetImportResponseObject ¶
type GetImportResponseObject interface {
VisitGetImportResponse(w http.ResponseWriter) error
}
type GetMe200JSONResponse ¶
type GetMe200JSONResponse Me
func (GetMe200JSONResponse) VisitGetMeResponse ¶
func (response GetMe200JSONResponse) VisitGetMeResponse(w http.ResponseWriter) error
type GetMe401JSONResponse ¶
type GetMe401JSONResponse struct{ UnauthenticatedJSONResponse }
func (GetMe401JSONResponse) VisitGetMeResponse ¶
func (response GetMe401JSONResponse) VisitGetMeResponse(w http.ResponseWriter) error
type GetMe429JSONResponse ¶
type GetMe429JSONResponse struct{ RateLimitedJSONResponse }
func (GetMe429JSONResponse) VisitGetMeResponse ¶
func (response GetMe429JSONResponse) VisitGetMeResponse(w http.ResponseWriter) error
type GetMe500JSONResponse ¶
type GetMe500JSONResponse struct{ InternalErrorJSONResponse }
func (GetMe500JSONResponse) VisitGetMeResponse ¶
func (response GetMe500JSONResponse) VisitGetMeResponse(w http.ResponseWriter) error
type GetMeRequestObject ¶
type GetMeRequestObject struct {
}
type GetMeResponseObject ¶
type GetMeResponseObject interface {
VisitGetMeResponse(w http.ResponseWriter) error
}
type IRBlock ¶
IRBlock One block. kind decides which other fields may be set: heading has level, anchor and content; paragraph content; list ordered and items; tabs items with labels; code lang, title, title_link and text; table head and rows; callout variant, title and children; quote children; image src, alt and caption; divider nothing.
type IRSource ¶
IRSource Where the page was fetched from, or for a PDF (pdf set) which file it was converted from; a PDF's URLs are empty and body_sha256 is the file's.
type Import ¶
type Import struct {
CanonicalURL *string `json:"canonical_url,omitempty"`
CreatedAt time.Time `json:"created_at"`
// DocumentID Set when status is done, unless the document has since been deleted.
DocumentID *openapi_types.UUID `json:"document_id,omitempty"`
// ErrorCode Why an import failed; set when its status is failed.
ErrorCode *ImportErrorCode `json:"error_code,omitempty"`
Filename *string `json:"filename,omitempty"`
ID openapi_types.UUID `json:"id"`
Kind ImportKind `json:"kind"`
RequestedURL *string `json:"requested_url,omitempty"`
Status ImportStatus `json:"status"`
UpdatedAt time.Time `json:"updated_at"`
}
Import An import of a web page (kind web: requested_url and canonical_url) or of an uploaded PDF (kind pdf: filename).
type ImportErrorCode ¶
type ImportErrorCode string
ImportErrorCode Why an import failed; set when its status is failed.
const ( ImportErrorCodeBlockedAddress ImportErrorCode = "blocked_address" ImportErrorCodeDisallowedByRobots ImportErrorCode = "disallowed_by_robots" ImportErrorCodeExtractFailed ImportErrorCode = "extract_failed" ImportErrorCodeHTTPError ImportErrorCode = "http_error" ImportErrorCodeInternalError ImportErrorCode = "internal_error" ImportErrorCodeInvalidURL ImportErrorCode = "invalid_url" ImportErrorCodeNetworkError ImportErrorCode = "network_error" ImportErrorCodeNotFound ImportErrorCode = "not_found" ImportErrorCodePdfConversionFailed ImportErrorCode = "pdf_conversion_failed" ImportErrorCodePdfPasswordProtected ImportErrorCode = "pdf_password_protected" ImportErrorCodePdfTooManyPages ImportErrorCode = "pdf_too_many_pages" ImportErrorCodeRateLimited ImportErrorCode = "rate_limited" ImportErrorCodeScannedPdfUnsupported ImportErrorCode = "scanned_pdf_unsupported" ImportErrorCodeTimeout ImportErrorCode = "timeout" ImportErrorCodeTooLarge ImportErrorCode = "too_large" ImportErrorCodeTooManyRedirects ImportErrorCode = "too_many_redirects" ImportErrorCodeUnsupportedType ImportErrorCode = "unsupported_type" ImportErrorCodeUpstreamError ImportErrorCode = "upstream_error" )
Defines values for ImportErrorCode.
func (ImportErrorCode) Valid ¶
func (e ImportErrorCode) Valid() bool
Valid indicates whether the value is a known member of the ImportErrorCode enum.
type ImportEvent ¶
type ImportEvent struct {
DocumentID *openapi_types.UUID `json:"document_id,omitempty"`
// ErrorCode Why an import failed; set when its status is failed.
ErrorCode *ImportErrorCode `json:"error_code,omitempty"`
Status ImportStatus `json:"status"`
}
ImportEvent defines model for ImportEvent.
type ImportKind ¶
type ImportKind string
ImportKind defines model for Import.Kind.
const ( Pdf ImportKind = "pdf" Web ImportKind = "web" )
Defines values for ImportKind.
func (ImportKind) Valid ¶
func (e ImportKind) Valid() bool
Valid indicates whether the value is a known member of the ImportKind enum.
type ImportResponse ¶
type ImportResponse struct {
// Import An import of a web page (kind web: requested_url and canonical_url) or of an uploaded PDF (kind pdf: filename).
Import Import `json:"import"`
}
ImportResponse defines model for ImportResponse.
type ImportStatus ¶
type ImportStatus string
ImportStatus defines model for ImportStatus.
const ( ImportStatusConverting ImportStatus = "converting" ImportStatusDone ImportStatus = "done" ImportStatusExtracting ImportStatus = "extracting" ImportStatusFailed ImportStatus = "failed" ImportStatusFetching ImportStatus = "fetching" ImportStatusQueued ImportStatus = "queued" )
Defines values for ImportStatus.
func (ImportStatus) Valid ¶
func (e ImportStatus) Valid() bool
Valid indicates whether the value is a known member of the ImportStatus enum.
type InternalErrorJSONResponse ¶
type InternalErrorJSONResponse Error
type InvalidParamFormatError ¶
func (*InvalidParamFormatError) Error ¶
func (e *InvalidParamFormatError) Error() string
func (*InvalidParamFormatError) Unwrap ¶
func (e *InvalidParamFormatError) Unwrap() error
type InvalidParameter ¶
type InvalidParameter = Error
InvalidParameter defines model for InvalidParameter.
type InvalidParameterJSONResponse ¶
type InvalidParameterJSONResponse Error
type ListAnnotations200JSONResponse ¶
type ListAnnotations200JSONResponse AnnotationList
func (ListAnnotations200JSONResponse) VisitListAnnotationsResponse ¶
func (response ListAnnotations200JSONResponse) VisitListAnnotationsResponse(w http.ResponseWriter) error
type ListAnnotations400JSONResponse ¶
type ListAnnotations400JSONResponse struct{ InvalidParameterJSONResponse }
func (ListAnnotations400JSONResponse) VisitListAnnotationsResponse ¶
func (response ListAnnotations400JSONResponse) VisitListAnnotationsResponse(w http.ResponseWriter) error
type ListAnnotations401JSONResponse ¶
type ListAnnotations401JSONResponse struct{ UnauthenticatedJSONResponse }
func (ListAnnotations401JSONResponse) VisitListAnnotationsResponse ¶
func (response ListAnnotations401JSONResponse) VisitListAnnotationsResponse(w http.ResponseWriter) error
type ListAnnotations404JSONResponse ¶
type ListAnnotations404JSONResponse struct{ NotFoundJSONResponse }
func (ListAnnotations404JSONResponse) VisitListAnnotationsResponse ¶
func (response ListAnnotations404JSONResponse) VisitListAnnotationsResponse(w http.ResponseWriter) error
type ListAnnotations429JSONResponse ¶
type ListAnnotations429JSONResponse struct{ RateLimitedJSONResponse }
func (ListAnnotations429JSONResponse) VisitListAnnotationsResponse ¶
func (response ListAnnotations429JSONResponse) VisitListAnnotationsResponse(w http.ResponseWriter) error
type ListAnnotations500JSONResponse ¶
type ListAnnotations500JSONResponse struct{ InternalErrorJSONResponse }
func (ListAnnotations500JSONResponse) VisitListAnnotationsResponse ¶
func (response ListAnnotations500JSONResponse) VisitListAnnotationsResponse(w http.ResponseWriter) error
type ListAnnotationsRequestObject ¶
type ListAnnotationsRequestObject struct {
ID ID `json:"id"`
}
type ListAnnotationsResponseObject ¶
type ListAnnotationsResponseObject interface {
VisitListAnnotationsResponse(w http.ResponseWriter) error
}
type ListConversations200JSONResponse ¶
type ListConversations200JSONResponse ConversationList
func (ListConversations200JSONResponse) VisitListConversationsResponse ¶
func (response ListConversations200JSONResponse) VisitListConversationsResponse(w http.ResponseWriter) error
type ListConversations400JSONResponse ¶
type ListConversations400JSONResponse Error
func (ListConversations400JSONResponse) VisitListConversationsResponse ¶
func (response ListConversations400JSONResponse) VisitListConversationsResponse(w http.ResponseWriter) error
type ListConversations401JSONResponse ¶
type ListConversations401JSONResponse struct{ UnauthenticatedJSONResponse }
func (ListConversations401JSONResponse) VisitListConversationsResponse ¶
func (response ListConversations401JSONResponse) VisitListConversationsResponse(w http.ResponseWriter) error
type ListConversations429JSONResponse ¶
type ListConversations429JSONResponse struct{ RateLimitedJSONResponse }
func (ListConversations429JSONResponse) VisitListConversationsResponse ¶
func (response ListConversations429JSONResponse) VisitListConversationsResponse(w http.ResponseWriter) error
type ListConversations500JSONResponse ¶
type ListConversations500JSONResponse struct{ InternalErrorJSONResponse }
func (ListConversations500JSONResponse) VisitListConversationsResponse ¶
func (response ListConversations500JSONResponse) VisitListConversationsResponse(w http.ResponseWriter) error
type ListConversations503JSONResponse ¶
type ListConversations503JSONResponse struct{ ChatDisabledJSONResponse }
func (ListConversations503JSONResponse) VisitListConversationsResponse ¶
func (response ListConversations503JSONResponse) VisitListConversationsResponse(w http.ResponseWriter) error
type ListConversationsParams ¶
type ListConversationsParams struct {
// Cursor The next_cursor of the previous page.
Cursor *string `form:"cursor,omitempty" json:"cursor,omitempty"`
Limit *int `form:"limit,omitempty" json:"limit,omitempty"`
}
ListConversationsParams defines parameters for ListConversations.
type ListConversationsRequestObject ¶
type ListConversationsRequestObject struct {
Params ListConversationsParams
}
type ListConversationsResponseObject ¶
type ListConversationsResponseObject interface {
VisitListConversationsResponse(w http.ResponseWriter) error
}
type ListDocuments200JSONResponse ¶
type ListDocuments200JSONResponse DocumentList
func (ListDocuments200JSONResponse) VisitListDocumentsResponse ¶
func (response ListDocuments200JSONResponse) VisitListDocumentsResponse(w http.ResponseWriter) error
type ListDocuments400JSONResponse ¶
type ListDocuments400JSONResponse Error
func (ListDocuments400JSONResponse) VisitListDocumentsResponse ¶
func (response ListDocuments400JSONResponse) VisitListDocumentsResponse(w http.ResponseWriter) error
type ListDocuments401JSONResponse ¶
type ListDocuments401JSONResponse struct{ UnauthenticatedJSONResponse }
func (ListDocuments401JSONResponse) VisitListDocumentsResponse ¶
func (response ListDocuments401JSONResponse) VisitListDocumentsResponse(w http.ResponseWriter) error
type ListDocuments429JSONResponse ¶
type ListDocuments429JSONResponse struct{ RateLimitedJSONResponse }
func (ListDocuments429JSONResponse) VisitListDocumentsResponse ¶
func (response ListDocuments429JSONResponse) VisitListDocumentsResponse(w http.ResponseWriter) error
type ListDocuments500JSONResponse ¶
type ListDocuments500JSONResponse struct{ InternalErrorJSONResponse }
func (ListDocuments500JSONResponse) VisitListDocumentsResponse ¶
func (response ListDocuments500JSONResponse) VisitListDocumentsResponse(w http.ResponseWriter) error
type ListDocumentsParams ¶
type ListDocumentsParams struct {
// Cursor The next_cursor of the previous page.
Cursor *string `form:"cursor,omitempty" json:"cursor,omitempty"`
Limit *int `form:"limit,omitempty" json:"limit,omitempty"`
}
ListDocumentsParams defines parameters for ListDocuments.
type ListDocumentsRequestObject ¶
type ListDocumentsRequestObject struct {
Params ListDocumentsParams
}
type ListDocumentsResponseObject ¶
type ListDocumentsResponseObject interface {
VisitListDocumentsResponse(w http.ResponseWriter) error
}
type Me ¶
type Me struct {
DisplayName string `json:"display_name"`
Email string `json:"email"`
ID openapi_types.UUID `json:"id"`
// Login The user's GitHub login; deleting the account asks for it.
Login string `json:"login"`
}
Me defines model for Me.
type Message ¶
type Message struct {
Citations []Citation `json:"citations"`
CreatedAt time.Time `json:"created_at"`
// Error Why an answer failed: the model didn't answer or was overloaded (model_unavailable), declined (model_refused), or the server failed (internal_error).
Error *ChatErrorCode `json:"error,omitempty"`
ID openapi_types.UUID `json:"id"`
// NotFound What the model said the library lacks, on a not_found answer.
NotFound *ChatNotFound `json:"not_found,omitempty"`
Role MessageRole `json:"role"`
Segments []MessageSegment `json:"segments"`
// Status An answer streams until it is done, stopped, failed, not_found (the library doesn't answer) or unsourced (it cites nothing); a question is done.
Status MessageStatus `json:"status"`
// Usage What an answer cost, across its calls to the model.
Usage *ChatUsage `json:"usage,omitempty"`
}
Message A question, or an answer: generated text, never part of a document (docs/adr/0012-chat.md). A not_found answer is the model saying the library doesn't answer, with not_found saying what is missing; an unsourced one has text and no citation, so it can't be checked against the library.
type MessageRole ¶
type MessageRole string
MessageRole defines model for Message.Role.
const ( Assistant MessageRole = "assistant" User MessageRole = "user" )
Defines values for MessageRole.
func (MessageRole) Valid ¶
func (e MessageRole) Valid() bool
Valid indicates whether the value is a known member of the MessageRole enum.
type MessageSegment ¶
MessageSegment A run of a message's Markdown, and the numbers of the citations that back it.
type MessageStatus ¶
type MessageStatus string
MessageStatus An answer streams until it is done, stopped, failed, not_found (the library doesn't answer) or unsourced (it cites nothing); a question is done.
const ( MessageStatusDone MessageStatus = "done" MessageStatusFailed MessageStatus = "failed" MessageStatusNotFound MessageStatus = "not_found" MessageStatusStopped MessageStatus = "stopped" MessageStatusStreaming MessageStatus = "streaming" MessageStatusUnsourced MessageStatus = "unsourced" )
Defines values for MessageStatus.
func (MessageStatus) Valid ¶
func (e MessageStatus) Valid() bool
Valid indicates whether the value is a known member of the MessageStatus enum.
type NewAnnotation ¶
type NewAnnotation struct {
BlockID string `json:"block_id"`
// Kind What an annotation is. Highlights are the one kind so far.
Kind AnnotationKind `json:"kind"`
Note *string `json:"note,omitempty"`
// Selector A range of one block's plain text: a heading's or paragraph's runs joined, or a code block's text. Offsets count UTF-16 code units, end exclusive. exact is the text in the range when it was saved; prefix and suffix, the text just around it, tell repeats apart when the text changes.
Selector TextSelector `json:"selector"`
}
NewAnnotation defines model for NewAnnotation.
type NotFoundJSONResponse ¶
type NotFoundJSONResponse Error
type RateLimitedJSONResponse ¶
type RateLimitedJSONResponse struct {
Body Error
Headers RateLimitedResponseHeaders
}
type RateLimitedResponseHeaders ¶
type RateLimitedResponseHeaders struct {
RetryAfter int
}
type ReanchorAnnotations200JSONResponse ¶
type ReanchorAnnotations200JSONResponse AnnotationList
func (ReanchorAnnotations200JSONResponse) VisitReanchorAnnotationsResponse ¶
func (response ReanchorAnnotations200JSONResponse) VisitReanchorAnnotationsResponse(w http.ResponseWriter) error
type ReanchorAnnotations400JSONResponse ¶
type ReanchorAnnotations400JSONResponse Error
func (ReanchorAnnotations400JSONResponse) VisitReanchorAnnotationsResponse ¶
func (response ReanchorAnnotations400JSONResponse) VisitReanchorAnnotationsResponse(w http.ResponseWriter) error
type ReanchorAnnotations401JSONResponse ¶
type ReanchorAnnotations401JSONResponse struct{ UnauthenticatedJSONResponse }
func (ReanchorAnnotations401JSONResponse) VisitReanchorAnnotationsResponse ¶
func (response ReanchorAnnotations401JSONResponse) VisitReanchorAnnotationsResponse(w http.ResponseWriter) error
type ReanchorAnnotations403JSONResponse ¶
type ReanchorAnnotations403JSONResponse struct{ CrossOriginJSONResponse }
func (ReanchorAnnotations403JSONResponse) VisitReanchorAnnotationsResponse ¶
func (response ReanchorAnnotations403JSONResponse) VisitReanchorAnnotationsResponse(w http.ResponseWriter) error
type ReanchorAnnotations404JSONResponse ¶
type ReanchorAnnotations404JSONResponse Error
func (ReanchorAnnotations404JSONResponse) VisitReanchorAnnotationsResponse ¶
func (response ReanchorAnnotations404JSONResponse) VisitReanchorAnnotationsResponse(w http.ResponseWriter) error
type ReanchorAnnotations409JSONResponse ¶
type ReanchorAnnotations409JSONResponse Error
func (ReanchorAnnotations409JSONResponse) VisitReanchorAnnotationsResponse ¶
func (response ReanchorAnnotations409JSONResponse) VisitReanchorAnnotationsResponse(w http.ResponseWriter) error
type ReanchorAnnotations413JSONResponse ¶
type ReanchorAnnotations413JSONResponse struct{ BodyTooLargeJSONResponse }
func (ReanchorAnnotations413JSONResponse) VisitReanchorAnnotationsResponse ¶
func (response ReanchorAnnotations413JSONResponse) VisitReanchorAnnotationsResponse(w http.ResponseWriter) error
type ReanchorAnnotations422JSONResponse ¶
type ReanchorAnnotations422JSONResponse Error
func (ReanchorAnnotations422JSONResponse) VisitReanchorAnnotationsResponse ¶
func (response ReanchorAnnotations422JSONResponse) VisitReanchorAnnotationsResponse(w http.ResponseWriter) error
type ReanchorAnnotations429JSONResponse ¶
type ReanchorAnnotations429JSONResponse struct{ RateLimitedJSONResponse }
func (ReanchorAnnotations429JSONResponse) VisitReanchorAnnotationsResponse ¶
func (response ReanchorAnnotations429JSONResponse) VisitReanchorAnnotationsResponse(w http.ResponseWriter) error
type ReanchorAnnotations500JSONResponse ¶
type ReanchorAnnotations500JSONResponse struct{ InternalErrorJSONResponse }
func (ReanchorAnnotations500JSONResponse) VisitReanchorAnnotationsResponse ¶
func (response ReanchorAnnotations500JSONResponse) VisitReanchorAnnotationsResponse(w http.ResponseWriter) error
type ReanchorAnnotationsJSONRequestBody ¶
type ReanchorAnnotationsJSONRequestBody = ReanchorRequest
ReanchorAnnotationsJSONRequestBody defines body for ReanchorAnnotations for application/json ContentType.
type ReanchorAnnotationsRequestObject ¶
type ReanchorAnnotationsRequestObject struct {
ID ID `json:"id"`
Body *ReanchorAnnotationsJSONRequestBody
}
type ReanchorAnnotationsResponseObject ¶
type ReanchorAnnotationsResponseObject interface {
VisitReanchorAnnotationsResponse(w http.ResponseWriter) error
}
type ReanchorRequest ¶
type ReanchorRequest struct {
Annotations []struct {
ID openapi_types.UUID `json:"id"`
// Selector A range of one block's plain text: a heading's or paragraph's runs joined, or a code block's text. Offsets count UTF-16 code units, end exclusive. exact is the text in the range when it was saved; prefix and suffix, the text just around it, tell repeats apart when the text changes.
Selector TextSelector `json:"selector"`
Version int `json:"version"`
} `json:"annotations"`
}
ReanchorRequest defines model for ReanchorRequest.
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 ResolveDocuments200JSONResponse ¶
type ResolveDocuments200JSONResponse ResolvedLinks
func (ResolveDocuments200JSONResponse) VisitResolveDocumentsResponse ¶
func (response ResolveDocuments200JSONResponse) VisitResolveDocumentsResponse(w http.ResponseWriter) error
type ResolveDocuments400JSONResponse ¶
type ResolveDocuments400JSONResponse Error
func (ResolveDocuments400JSONResponse) VisitResolveDocumentsResponse ¶
func (response ResolveDocuments400JSONResponse) VisitResolveDocumentsResponse(w http.ResponseWriter) error
type ResolveDocuments401JSONResponse ¶
type ResolveDocuments401JSONResponse struct{ UnauthenticatedJSONResponse }
func (ResolveDocuments401JSONResponse) VisitResolveDocumentsResponse ¶
func (response ResolveDocuments401JSONResponse) VisitResolveDocumentsResponse(w http.ResponseWriter) error
type ResolveDocuments403JSONResponse ¶
type ResolveDocuments403JSONResponse struct{ CrossOriginJSONResponse }
func (ResolveDocuments403JSONResponse) VisitResolveDocumentsResponse ¶
func (response ResolveDocuments403JSONResponse) VisitResolveDocumentsResponse(w http.ResponseWriter) error
type ResolveDocuments413JSONResponse ¶
type ResolveDocuments413JSONResponse struct{ BodyTooLargeJSONResponse }
func (ResolveDocuments413JSONResponse) VisitResolveDocumentsResponse ¶
func (response ResolveDocuments413JSONResponse) VisitResolveDocumentsResponse(w http.ResponseWriter) error
type ResolveDocuments429JSONResponse ¶
type ResolveDocuments429JSONResponse struct{ RateLimitedJSONResponse }
func (ResolveDocuments429JSONResponse) VisitResolveDocumentsResponse ¶
func (response ResolveDocuments429JSONResponse) VisitResolveDocumentsResponse(w http.ResponseWriter) error
type ResolveDocuments500JSONResponse ¶
type ResolveDocuments500JSONResponse struct{ InternalErrorJSONResponse }
func (ResolveDocuments500JSONResponse) VisitResolveDocumentsResponse ¶
func (response ResolveDocuments500JSONResponse) VisitResolveDocumentsResponse(w http.ResponseWriter) error
type ResolveDocumentsJSONRequestBody ¶
type ResolveDocumentsJSONRequestBody = ResolveDocumentsRequest
ResolveDocumentsJSONRequestBody defines body for ResolveDocuments for application/json ContentType.
type ResolveDocumentsRequest ¶
type ResolveDocumentsRequest struct {
Urls []string `json:"urls"`
}
ResolveDocumentsRequest defines model for ResolveDocumentsRequest.
type ResolveDocumentsRequestObject ¶
type ResolveDocumentsRequestObject struct {
Body *ResolveDocumentsJSONRequestBody
}
type ResolveDocumentsResponseObject ¶
type ResolveDocumentsResponseObject interface {
VisitResolveDocumentsResponse(w http.ResponseWriter) error
}
type ResolvedLink ¶
type ResolvedLink struct {
// CanonicalURL The URL canonicalized as imports do; absent when an import would refuse it.
CanonicalURL *string `json:"canonical_url,omitempty"`
// DocumentID The user's document for it; absent when they have none.
DocumentID *openapi_types.UUID `json:"document_id,omitempty"`
// URL The URL as asked.
URL string `json:"url"`
}
ResolvedLink defines model for ResolvedLink.
type ResolvedLinks ¶
type ResolvedLinks struct {
Links []ResolvedLink `json:"links"`
}
ResolvedLinks defines model for ResolvedLinks.
type RevertBlock200JSONResponse ¶
type RevertBlock200JSONResponse DocumentResponse
func (RevertBlock200JSONResponse) VisitRevertBlockResponse ¶
func (response RevertBlock200JSONResponse) VisitRevertBlockResponse(w http.ResponseWriter) error
type RevertBlock400JSONResponse ¶
type RevertBlock400JSONResponse struct{ InvalidParameterJSONResponse }
func (RevertBlock400JSONResponse) VisitRevertBlockResponse ¶
func (response RevertBlock400JSONResponse) VisitRevertBlockResponse(w http.ResponseWriter) error
type RevertBlock401JSONResponse ¶
type RevertBlock401JSONResponse struct{ UnauthenticatedJSONResponse }
func (RevertBlock401JSONResponse) VisitRevertBlockResponse ¶
func (response RevertBlock401JSONResponse) VisitRevertBlockResponse(w http.ResponseWriter) error
type RevertBlock403JSONResponse ¶
type RevertBlock403JSONResponse struct{ CrossOriginJSONResponse }
func (RevertBlock403JSONResponse) VisitRevertBlockResponse ¶
func (response RevertBlock403JSONResponse) VisitRevertBlockResponse(w http.ResponseWriter) error
type RevertBlock404JSONResponse ¶
type RevertBlock404JSONResponse Error
func (RevertBlock404JSONResponse) VisitRevertBlockResponse ¶
func (response RevertBlock404JSONResponse) VisitRevertBlockResponse(w http.ResponseWriter) error
type RevertBlock429JSONResponse ¶
type RevertBlock429JSONResponse struct{ RateLimitedJSONResponse }
func (RevertBlock429JSONResponse) VisitRevertBlockResponse ¶
func (response RevertBlock429JSONResponse) VisitRevertBlockResponse(w http.ResponseWriter) error
type RevertBlock500JSONResponse ¶
type RevertBlock500JSONResponse struct{ InternalErrorJSONResponse }
func (RevertBlock500JSONResponse) VisitRevertBlockResponse ¶
func (response RevertBlock500JSONResponse) VisitRevertBlockResponse(w http.ResponseWriter) error
type RevertBlockResponseObject ¶
type RevertBlockResponseObject interface {
VisitRevertBlockResponse(w http.ResponseWriter) error
}
type SaveDocument200JSONResponse ¶
type SaveDocument200JSONResponse SavedDocument
func (SaveDocument200JSONResponse) VisitSaveDocumentResponse ¶
func (response SaveDocument200JSONResponse) VisitSaveDocumentResponse(w http.ResponseWriter) error
type SaveDocument400JSONResponse ¶
type SaveDocument400JSONResponse Error
func (SaveDocument400JSONResponse) VisitSaveDocumentResponse ¶
func (response SaveDocument400JSONResponse) VisitSaveDocumentResponse(w http.ResponseWriter) error
type SaveDocument401JSONResponse ¶
type SaveDocument401JSONResponse struct{ UnauthenticatedJSONResponse }
func (SaveDocument401JSONResponse) VisitSaveDocumentResponse ¶
func (response SaveDocument401JSONResponse) VisitSaveDocumentResponse(w http.ResponseWriter) error
type SaveDocument403JSONResponse ¶
type SaveDocument403JSONResponse struct{ CrossOriginJSONResponse }
func (SaveDocument403JSONResponse) VisitSaveDocumentResponse ¶
func (response SaveDocument403JSONResponse) VisitSaveDocumentResponse(w http.ResponseWriter) error
type SaveDocument404JSONResponse ¶
type SaveDocument404JSONResponse struct{ NotFoundJSONResponse }
func (SaveDocument404JSONResponse) VisitSaveDocumentResponse ¶
func (response SaveDocument404JSONResponse) VisitSaveDocumentResponse(w http.ResponseWriter) error
type SaveDocument409JSONResponse ¶
type SaveDocument409JSONResponse VersionConflict
func (SaveDocument409JSONResponse) VisitSaveDocumentResponse ¶
func (response SaveDocument409JSONResponse) VisitSaveDocumentResponse(w http.ResponseWriter) error
type SaveDocument413JSONResponse ¶
type SaveDocument413JSONResponse struct{ BodyTooLargeJSONResponse }
func (SaveDocument413JSONResponse) VisitSaveDocumentResponse ¶
func (response SaveDocument413JSONResponse) VisitSaveDocumentResponse(w http.ResponseWriter) error
type SaveDocument422JSONResponse ¶
type SaveDocument422JSONResponse Error
func (SaveDocument422JSONResponse) VisitSaveDocumentResponse ¶
func (response SaveDocument422JSONResponse) VisitSaveDocumentResponse(w http.ResponseWriter) error
type SaveDocument429JSONResponse ¶
type SaveDocument429JSONResponse struct{ RateLimitedJSONResponse }
func (SaveDocument429JSONResponse) VisitSaveDocumentResponse ¶
func (response SaveDocument429JSONResponse) VisitSaveDocumentResponse(w http.ResponseWriter) error
type SaveDocument500JSONResponse ¶
type SaveDocument500JSONResponse struct{ InternalErrorJSONResponse }
func (SaveDocument500JSONResponse) VisitSaveDocumentResponse ¶
func (response SaveDocument500JSONResponse) VisitSaveDocumentResponse(w http.ResponseWriter) error
type SaveDocumentJSONRequestBody ¶
type SaveDocumentJSONRequestBody = SaveDocumentRequest
SaveDocumentJSONRequestBody defines body for SaveDocument for application/json ContentType.
type SaveDocumentRequest ¶
type SaveDocumentRequest struct {
Content DocContent `json:"content"`
// Version The version the content was edited from.
Version int `json:"version"`
}
SaveDocumentRequest defines model for SaveDocumentRequest.
type SaveDocumentRequestObject ¶
type SaveDocumentRequestObject struct {
ID ID `json:"id"`
Body *SaveDocumentJSONRequestBody
}
type SaveDocumentResponseObject ¶
type SaveDocumentResponseObject interface {
VisitSaveDocumentResponse(w http.ResponseWriter) error
}
type SavedDocument ¶
type SavedDocument struct {
Version int `json:"version"`
}
SavedDocument defines model for SavedDocument.
type Search200JSONResponse ¶
type Search200JSONResponse SearchResults
func (Search200JSONResponse) VisitSearchResponse ¶
func (response Search200JSONResponse) VisitSearchResponse(w http.ResponseWriter) error
type Search400JSONResponse ¶
type Search400JSONResponse struct{ InvalidParameterJSONResponse }
func (Search400JSONResponse) VisitSearchResponse ¶
func (response Search400JSONResponse) VisitSearchResponse(w http.ResponseWriter) error
type Search401JSONResponse ¶
type Search401JSONResponse struct{ UnauthenticatedJSONResponse }
func (Search401JSONResponse) VisitSearchResponse ¶
func (response Search401JSONResponse) VisitSearchResponse(w http.ResponseWriter) error
type Search429JSONResponse ¶
type Search429JSONResponse struct{ RateLimitedJSONResponse }
func (Search429JSONResponse) VisitSearchResponse ¶
func (response Search429JSONResponse) VisitSearchResponse(w http.ResponseWriter) error
type Search500JSONResponse ¶
type Search500JSONResponse struct{ InternalErrorJSONResponse }
func (Search500JSONResponse) VisitSearchResponse ¶
func (response Search500JSONResponse) VisitSearchResponse(w http.ResponseWriter) error
type SearchParams ¶
type SearchParams struct {
Q string `form:"q" json:"q"`
// DocumentID Search this document alone.
DocumentID *openapi_types.UUID `form:"document_id,omitempty" json:"document_id,omitempty"`
Limit *int `form:"limit,omitempty" json:"limit,omitempty"`
}
SearchParams defines parameters for Search.
type SearchRequestObject ¶
type SearchRequestObject struct {
Params SearchParams
}
type SearchResponseObject ¶
type SearchResponseObject interface {
VisitSearchResponse(w http.ResponseWriter) error
}
type SearchResult ¶
type SearchResult struct {
// BlockID The top-level block the result starts at.
BlockID string `json:"block_id"`
DocumentID openapi_types.UUID `json:"document_id"`
DocumentTitle string `json:"document_title"`
HeadingPath []string `json:"heading_path"`
Kind SearchResultKind `json:"kind"`
// Score How the result scored; in dev and test only.
Score *SearchScore `json:"score,omitempty"`
// Snippet The result's text in parts; marked parts are the words the query matched.
Snippet []SnippetPart `json:"snippet"`
}
SearchResult defines model for SearchResult.
type SearchResultKind ¶
type SearchResultKind string
SearchResultKind defines model for SearchResult.Kind.
const ( Code SearchResultKind = "code" Note SearchResultKind = "note" Prose SearchResultKind = "prose" )
Defines values for SearchResultKind.
func (SearchResultKind) Valid ¶
func (e SearchResultKind) Valid() bool
Valid indicates whether the value is a known member of the SearchResultKind enum.
type SearchResults ¶
type SearchResults struct {
// Degraded Meaning couldn't be searched, so the results are word matches alone.
Degraded bool `json:"degraded"`
Results []SearchResult `json:"results"`
}
SearchResults defines model for SearchResults.
type SearchScore ¶
type SearchScore struct {
// Distance Its cosine distance from the query.
Distance *float32 `json:"distance,omitempty"`
Fused float32 `json:"fused"`
// MeaningRank Its rank by meaning; absent when meaning didn't find it.
MeaningRank *int `json:"meaning_rank,omitempty"`
// WordsRank Its rank by words; absent when words didn't find it.
WordsRank *int `json:"words_rank,omitempty"`
}
SearchScore How the result scored; in dev and test only.
type SendMessageRequest ¶
type SendMessageRequest struct {
Text string `json:"text"`
}
SendMessageRequest defines model for SendMessageRequest.
type ServeMux ¶
type ServeMux interface {
HandleFunc(pattern string, handler func(http.ResponseWriter, *http.Request))
http.Handler
}
ServeMux is an abstraction of http.ServeMux.
type ServerInterface ¶
type ServerInterface interface {
// DeleteAnnotation Remove an annotation
// (DELETE /annotations/{id})
DeleteAnnotation(w http.ResponseWriter, r *http.Request, id ID)
// UpdateAnnotation Change an annotation's note, or place it on new text
// (PATCH /annotations/{id})
UpdateAnnotation(w http.ResponseWriter, r *http.Request, id ID)
// ListConversations List the user's conversations, most recently active first
// (GET /conversations)
ListConversations(w http.ResponseWriter, r *http.Request, params ListConversationsParams)
// CreateConversation Start a conversation
// (POST /conversations)
CreateConversation(w http.ResponseWriter, r *http.Request)
// DeleteConversation Delete a conversation and its messages
// (DELETE /conversations/{id})
DeleteConversation(w http.ResponseWriter, r *http.Request, id ID)
// GetConversation Get a conversation and its messages, in order
// (GET /conversations/{id})
GetConversation(w http.ResponseWriter, r *http.Request, id ID)
// StopConversation Stop the answer being written
// (POST /conversations/{id}/stop)
StopConversation(w http.ResponseWriter, r *http.Request, id ID)
// ListDocuments List the user's documents, newest first
// (GET /documents)
ListDocuments(w http.ResponseWriter, r *http.Request, params ListDocumentsParams)
// ResolveDocuments Find which links the user already has as documents
// (POST /documents/resolve)
ResolveDocuments(w http.ResponseWriter, r *http.Request)
// DeleteDocument Delete a document
// (DELETE /documents/{id})
DeleteDocument(w http.ResponseWriter, r *http.Request, id ID)
// GetDocument Get a document with its content
// (GET /documents/{id})
GetDocument(w http.ResponseWriter, r *http.Request, id ID)
// SaveDocument Save a document's content
// (PATCH /documents/{id})
SaveDocument(w http.ResponseWriter, r *http.Request, id ID)
// ListAnnotations List a document's highlights and notes
// (GET /documents/{id}/annotations)
ListAnnotations(w http.ResponseWriter, r *http.Request, id ID)
// CreateAnnotation Highlight a range of one block, with an optional note
// (POST /documents/{id}/annotations)
CreateAnnotation(w http.ResponseWriter, r *http.Request, id ID)
// ReanchorAnnotations Move annotations to where their text is now
// (POST /documents/{id}/annotations/reanchor)
ReanchorAnnotations(w http.ResponseWriter, r *http.Request, id ID)
// RevertBlock Put a source block back as it was extracted
// (POST /documents/{id}/blocks/{blockId}/revert)
RevertBlock(w http.ResponseWriter, r *http.Request, id ID, blockID string)
// GetDocumentOriginal Get the PDF a document was made from
// (GET /documents/{id}/original)
GetDocumentOriginal(w http.ResponseWriter, r *http.Request, id ID)
// CreateImport Import a page
// (POST /imports)
CreateImport(w http.ResponseWriter, r *http.Request)
// CreatePdfImport Import a PDF
// (POST /imports/pdf)
CreatePdfImport(w http.ResponseWriter, r *http.Request)
// GetImport Get an import
// (GET /imports/{id})
GetImport(w http.ResponseWriter, r *http.Request, id ID)
// GetMe The signed-in user
// (GET /me)
GetMe(w http.ResponseWriter, r *http.Request)
// Search Search the user's library
// (GET /search)
Search(w http.ResponseWriter, r *http.Request, params SearchParams)
}
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) CreateAnnotation ¶
func (siw *ServerInterfaceWrapper) CreateAnnotation(w http.ResponseWriter, r *http.Request)
CreateAnnotation operation middleware
func (*ServerInterfaceWrapper) CreateConversation ¶
func (siw *ServerInterfaceWrapper) CreateConversation(w http.ResponseWriter, r *http.Request)
CreateConversation operation middleware
func (*ServerInterfaceWrapper) CreateImport ¶
func (siw *ServerInterfaceWrapper) CreateImport(w http.ResponseWriter, r *http.Request)
CreateImport operation middleware
func (*ServerInterfaceWrapper) CreatePdfImport ¶
func (siw *ServerInterfaceWrapper) CreatePdfImport(w http.ResponseWriter, r *http.Request)
CreatePdfImport operation middleware
func (*ServerInterfaceWrapper) DeleteAnnotation ¶
func (siw *ServerInterfaceWrapper) DeleteAnnotation(w http.ResponseWriter, r *http.Request)
DeleteAnnotation operation middleware
func (*ServerInterfaceWrapper) DeleteConversation ¶
func (siw *ServerInterfaceWrapper) DeleteConversation(w http.ResponseWriter, r *http.Request)
DeleteConversation operation middleware
func (*ServerInterfaceWrapper) DeleteDocument ¶
func (siw *ServerInterfaceWrapper) DeleteDocument(w http.ResponseWriter, r *http.Request)
DeleteDocument operation middleware
func (*ServerInterfaceWrapper) GetConversation ¶
func (siw *ServerInterfaceWrapper) GetConversation(w http.ResponseWriter, r *http.Request)
GetConversation operation middleware
func (*ServerInterfaceWrapper) GetDocument ¶
func (siw *ServerInterfaceWrapper) GetDocument(w http.ResponseWriter, r *http.Request)
GetDocument operation middleware
func (*ServerInterfaceWrapper) GetDocumentOriginal ¶
func (siw *ServerInterfaceWrapper) GetDocumentOriginal(w http.ResponseWriter, r *http.Request)
GetDocumentOriginal operation middleware
func (*ServerInterfaceWrapper) GetImport ¶
func (siw *ServerInterfaceWrapper) GetImport(w http.ResponseWriter, r *http.Request)
GetImport operation middleware
func (*ServerInterfaceWrapper) GetMe ¶
func (siw *ServerInterfaceWrapper) GetMe(w http.ResponseWriter, r *http.Request)
GetMe operation middleware
func (*ServerInterfaceWrapper) ListAnnotations ¶
func (siw *ServerInterfaceWrapper) ListAnnotations(w http.ResponseWriter, r *http.Request)
ListAnnotations operation middleware
func (*ServerInterfaceWrapper) ListConversations ¶
func (siw *ServerInterfaceWrapper) ListConversations(w http.ResponseWriter, r *http.Request)
ListConversations operation middleware
func (*ServerInterfaceWrapper) ListDocuments ¶
func (siw *ServerInterfaceWrapper) ListDocuments(w http.ResponseWriter, r *http.Request)
ListDocuments operation middleware
func (*ServerInterfaceWrapper) ReanchorAnnotations ¶
func (siw *ServerInterfaceWrapper) ReanchorAnnotations(w http.ResponseWriter, r *http.Request)
ReanchorAnnotations operation middleware
func (*ServerInterfaceWrapper) ResolveDocuments ¶
func (siw *ServerInterfaceWrapper) ResolveDocuments(w http.ResponseWriter, r *http.Request)
ResolveDocuments operation middleware
func (*ServerInterfaceWrapper) RevertBlock ¶
func (siw *ServerInterfaceWrapper) RevertBlock(w http.ResponseWriter, r *http.Request)
RevertBlock operation middleware
func (*ServerInterfaceWrapper) SaveDocument ¶
func (siw *ServerInterfaceWrapper) SaveDocument(w http.ResponseWriter, r *http.Request)
SaveDocument operation middleware
func (*ServerInterfaceWrapper) Search ¶
func (siw *ServerInterfaceWrapper) Search(w http.ResponseWriter, r *http.Request)
Search operation middleware
func (*ServerInterfaceWrapper) StopConversation ¶
func (siw *ServerInterfaceWrapper) StopConversation(w http.ResponseWriter, r *http.Request)
StopConversation operation middleware
func (*ServerInterfaceWrapper) UpdateAnnotation ¶
func (siw *ServerInterfaceWrapper) UpdateAnnotation(w http.ResponseWriter, r *http.Request)
UpdateAnnotation operation middleware
type SignInErrorCode ¶
type SignInErrorCode string
SignInErrorCode Why signing in failed, in /login?error=: the user or GitHub refused (denied); the sign-in's cookie was missing, expired or another (state_mismatch); the GitHub account has no primary, verified email (no_verified_email); or GitHub didn't answer (provider_unavailable).
const ( Denied SignInErrorCode = "denied" NoVerifiedEmail SignInErrorCode = "no_verified_email" StateMismatch SignInErrorCode = "state_mismatch" )
Defines values for SignInErrorCode.
func (SignInErrorCode) Valid ¶
func (e SignInErrorCode) Valid() bool
Valid indicates whether the value is a known member of the SignInErrorCode enum.
type SnippetPart ¶
SnippetPart defines model for SnippetPart.
type StdHTTPServerOptions ¶
type StdHTTPServerOptions struct {
BaseURL string
BaseRouter ServeMux
Middlewares []MiddlewareFunc
ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
}
type StopConversation204Response ¶
type StopConversation204Response struct {
}
func (StopConversation204Response) VisitStopConversationResponse ¶
func (response StopConversation204Response) VisitStopConversationResponse(w http.ResponseWriter) error
type StopConversation400JSONResponse ¶
type StopConversation400JSONResponse struct{ InvalidParameterJSONResponse }
func (StopConversation400JSONResponse) VisitStopConversationResponse ¶
func (response StopConversation400JSONResponse) VisitStopConversationResponse(w http.ResponseWriter) error
type StopConversation401JSONResponse ¶
type StopConversation401JSONResponse struct{ UnauthenticatedJSONResponse }
func (StopConversation401JSONResponse) VisitStopConversationResponse ¶
func (response StopConversation401JSONResponse) VisitStopConversationResponse(w http.ResponseWriter) error
type StopConversation403JSONResponse ¶
type StopConversation403JSONResponse struct{ CrossOriginJSONResponse }
func (StopConversation403JSONResponse) VisitStopConversationResponse ¶
func (response StopConversation403JSONResponse) VisitStopConversationResponse(w http.ResponseWriter) error
type StopConversation404JSONResponse ¶
type StopConversation404JSONResponse struct{ NotFoundJSONResponse }
func (StopConversation404JSONResponse) VisitStopConversationResponse ¶
func (response StopConversation404JSONResponse) VisitStopConversationResponse(w http.ResponseWriter) error
type StopConversation429JSONResponse ¶
type StopConversation429JSONResponse struct{ RateLimitedJSONResponse }
func (StopConversation429JSONResponse) VisitStopConversationResponse ¶
func (response StopConversation429JSONResponse) VisitStopConversationResponse(w http.ResponseWriter) error
type StopConversation500JSONResponse ¶
type StopConversation500JSONResponse struct{ InternalErrorJSONResponse }
func (StopConversation500JSONResponse) VisitStopConversationResponse ¶
func (response StopConversation500JSONResponse) VisitStopConversationResponse(w http.ResponseWriter) error
type StopConversation503JSONResponse ¶
type StopConversation503JSONResponse struct{ ChatDisabledJSONResponse }
func (StopConversation503JSONResponse) VisitStopConversationResponse ¶
func (response StopConversation503JSONResponse) VisitStopConversationResponse(w http.ResponseWriter) error
type StopConversationRequestObject ¶
type StopConversationRequestObject struct {
ID ID `json:"id"`
}
type StopConversationResponseObject ¶
type StopConversationResponseObject interface {
VisitStopConversationResponse(w http.ResponseWriter) 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 StrictMiddlewareFunc ¶
type StrictMiddlewareFunc func(f StrictHandlerFunc, operationID string) StrictHandlerFunc
type StrictServerInterface ¶
type StrictServerInterface interface {
// DeleteAnnotation Remove an annotation
// (DELETE /annotations/{id})
DeleteAnnotation(ctx context.Context, request DeleteAnnotationRequestObject) (DeleteAnnotationResponseObject, error)
// UpdateAnnotation Change an annotation's note, or place it on new text
// (PATCH /annotations/{id})
UpdateAnnotation(ctx context.Context, request UpdateAnnotationRequestObject) (UpdateAnnotationResponseObject, error)
// ListConversations List the user's conversations, most recently active first
// (GET /conversations)
ListConversations(ctx context.Context, request ListConversationsRequestObject) (ListConversationsResponseObject, error)
// CreateConversation Start a conversation
// (POST /conversations)
CreateConversation(ctx context.Context, request CreateConversationRequestObject) (CreateConversationResponseObject, error)
// DeleteConversation Delete a conversation and its messages
// (DELETE /conversations/{id})
DeleteConversation(ctx context.Context, request DeleteConversationRequestObject) (DeleteConversationResponseObject, error)
// GetConversation Get a conversation and its messages, in order
// (GET /conversations/{id})
GetConversation(ctx context.Context, request GetConversationRequestObject) (GetConversationResponseObject, error)
// StopConversation Stop the answer being written
// (POST /conversations/{id}/stop)
StopConversation(ctx context.Context, request StopConversationRequestObject) (StopConversationResponseObject, error)
// ListDocuments List the user's documents, newest first
// (GET /documents)
ListDocuments(ctx context.Context, request ListDocumentsRequestObject) (ListDocumentsResponseObject, error)
// ResolveDocuments Find which links the user already has as documents
// (POST /documents/resolve)
ResolveDocuments(ctx context.Context, request ResolveDocumentsRequestObject) (ResolveDocumentsResponseObject, error)
// DeleteDocument Delete a document
// (DELETE /documents/{id})
DeleteDocument(ctx context.Context, request DeleteDocumentRequestObject) (DeleteDocumentResponseObject, error)
// GetDocument Get a document with its content
// (GET /documents/{id})
GetDocument(ctx context.Context, request GetDocumentRequestObject) (GetDocumentResponseObject, error)
// SaveDocument Save a document's content
// (PATCH /documents/{id})
SaveDocument(ctx context.Context, request SaveDocumentRequestObject) (SaveDocumentResponseObject, error)
// ListAnnotations List a document's highlights and notes
// (GET /documents/{id}/annotations)
ListAnnotations(ctx context.Context, request ListAnnotationsRequestObject) (ListAnnotationsResponseObject, error)
// CreateAnnotation Highlight a range of one block, with an optional note
// (POST /documents/{id}/annotations)
CreateAnnotation(ctx context.Context, request CreateAnnotationRequestObject) (CreateAnnotationResponseObject, error)
// ReanchorAnnotations Move annotations to where their text is now
// (POST /documents/{id}/annotations/reanchor)
ReanchorAnnotations(ctx context.Context, request ReanchorAnnotationsRequestObject) (ReanchorAnnotationsResponseObject, error)
// RevertBlock Put a source block back as it was extracted
// (POST /documents/{id}/blocks/{blockId}/revert)
RevertBlock(ctx context.Context, request RevertBlockRequestObject) (RevertBlockResponseObject, error)
// GetDocumentOriginal Get the PDF a document was made from
// (GET /documents/{id}/original)
GetDocumentOriginal(ctx context.Context, request GetDocumentOriginalRequestObject) (GetDocumentOriginalResponseObject, error)
// CreateImport Import a page
// (POST /imports)
CreateImport(ctx context.Context, request CreateImportRequestObject) (CreateImportResponseObject, error)
// CreatePdfImport Import a PDF
// (POST /imports/pdf)
CreatePdfImport(ctx context.Context, request CreatePdfImportRequestObject) (CreatePdfImportResponseObject, error)
// GetImport Get an import
// (GET /imports/{id})
GetImport(ctx context.Context, request GetImportRequestObject) (GetImportResponseObject, error)
// GetMe The signed-in user
// (GET /me)
GetMe(ctx context.Context, request GetMeRequestObject) (GetMeResponseObject, error)
// Search Search the user's library
// (GET /search)
Search(ctx context.Context, request SearchRequestObject) (SearchResponseObject, error)
}
StrictServerInterface represents all server handlers.
type TextSelector ¶
type TextSelector = annotation.Selector
TextSelector A range of one block's plain text: a heading's or paragraph's runs joined, or a code block's text. Offsets count UTF-16 code units, end exclusive. exact is the text in the range when it was saved; prefix and suffix, the text just around it, tell repeats apart when the text changes.
type TooManyImportsJSONResponse ¶
type TooManyImportsJSONResponse struct {
Body Error
Headers TooManyImportsResponseHeaders
}
type TooManyImportsResponseHeaders ¶
type TooManyImportsResponseHeaders struct {
RetryAfter *int
}
type TooManyQuestions ¶
type TooManyQuestions = Error
TooManyQuestions defines model for TooManyQuestions.
type TooManyQuestionsJSONResponse ¶
type TooManyQuestionsJSONResponse struct {
Body Error
Headers TooManyQuestionsResponseHeaders
}
type TooManyQuestionsResponseHeaders ¶
type TooManyQuestionsResponseHeaders struct {
RetryAfter *int
}
type TooManyValuesForParamError ¶
func (*TooManyValuesForParamError) Error ¶
func (e *TooManyValuesForParamError) Error() string
type Unauthenticated ¶
type Unauthenticated = Error
Unauthenticated defines model for Unauthenticated.
type UnauthenticatedJSONResponse ¶
type UnauthenticatedJSONResponse Error
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
type UpdateAnnotation200JSONResponse ¶
type UpdateAnnotation200JSONResponse Annotation
func (UpdateAnnotation200JSONResponse) VisitUpdateAnnotationResponse ¶
func (response UpdateAnnotation200JSONResponse) VisitUpdateAnnotationResponse(w http.ResponseWriter) error
type UpdateAnnotation400JSONResponse ¶
type UpdateAnnotation400JSONResponse Error
func (UpdateAnnotation400JSONResponse) VisitUpdateAnnotationResponse ¶
func (response UpdateAnnotation400JSONResponse) VisitUpdateAnnotationResponse(w http.ResponseWriter) error
type UpdateAnnotation401JSONResponse ¶
type UpdateAnnotation401JSONResponse struct{ UnauthenticatedJSONResponse }
func (UpdateAnnotation401JSONResponse) VisitUpdateAnnotationResponse ¶
func (response UpdateAnnotation401JSONResponse) VisitUpdateAnnotationResponse(w http.ResponseWriter) error
type UpdateAnnotation403JSONResponse ¶
type UpdateAnnotation403JSONResponse struct{ CrossOriginJSONResponse }
func (UpdateAnnotation403JSONResponse) VisitUpdateAnnotationResponse ¶
func (response UpdateAnnotation403JSONResponse) VisitUpdateAnnotationResponse(w http.ResponseWriter) error
type UpdateAnnotation404JSONResponse ¶
type UpdateAnnotation404JSONResponse struct{ NotFoundJSONResponse }
func (UpdateAnnotation404JSONResponse) VisitUpdateAnnotationResponse ¶
func (response UpdateAnnotation404JSONResponse) VisitUpdateAnnotationResponse(w http.ResponseWriter) error
type UpdateAnnotation409JSONResponse ¶
type UpdateAnnotation409JSONResponse VersionConflict
func (UpdateAnnotation409JSONResponse) VisitUpdateAnnotationResponse ¶
func (response UpdateAnnotation409JSONResponse) VisitUpdateAnnotationResponse(w http.ResponseWriter) error
type UpdateAnnotation413JSONResponse ¶
type UpdateAnnotation413JSONResponse struct{ BodyTooLargeJSONResponse }
func (UpdateAnnotation413JSONResponse) VisitUpdateAnnotationResponse ¶
func (response UpdateAnnotation413JSONResponse) VisitUpdateAnnotationResponse(w http.ResponseWriter) error
type UpdateAnnotation422JSONResponse ¶
type UpdateAnnotation422JSONResponse Error
func (UpdateAnnotation422JSONResponse) VisitUpdateAnnotationResponse ¶
func (response UpdateAnnotation422JSONResponse) VisitUpdateAnnotationResponse(w http.ResponseWriter) error
type UpdateAnnotation429JSONResponse ¶
type UpdateAnnotation429JSONResponse struct{ RateLimitedJSONResponse }
func (UpdateAnnotation429JSONResponse) VisitUpdateAnnotationResponse ¶
func (response UpdateAnnotation429JSONResponse) VisitUpdateAnnotationResponse(w http.ResponseWriter) error
type UpdateAnnotation500JSONResponse ¶
type UpdateAnnotation500JSONResponse struct{ InternalErrorJSONResponse }
func (UpdateAnnotation500JSONResponse) VisitUpdateAnnotationResponse ¶
func (response UpdateAnnotation500JSONResponse) VisitUpdateAnnotationResponse(w http.ResponseWriter) error
type UpdateAnnotationJSONRequestBody ¶
type UpdateAnnotationJSONRequestBody = AnnotationPatch
UpdateAnnotationJSONRequestBody defines body for UpdateAnnotation for application/json ContentType.
type UpdateAnnotationRequestObject ¶
type UpdateAnnotationRequestObject struct {
ID ID `json:"id"`
Body *UpdateAnnotationJSONRequestBody
}
type UpdateAnnotationResponseObject ¶
type UpdateAnnotationResponseObject interface {
VisitUpdateAnnotationResponse(w http.ResponseWriter) error
}
type UserBlockKind ¶
type UserBlockKind string
UserBlockKind The kinds a user block may use, nested blocks included. Source code, tables, tabs and images come only from the page.
const ( Callout UserBlockKind = "callout" Divider UserBlockKind = "divider" Heading UserBlockKind = "heading" List UserBlockKind = "list" Paragraph UserBlockKind = "paragraph" Quote UserBlockKind = "quote" )
Defines values for UserBlockKind.
func (UserBlockKind) Valid ¶
func (e UserBlockKind) Valid() bool
Valid indicates whether the value is a known member of the UserBlockKind enum.
type VersionConflict ¶
type VersionConflict struct {
// CurrentVersion The document's version now.
CurrentVersion int `json:"current_version"`
Error ErrorBody `json:"error"`
}
VersionConflict defines model for VersionConflict.