Documentation
¶
Overview ¶
*
- Types & Functions for interacting with the paperless search interface
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Correspondent ¶
type CorrespondentResult ¶
type CorrespondentResult struct { SearchResult Results []Correspondent `json:"results"` }
type Document ¶
type Document struct { Id int `json:"id"` Correspondent int `json:"correspondent"` Document_type int `json:"document_type"` Storage_path string `json:"storage_path"` Title string `json:"title"` Content string `json:"content"` Tags []int `json:"tags"` Created time.Time `json:"created"` Created_date string `json:"created_date"` Modified time.Time `json:"modified"` Added time.Time `json:"added"` Archive_serial_number string `json:"archive_serial_number"` Original_file_name string `json:"original_file_name"` Archived_file_name string `json:"archived_file_name"` Owner int `json:"owner"` User_can_change bool `json:"user_can_change"` Notes []string `json:"notes"` // contains filtered or unexported fields }
Paperless Document
func (*Document) DownloadUrl ¶
Get the download URL for the document
func (*Document) PreviewUrl ¶
Get the preview URL for the document
func (*Document) ThumbnailUrl ¶
Get the thumbnail URL for the document
type DocumentResult ¶
type DocumentResult struct { SearchResult Results []Document `json:"results"` }
Result of a document search query
type PaperlessClient ¶
type PaperlessClient struct {
// contains filtered or unexported fields
}
PaperlessClient is the main struct for the paperless client
func (*PaperlessClient) GetDocument ¶
func (p *PaperlessClient) GetDocument(id int) (Document, error)
func (*PaperlessClient) GetDocumentsByTag ¶
func (p *PaperlessClient) GetDocumentsByTag(tag string) ([]Document, error)
func (*PaperlessClient) GetDocumentsByTagId ¶
func (p *PaperlessClient) GetDocumentsByTagId(tag int) ([]Document, error)
func (*PaperlessClient) SearchDocuments ¶
func (p *PaperlessClient) SearchDocuments(query SearchQuery) ([]Document, error)
type SearchQuery ¶
type SearchQuery []SearchTerm
func Query ¶
func Query(key string, value string) SearchQuery
func (SearchQuery) Add ¶
func (q SearchQuery) Add(term SearchTerm) SearchQuery
func (SearchQuery) Encode ¶
func (q SearchQuery) Encode() string
Create URL encoded string from search query
type SearchResult ¶
type SearchResult struct { Count int `json:"count"` Next string `json:"next"` Previous string `json:"previous"` All []int `json:"all"` }
SearchResult is the result of a search query This will be overridden by the specific search result
type SearchTerm ¶
Click to show internal directories.
Click to hide internal directories.