Documentation
¶
Index ¶
- Constants
- type Abilities
- type Client
- func (c *Client) DeleteFileOperation(ctx context.Context, id string) error
- func (c *Client) DownloadFileExport(ctx context.Context, id string) (io.ReadCloser, error)
- func (c *Client) GenerateExport(ctx context.Context, format ExportFormat, includeAttachments bool) (*FileOperation, error)
- func (c *Client) GenerateExportAndWait(ctx context.Context, format ExportFormat, includeAttachments bool) (*FileOperation, error)
- func (c *Client) GetFileOperation(ctx context.Context, id string) (*FileOperation, error)
- func (c *Client) ListFileOperations(ctx context.Context) iter.Seq2[*FileOperation, error]
- func (c *Client) WaitForFileOperation(ctx context.Context, id string) (*FileOperation, error)
- type Config
- type ExportFormat
- type FileOperation
- type FileOperationError
- type FileOperationState
- type FileOperationType
- type Pagination
- type Policies
Constants ¶
View Source
const DefaultBaseURL = "https://app.getoutline.com"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
func (*Client) DeleteFileOperation ¶
DeleteFileOperation deletes a file operation.
func (*Client) DownloadFileExport ¶
DownloadFileExport downloads a file export.
func (*Client) GenerateExport ¶
func (c *Client) GenerateExport(ctx context.Context, format ExportFormat, includeAttachments bool) (*FileOperation, error)
GenerateExport generates an export of all collections. Note that it will likely be pending once returned, and you should poll until it's ready. See [WaitForFileOperation] and [GenerateExportAndWait] for more information.
func (*Client) GenerateExportAndWait ¶
func (c *Client) GenerateExportAndWait(ctx context.Context, format ExportFormat, includeAttachments bool) (*FileOperation, error)
GenerateExportAndWait generates an export of all collections and waits for it to complete.
func (*Client) GetFileOperation ¶
GetFileOperation fetches a specific file operation.
func (*Client) ListFileOperations ¶
ListFileOperations lists all file operations.
func (*Client) WaitForFileOperation ¶
WaitForFileOperation waits for a file operation to complete. Use a context to cancel the operation if it takes too long.
type ExportFormat ¶
type ExportFormat string
const ( ExportFormatMarkdown ExportFormat = "outline-markdown" ExportFormatHTML ExportFormat = "html" ExportFormatJSON ExportFormat = "json" )
type FileOperation ¶
type FileOperation struct { ID string `json:"id"` Name string `json:"name"` Type FileOperationType `json:"type"` Format ExportFormat `json:"format"` State FileOperationState `json:"state"` Error *FileOperationError `json:"error"` CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` }
type FileOperationError ¶
type FileOperationError struct { Data map[string]any `json:"data,omitempty"` Error string `json:"error,omitempty"` Message string `json:"message,omitempty"` Ok bool `json:"ok,omitempty"` Status float32 `json:"status,omitempty"` }
func (*FileOperationError) UnmarshalJSON ¶ added in v1.1.0
func (e *FileOperationError) UnmarshalJSON(data []byte) error
type FileOperationState ¶
type FileOperationState string
const ( FileOperationStateComplete FileOperationState = "complete" FileOperationStateCreating FileOperationState = "creating" FileOperationStateError FileOperationState = "error" FileOperationStateExpired FileOperationState = "expired" FileOperationStateUploading FileOperationState = "uploading" )
type FileOperationType ¶
type FileOperationType string
const ( FileOperationTypeExport FileOperationType = "export" FileOperationTypeImport FileOperationType = "import" )
type Pagination ¶
Click to show internal directories.
Click to hide internal directories.