Documentation
¶
Overview ¶
Package client provides a Go client SDK for the Flowbot server's web service API.
The client supports typed access to all major bot webservice endpoints including kanban, bookmark, user, search, dev, and server APIs.
Usage:
c := client.NewClient("http://localhost:6060", "your-access-token")
// List kanban tasks
tasks, err := c.Kanban.List(ctx, 1, kanboard.Active)
// Create a bookmark
bookmark, err := c.Bookmark.Create(ctx, "https://example.com")
Index ¶
- func IsNotFound(err error) bool
- func IsUnauthorized(err error) bool
- type APIError
- type AddTorrentRequest
- type AppHealthStatus
- type ArchiveResult
- type BookmarkClient
- func (b *BookmarkClient) Archive(ctx context.Context, id string) (*ArchiveResult, error)
- func (b *BookmarkClient) AttachTags(ctx context.Context, id string, tags []string) error
- func (b *BookmarkClient) CheckUrl(ctx context.Context, bookmarkURL string) (*CheckUrlResult, error)
- func (b *BookmarkClient) Create(ctx context.Context, bookmarkURL string) (*capability.Bookmark, error)
- func (b *BookmarkClient) DetachTags(ctx context.Context, id string, tags []string) error
- func (b *BookmarkClient) Get(ctx context.Context, id string) (*capability.Bookmark, error)
- func (b *BookmarkClient) List(ctx context.Context, query *ListBookmarksQuery) (*BookmarkListResult, error)
- func (b *BookmarkClient) Search(ctx context.Context, query *SearchBookmarksQuery) (*BookmarkListResult, error)
- type BookmarkItemResult
- type BookmarkListResult
- type BookmarkPage
- type BuildInfo
- type CapabilityHealth
- type CheckUrlResult
- type Client
- func (c *Client) AccessToken() string
- func (c *Client) BaseURL() string
- func (c *Client) DebugEnabled() bool
- func (c *Client) Delete(ctx context.Context, path string, body, result any) error
- func (c *Client) Get(ctx context.Context, path string, result any) error
- func (c *Client) Patch(ctx context.Context, path string, body, result any) error
- func (c *Client) Post(ctx context.Context, path string, body, result any) error
- func (c *Client) Put(ctx context.Context, path string, body, result any) error
- func (c *Client) RawRequest() *resty.Request
- func (c *Client) SetDebug(debug bool)
- func (c *Client) SetTimeout(timeout time.Duration)
- type CreateFeedRequest
- type CreateMemoRequest
- type CreateNoteRequest
- type CreateTransactionRequest
- type DevClient
- type DevopsClient
- func (d *DevopsClient) BeszelGetSystem(ctx context.Context, id string) (*capability.DevopsSystem, error)
- func (d *DevopsClient) BeszelListSystems(ctx context.Context) (*DevopsSystemsResult, error)
- func (d *DevopsClient) DozzleHealth(ctx context.Context) (*capability.DevopsDozzleInfo, error)
- func (d *DevopsClient) GrafanaHealth(ctx context.Context) (*capability.DevopsGrafanaHealth, error)
- func (d *DevopsClient) GrafanaListDatasources(ctx context.Context) (*DevopsDatasourcesResult, error)
- func (d *DevopsClient) GrafanaQuery(ctx context.Context, req DevopsGrafanaQueryRequest) (*capability.DevopsGrafanaQueryResult, error)
- func (d *DevopsClient) GrafanaSearchDashboards(ctx context.Context, query string) (*DevopsDashboardsResult, error)
- func (d *DevopsClient) NetalertxHealth(ctx context.Context) (bool, error)
- func (d *DevopsClient) NetalertxListDevices(ctx context.Context) (*DevopsNetalertxDevicesResult, error)
- func (d *DevopsClient) NetalertxSearchDevices(ctx context.Context, query string) (*DevopsNetalertxDevicesResult, error)
- func (d *DevopsClient) NetalertxTotals(ctx context.Context) (*capability.DevopsNetalertxTotals, error)
- func (d *DevopsClient) Status(ctx context.Context) (*capability.DevopsStatus, error)
- func (d *DevopsClient) TraefikListRouters(ctx context.Context) (*DevopsRoutersResult, error)
- func (d *DevopsClient) TraefikListServices(ctx context.Context) (*DevopsServicesResult, error)
- func (d *DevopsClient) TraefikOverview(ctx context.Context) (*capability.DevopsTraefikOverview, error)
- func (d *DevopsClient) UptimekumaHealth(ctx context.Context) (bool, error)
- func (d *DevopsClient) UptimekumaMetrics(ctx context.Context) (*DevopsMetricsResult, error)
- func (d *DevopsClient) WakapiListProjects(ctx context.Context) (*DevopsWakapiProjectsResult, error)
- func (d *DevopsClient) WakapiSummary(ctx context.Context, interval string) (*capability.DevopsWakapiSummary, error)
- type DevopsDashboardsResult
- type DevopsDatasourcesResult
- type DevopsDozzleInfoResult
- type DevopsGrafanaHealthResult
- type DevopsGrafanaQueryRequest
- type DevopsGrafanaQueryResult
- type DevopsHealthyResult
- type DevopsMetricsResult
- type DevopsNetalertxDevicesResult
- type DevopsNetalertxSearchRequest
- type DevopsNetalertxTotalsResult
- type DevopsRoutersResult
- type DevopsServicesResult
- type DevopsStatusResult
- type DevopsSystemResult
- type DevopsSystemsResult
- type DevopsTraefikOverviewResult
- type DevopsWakapiProjectsResult
- type DevopsWakapiSummaryResult
- type ExampleData
- type FileContentQuery
- type FinanceAboutResult
- type FinanceHealthResult
- type FinanceUserResult
- type FireflyiiiClient
- func (f *FireflyiiiClient) About(ctx context.Context) (*capability.FinanceAbout, error)
- func (f *FireflyiiiClient) CreateTransaction(ctx context.Context, req *CreateTransactionRequest) (*capability.Transaction, error)
- func (f *FireflyiiiClient) CurrentUser(ctx context.Context) (*capability.FinanceUser, error)
- func (f *FireflyiiiClient) Health(ctx context.Context) (bool, error)
- type ForgeClient
- func (f *ForgeClient) GetCommitDiff(ctx context.Context, owner, repo, commitID string) (*capability.ForgeCommitDiff, error)
- func (f *ForgeClient) GetFileContent(ctx context.Context, owner, repo, commitID, filePath string, ...) (string, error)
- func (f *ForgeClient) GetIssue(ctx context.Context, owner, repo string, index int64) (*capability.ForgeIssue, error)
- func (f *ForgeClient) GetRepo(ctx context.Context, owner, repo string) (*capability.ForgeRepo, error)
- func (f *ForgeClient) GetUser(ctx context.Context) (*capability.ForgeUser, error)
- func (f *ForgeClient) ListIssues(ctx context.Context, owner string, query *ListIssuesQuery) ([]*capability.ForgeIssue, error)
- type GC
- type GetFeedEntriesQuery
- type GetSubtaskTimeSpentResult
- type GithubClient
- func (g *GithubClient) GetCommitDiff(ctx context.Context, owner, repo, commitID string) (*capability.ForgeCommitDiff, error)
- func (g *GithubClient) GetFileContent(ctx context.Context, owner, repo, commitID, filePath string, ...) (string, error)
- func (g *GithubClient) GetIssue(ctx context.Context, owner, repo string, number int64) (*capability.ForgeIssue, error)
- func (g *GithubClient) GetRepo(ctx context.Context, owner, repo string) (*capability.ForgeRepo, error)
- func (g *GithubClient) GetUser(ctx context.Context) (*capability.ForgeUser, error)
- func (g *GithubClient) GetUserByLogin(ctx context.Context, login string) (*capability.ForgeUser, error)
- func (g *GithubClient) ListIssues(ctx context.Context, owner string, query *ListIssuesQuery) ([]*capability.ForgeIssue, error)
- func (g *GithubClient) ListNotifications(ctx context.Context, query *ListNotificationsQuery) ([]*capability.Notification, error)
- func (g *GithubClient) ListReleases(ctx context.Context, owner, repo string, query *ListNotificationsQuery) ([]*capability.Release, error)
- type HasSubtaskTimerResult
- type HubApp
- type HubAppStatus
- type HubCapability
- type HubClient
- func (h *HubClient) GetApp(ctx context.Context, name string) (*HubApp, error)
- func (h *HubClient) GetAppLogs(ctx context.Context, name string, tail int) (*HubAppStatus, error)
- func (h *HubClient) GetAppStatus(ctx context.Context, name string) (*HubAppStatus, error)
- func (h *HubClient) GetCapability(ctx context.Context, capType string) (*HubCapability, error)
- func (h *HubClient) GetHealth(ctx context.Context) (*HubHealth, error)
- func (h *HubClient) ListApps(ctx context.Context) ([]HubApp, error)
- func (h *HubClient) ListCapabilities(ctx context.Context) ([]HubCapability, error)
- func (h *HubClient) RestartApp(ctx context.Context, name string) (map[string]any, error)
- func (h *HubClient) StartApp(ctx context.Context, name string) (map[string]any, error)
- func (h *HubClient) StopApp(ctx context.Context, name string) (map[string]any, error)
- type HubHealth
- type KanbanClient
- func (k *KanbanClient) Close(ctx context.Context, id int) (*KanbanUpdateResult, error)
- func (k *KanbanClient) Create(ctx context.Context, req KanbanCreateRequest) (*capability.Task, error)
- func (k *KanbanClient) CreateSubtask(ctx context.Context, taskID int, req KanbanCreateSubtaskRequest) (*KanbanCreateSubtaskResult, error)
- func (k *KanbanClient) CreateTag(ctx context.Context, req KanbanCreateTagRequest) (*KanbanCreateTagResult, error)
- func (k *KanbanClient) Get(ctx context.Context, id int) (*capability.Task, error)
- func (k *KanbanClient) GetMetadata(ctx context.Context, taskID int) ([]kanboard.TaskMetadata, error)
- func (k *KanbanClient) GetMetadataByName(ctx context.Context, taskID int, name string) (string, error)
- func (k *KanbanClient) GetSubtask(ctx context.Context, taskID, subtaskID int) (*kanboard.Subtask, error)
- func (k *KanbanClient) GetSubtaskTimeSpent(ctx context.Context, taskID, subtaskID, userID int) (*GetSubtaskTimeSpentResult, error)
- func (k *KanbanClient) GetTaskTags(ctx context.Context, taskID int) (map[string]string, error)
- func (k *KanbanClient) HasSubtaskTimer(ctx context.Context, taskID, subtaskID, userID int) (*HasSubtaskTimerResult, error)
- func (k *KanbanClient) List(ctx context.Context, projectID int, status kanboard.StatusId) ([]*capability.Task, error)
- func (k *KanbanClient) ListAll(ctx context.Context, projectID int) ([]*capability.Task, error)
- func (k *KanbanClient) ListColumns(ctx context.Context, projectID int) ([]KanbanColumn, error)
- func (k *KanbanClient) ListSubtasks(ctx context.Context, taskID int) ([]kanboard.Subtask, error)
- func (k *KanbanClient) ListTags(ctx context.Context) ([]KanbanTag, error)
- func (k *KanbanClient) ListTagsByProject(ctx context.Context, projectID int) ([]KanbanTag, error)
- func (k *KanbanClient) Move(ctx context.Context, id int, req KanbanMoveRequest) (*capability.Task, error)
- func (k *KanbanClient) RemoveMetadata(ctx context.Context, taskID int, name string) (*KanbanRemoveMetadataResult, error)
- func (k *KanbanClient) RemoveSubtask(ctx context.Context, taskID, subtaskID int) (*KanbanRemoveSubtaskResult, error)
- func (k *KanbanClient) RemoveTag(ctx context.Context, id int) (*KanbanRemoveTagResult, error)
- func (k *KanbanClient) SaveMetadata(ctx context.Context, taskID int, values kanboard.TaskMetadata) (*KanbanSaveMetadataResult, error)
- func (k *KanbanClient) Search(ctx context.Context, projectID int, query string) ([]*capability.Task, error)
- func (k *KanbanClient) SetSubtaskEndTime(ctx context.Context, taskID, subtaskID, userID int) (*SetSubtaskEndTimeResult, error)
- func (k *KanbanClient) SetSubtaskStartTime(ctx context.Context, taskID, subtaskID, userID int) (*SetSubtaskStartTimeResult, error)
- func (k *KanbanClient) SetTaskTags(ctx context.Context, taskID int, req KanbanSetTaskTagsRequest) (*KanbanSetTaskTagsResult, error)
- func (k *KanbanClient) Update(ctx context.Context, id int, req KanbanUpdateRequest) (*capability.Task, error)
- func (k *KanbanClient) UpdateSubtask(ctx context.Context, taskID, subtaskID int, req KanbanUpdateSubtaskRequest) (*KanbanUpdateSubtaskResult, error)
- func (k *KanbanClient) UpdateTag(ctx context.Context, id int, req KanbanUpdateTagRequest) (*KanbanUpdateTagResult, error)
- type KanbanColumn
- type KanbanCreateRequest
- type KanbanCreateSubtaskRequest
- type KanbanCreateSubtaskResult
- type KanbanCreateTagRequest
- type KanbanCreateTagResult
- type KanbanGetMetadataByNameResult
- type KanbanGetMetadataResult
- type KanbanGetTaskTagsResult
- type KanbanMoveRequest
- type KanbanRemoveMetadataResult
- type KanbanRemoveSubtaskResult
- type KanbanRemoveTagResult
- type KanbanSaveMetadataRequest
- type KanbanSaveMetadataResult
- type KanbanSetTaskTagsRequest
- type KanbanSetTaskTagsResult
- type KanbanTag
- type KanbanUpdateRequest
- type KanbanUpdateResult
- type KanbanUpdateSubtaskRequest
- type KanbanUpdateSubtaskResult
- type KanbanUpdateTagRequest
- type KanbanUpdateTagResult
- type ListBookmarksQuery
- type ListEntriesQuery
- type ListIssuesQuery
- type ListMemosQuery
- type ListNotesQuery
- type ListNotificationsQuery
- type MemoClient
- func (m *MemoClient) Create(ctx context.Context, content, visibility string) (*capability.Memo, error)
- func (m *MemoClient) Delete(ctx context.Context, name string) error
- func (m *MemoClient) Get(ctx context.Context, name string) (*capability.Memo, error)
- func (m *MemoClient) Health(ctx context.Context) (bool, error)
- func (m *MemoClient) List(ctx context.Context, query *ListMemosQuery) (*MemoListResult, error)
- func (m *MemoClient) Update(ctx context.Context, name string, req *UpdateMemoRequest) (*capability.Memo, error)
- type MemoHealthResult
- type MemoItemResult
- type MemoListResult
- type MemoPage
- type Memory
- type MetricsResult
- type NocoBasesResult
- type NocoCreateRecordRequest
- type NocoDeleteRecordRequest
- type NocoDeleteResult
- type NocoHealthResult
- type NocoListRecordsQuery
- type NocoRecordResult
- type NocoRecordsResult
- type NocoTableResult
- type NocoTablesResult
- type NocoUpdateRecordRequest
- type NocodbClient
- func (n *NocodbClient) CreateRecord(ctx context.Context, tableID string, fields map[string]any) (*capability.NocoRecord, error)
- func (n *NocodbClient) DeleteRecord(ctx context.Context, tableID, recordID string) error
- func (n *NocodbClient) GetRecord(ctx context.Context, tableID, recordID string) (*capability.NocoRecord, error)
- func (n *NocodbClient) GetTable(ctx context.Context, tableID string) (*capability.NocoTable, error)
- func (n *NocodbClient) Health(ctx context.Context) (bool, error)
- func (n *NocodbClient) ListBases(ctx context.Context) (*NocoBasesResult, error)
- func (n *NocodbClient) ListRecords(ctx context.Context, tableID string, q NocoListRecordsQuery) (*NocoRecordsResult, error)
- func (n *NocodbClient) ListTables(ctx context.Context, baseID string) (*NocoTablesResult, error)
- func (n *NocodbClient) UpdateRecord(ctx context.Context, tableID, recordID string, fields map[string]any) (*capability.NocoRecord, error)
- type NoteContentResult
- type NoteItemResult
- type NoteListResult
- type NotePage
- type PipelineClient
- type PipelineInfo
- type PipelineInfoStep
- type PipelineInfoTrigger
- type PipelineListResult
- type PipelineRunResult
- type Process
- type ReaderClient
- func (r *ReaderClient) CreateFeed(ctx context.Context, req *CreateFeedRequest) (*capability.Feed, error)
- func (r *ReaderClient) GetFeed(ctx context.Context, id int64) (*capability.Feed, error)
- func (r *ReaderClient) GetFeedEntries(ctx context.Context, feedID int64, query *GetFeedEntriesQuery) ([]*capability.Entry, error)
- func (r *ReaderClient) ListEntries(ctx context.Context, query *ListEntriesQuery) ([]*capability.Entry, error)
- func (r *ReaderClient) ListFeeds(ctx context.Context) ([]*capability.Feed, error)
- func (r *ReaderClient) UpdateEntriesStatus(ctx context.Context, req *UpdateEntriesRequest) (*UpdateEntriesResult, error)
- type Runtime
- type RuntimeMemory
- type SearchBookmarksQuery
- type SearchClient
- type SearchNotesQuery
- type SearchResult
- type ServerClient
- func (s *ServerClient) Stacktrace(ctx context.Context) (*StacktraceResult, error)
- func (s *ServerClient) Upload(ctx context.Context, files map[string]io.Reader, filenames map[string]string) (*UploadResult, error)
- func (s *ServerClient) UploadMultipart(ctx context.Context, writer *multipart.Writer, body io.Reader) (*UploadResult, error)
- type SetSubtaskEndTimeResult
- type SetSubtaskStartTimeResult
- type StacktraceResult
- type TorrentItemResult
- type TorrentListResult
- type TorrentsActionRequest
- type TorrentsActionResult
- type TransactionItemResult
- type TransmissionClient
- func (t *TransmissionClient) AddTorrent(ctx context.Context, req *AddTorrentRequest) (*capability.Torrent, error)
- func (t *TransmissionClient) Health(ctx context.Context) (bool, error)
- func (t *TransmissionClient) ListTorrents(ctx context.Context) ([]*capability.Torrent, error)
- func (t *TransmissionClient) RemoveTorrents(ctx context.Context, ids []int64) error
- func (t *TransmissionClient) StopTorrents(ctx context.Context, ids []int64) error
- type TransmissionHealthResult
- type TriliumClient
- func (t *TriliumClient) Create(ctx context.Context, req *CreateNoteRequest) (*capability.Note, error)
- func (t *TriliumClient) Delete(ctx context.Context, id string) error
- func (t *TriliumClient) Get(ctx context.Context, id string) (*capability.Note, error)
- func (t *TriliumClient) GetContent(ctx context.Context, id string) (string, error)
- func (t *TriliumClient) Health(ctx context.Context) (*capability.Note, error)
- func (t *TriliumClient) List(ctx context.Context, query *ListNotesQuery) (*NoteListResult, error)
- func (t *TriliumClient) Search(ctx context.Context, query *SearchNotesQuery) (*NoteListResult, error)
- func (t *TriliumClient) SetContent(ctx context.Context, id, content string) error
- func (t *TriliumClient) Update(ctx context.Context, id string, req *UpdateNoteRequest) (*capability.Note, error)
- type UpdateEntriesRequest
- type UpdateEntriesResult
- type UpdateMemoRequest
- type UpdateNoteRequest
- type UploadResult
- type UserClient
- func (u *UserClient) BookmarkList(ctx context.Context) ([]karakeep.Bookmark, error)
- func (u *UserClient) Dashboard(ctx context.Context) (types.KV, error)
- func (u *UserClient) KanbanList(ctx context.Context) ([]kanboard.Task, error)
- func (u *UserClient) Metrics(ctx context.Context) (*MetricsResult, error)
- type WorkflowClient
- type WorkflowRunResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsNotFound ¶
IsNotFound returns true if the error indicates a resource was not found.
func IsUnauthorized ¶
IsUnauthorized returns true if the error indicates unauthorized access.
Types ¶
type AddTorrentRequest ¶ added in v0.97.8
type AddTorrentRequest struct {
URL string `json:"url"`
}
AddTorrentRequest is the request body for adding a torrent.
type AppHealthStatus ¶
type AppHealthStatus struct {
Name string `json:"name"`
Status string `json:"status"`
Health string `json:"health"`
}
AppHealthStatus represents a homelab app's health.
type ArchiveResult ¶
type ArchiveResult struct {
Archived bool `json:"archived"`
}
ArchiveResult contains the result of archiving a bookmark.
type BookmarkClient ¶
type BookmarkClient struct {
// contains filtered or unexported fields
}
BookmarkClient provides access to the bookmark API.
func (*BookmarkClient) Archive ¶
func (b *BookmarkClient) Archive(ctx context.Context, id string) (*ArchiveResult, error)
Archive archives (or unarchives) a bookmark.
func (*BookmarkClient) AttachTags ¶
AttachTags attaches tags to a bookmark.
func (*BookmarkClient) CheckUrl ¶
func (b *BookmarkClient) CheckUrl(ctx context.Context, bookmarkURL string) (*CheckUrlResult, error)
CheckUrl checks if a URL is already bookmarked.
func (*BookmarkClient) Create ¶
func (b *BookmarkClient) Create(ctx context.Context, bookmarkURL string) (*capability.Bookmark, error)
Create creates a new bookmark from a URL.
func (*BookmarkClient) DetachTags ¶
DetachTags detaches tags from a bookmark.
func (*BookmarkClient) Get ¶
func (b *BookmarkClient) Get(ctx context.Context, id string) (*capability.Bookmark, error)
Get returns a single bookmark by ID.
func (*BookmarkClient) List ¶
func (b *BookmarkClient) List(ctx context.Context, query *ListBookmarksQuery) (*BookmarkListResult, error)
List returns all bookmarks with optional filtering.
func (*BookmarkClient) Search ¶
func (b *BookmarkClient) Search(ctx context.Context, query *SearchBookmarksQuery) (*BookmarkListResult, error)
Search searches bookmarks with the given query.
type BookmarkItemResult ¶ added in v0.97.8
type BookmarkItemResult struct {
Item capability.Bookmark `json:"data"`
}
BookmarkItemResult holds a single bookmark extracted from InvokeResult.
type BookmarkListResult ¶ added in v0.97.8
type BookmarkListResult struct {
Items []*capability.Bookmark `json:"data"`
Page BookmarkPage `json:"page"`
}
BookmarkListResult holds the paginated list response extracted from InvokeResult.
type BookmarkPage ¶ added in v0.97.8
type BookmarkPage struct {
Limit int `json:"limit"`
HasMore bool `json:"has_more"`
NextCursor string `json:"next_cursor,omitzero"`
}
BookmarkPage holds pagination metadata.
type BuildInfo ¶
type BuildInfo struct {
GoVersion string `json:"go_version"`
MainModule string `json:"main_module"`
MainVersion string `json:"main_version,omitempty"`
Settings types.KV `json:"settings"`
}
BuildInfo contains build information.
type CapabilityHealth ¶
type CapabilityHealth struct {
Capability string `json:"capability"`
App string `json:"app"`
Status string `json:"status"`
Description string `json:"description,omitempty"`
}
CapabilityHealth represents a single capability's health.
type CheckUrlResult ¶
CheckUrlResult contains the result of checking if a URL exists.
type Client ¶
type Client struct {
// Resource clients
Kanban *KanbanClient
Bookmark *BookmarkClient
Reader *ReaderClient
User *UserClient
Search *SearchClient
Dev *DevClient
Server *ServerClient
Hub *HubClient
Pipeline *PipelineClient
Workflow *WorkflowClient
Forge *ForgeClient
Github *GithubClient
Memo *MemoClient
Trilium *TriliumClient
Fireflyiii *FireflyiiiClient
Transmission *TransmissionClient
Nocodb *NocodbClient
Devops *DevopsClient
// contains filtered or unexported fields
}
Client is the main client for the Flowbot API.
func NewClient ¶
NewClient creates a new client with the given server URL and access token. The token is sent as the X-AccessToken header for authentication.
func (*Client) AccessToken ¶ added in v0.97.8
AccessToken returns the access token used for API authentication.
func (*Client) DebugEnabled ¶ added in v0.93.0
DebugEnabled reports whether verbose HTTP request/response logging is active.
func (*Client) Delete ¶
Delete performs a DELETE request with the given body and unmarshals the response data into result.
func (*Client) Patch ¶
Patch performs a PATCH request with the given body and unmarshals the response data into result.
func (*Client) Post ¶
Post performs a POST request with the given body and unmarshals the response data into result.
func (*Client) Put ¶
Put performs a PUT request with the given body and unmarshals the response data into result.
func (*Client) RawRequest ¶
RawRequest returns a resty request builder for custom requests. Use this when you need full control over the request.
func (*Client) SetDebug ¶
SetDebug enables or disables debug mode for the underlying HTTP client. Debug mode prints full HTTP request and response details to stderr. An OnError hook is also registered to print request info on connection failures.
func (*Client) SetTimeout ¶
SetTimeout sets the request timeout for the client.
type CreateFeedRequest ¶
type CreateFeedRequest struct {
FeedURL string `json:"feed_url"`
CategoryID int64 `json:"category_id"`
}
CreateFeedRequest contains parameters for creating a feed.
type CreateMemoRequest ¶
type CreateMemoRequest struct {
Content string `json:"content"`
Visibility string `json:"visibility,omitempty"`
}
CreateMemoRequest is the request body for creating a memo.
type CreateNoteRequest ¶ added in v0.97.8
type CreateNoteRequest struct {
Title string `json:"title"`
Content string `json:"content,omitempty"`
Type string `json:"type,omitempty"`
ParentNoteID string `json:"parent_note_id,omitempty"`
}
CreateNoteRequest is the request body for creating a note.
type CreateTransactionRequest ¶ added in v0.97.8
type CreateTransactionRequest struct {
Type string `json:"type"`
Date string `json:"date"`
Amount string `json:"amount"`
Description string `json:"description"`
SourceID string `json:"source_id,omitempty"`
SourceName string `json:"source_name,omitempty"`
DestinationID string `json:"destination_id,omitempty"`
DestinationName string `json:"destination_name,omitempty"`
CategoryName string `json:"category_name,omitempty"`
Notes string `json:"notes,omitempty"`
}
CreateTransactionRequest is the request body for creating a transaction.
type DevClient ¶
type DevClient struct {
// contains filtered or unexported fields
}
DevClient provides access to the dev API.
type DevopsClient ¶ added in v0.97.8
type DevopsClient struct {
// contains filtered or unexported fields
}
DevopsClient provides access to the devops aggregator capability API.
func (*DevopsClient) BeszelGetSystem ¶ added in v0.97.8
func (d *DevopsClient) BeszelGetSystem(ctx context.Context, id string) (*capability.DevopsSystem, error)
BeszelGetSystem returns one Beszel system.
func (*DevopsClient) BeszelListSystems ¶ added in v0.97.8
func (d *DevopsClient) BeszelListSystems(ctx context.Context) (*DevopsSystemsResult, error)
BeszelListSystems lists Beszel systems.
func (*DevopsClient) DozzleHealth ¶ added in v0.97.8
func (d *DevopsClient) DozzleHealth(ctx context.Context) (*capability.DevopsDozzleInfo, error)
DozzleHealth returns Dozzle health and version.
func (*DevopsClient) GrafanaHealth ¶ added in v0.97.8
func (d *DevopsClient) GrafanaHealth(ctx context.Context) (*capability.DevopsGrafanaHealth, error)
GrafanaHealth returns Grafana health.
func (*DevopsClient) GrafanaListDatasources ¶ added in v0.97.8
func (d *DevopsClient) GrafanaListDatasources(ctx context.Context) (*DevopsDatasourcesResult, error)
GrafanaListDatasources lists Grafana datasources.
func (*DevopsClient) GrafanaQuery ¶ added in v0.97.8
func (d *DevopsClient) GrafanaQuery(ctx context.Context, req DevopsGrafanaQueryRequest) (*capability.DevopsGrafanaQueryResult, error)
GrafanaQuery runs a query against prometheus/alloy/loki/tempo/pyroscope via Grafana.
func (*DevopsClient) GrafanaSearchDashboards ¶ added in v0.97.8
func (d *DevopsClient) GrafanaSearchDashboards(ctx context.Context, query string) (*DevopsDashboardsResult, error)
GrafanaSearchDashboards searches Grafana dashboards.
func (*DevopsClient) NetalertxHealth ¶ added in v0.97.8
func (d *DevopsClient) NetalertxHealth(ctx context.Context) (bool, error)
NetalertxHealth checks NetAlertX reachability.
func (*DevopsClient) NetalertxListDevices ¶ added in v0.97.8
func (d *DevopsClient) NetalertxListDevices(ctx context.Context) (*DevopsNetalertxDevicesResult, error)
NetalertxListDevices lists NetAlertX devices.
func (*DevopsClient) NetalertxSearchDevices ¶ added in v0.97.8
func (d *DevopsClient) NetalertxSearchDevices(ctx context.Context, query string) (*DevopsNetalertxDevicesResult, error)
NetalertxSearchDevices searches NetAlertX devices.
func (*DevopsClient) NetalertxTotals ¶ added in v0.97.8
func (d *DevopsClient) NetalertxTotals(ctx context.Context) (*capability.DevopsNetalertxTotals, error)
NetalertxTotals returns NetAlertX device category counts.
func (*DevopsClient) Status ¶ added in v0.97.8
func (d *DevopsClient) Status(ctx context.Context) (*capability.DevopsStatus, error)
Status returns which devops backends are configured.
func (*DevopsClient) TraefikListRouters ¶ added in v0.97.8
func (d *DevopsClient) TraefikListRouters(ctx context.Context) (*DevopsRoutersResult, error)
TraefikListRouters lists Traefik HTTP routers.
func (*DevopsClient) TraefikListServices ¶ added in v0.97.8
func (d *DevopsClient) TraefikListServices(ctx context.Context) (*DevopsServicesResult, error)
TraefikListServices lists Traefik HTTP services.
func (*DevopsClient) TraefikOverview ¶ added in v0.97.8
func (d *DevopsClient) TraefikOverview(ctx context.Context) (*capability.DevopsTraefikOverview, error)
TraefikOverview returns Traefik overview counts.
func (*DevopsClient) UptimekumaHealth ¶ added in v0.97.8
func (d *DevopsClient) UptimekumaHealth(ctx context.Context) (bool, error)
UptimekumaHealth checks Uptime Kuma reachability.
func (*DevopsClient) UptimekumaMetrics ¶ added in v0.97.8
func (d *DevopsClient) UptimekumaMetrics(ctx context.Context) (*DevopsMetricsResult, error)
UptimekumaMetrics returns Uptime Kuma metric family summaries.
func (*DevopsClient) WakapiListProjects ¶ added in v0.97.8
func (d *DevopsClient) WakapiListProjects(ctx context.Context) (*DevopsWakapiProjectsResult, error)
WakapiListProjects lists Wakapi projects.
func (*DevopsClient) WakapiSummary ¶ added in v0.97.8
func (d *DevopsClient) WakapiSummary(ctx context.Context, interval string) (*capability.DevopsWakapiSummary, error)
WakapiSummary returns a coding-stats summary.
type DevopsDashboardsResult ¶ added in v0.97.8
type DevopsDashboardsResult struct {
Items []*capability.DevopsDashboard `json:"data"`
Page *capability.PageInfo `json:"page"`
}
DevopsDashboardsResult holds Grafana dashboards from InvokeResult.
type DevopsDatasourcesResult ¶ added in v0.97.8
type DevopsDatasourcesResult struct {
Items []*capability.DevopsDatasource `json:"data"`
Page *capability.PageInfo `json:"page"`
}
DevopsDatasourcesResult holds Grafana datasources from InvokeResult.
type DevopsDozzleInfoResult ¶ added in v0.97.8
type DevopsDozzleInfoResult struct {
Info capability.DevopsDozzleInfo `json:"data"`
}
DevopsDozzleInfoResult holds Dozzle health info from InvokeResult.
type DevopsGrafanaHealthResult ¶ added in v0.97.8
type DevopsGrafanaHealthResult struct {
Health capability.DevopsGrafanaHealth `json:"data"`
}
DevopsGrafanaHealthResult holds Grafana health from InvokeResult.
type DevopsGrafanaQueryRequest ¶ added in v0.97.8
type DevopsGrafanaQueryRequest struct {
Backend string `json:"backend"`
Expr string `json:"expr"`
DatasourceUID string `json:"datasource_uid,omitzero"`
From string `json:"from,omitzero"`
To string `json:"to,omitzero"`
MaxLines int `json:"max_lines,omitzero"`
}
DevopsGrafanaQueryRequest is the request body for Grafana datasource queries.
type DevopsGrafanaQueryResult ¶ added in v0.97.8
type DevopsGrafanaQueryResult struct {
Result capability.DevopsGrafanaQueryResult `json:"data"`
}
DevopsGrafanaQueryResult holds a Grafana query result from InvokeResult.
type DevopsHealthyResult ¶ added in v0.97.8
DevopsHealthyResult holds a simple healthy flag from InvokeResult.
type DevopsMetricsResult ¶ added in v0.97.8
type DevopsMetricsResult struct {
Items []*capability.DevopsMetricFamily `json:"data"`
Page *capability.PageInfo `json:"page"`
}
DevopsMetricsResult holds Uptime Kuma metric family summaries.
type DevopsNetalertxDevicesResult ¶ added in v0.97.8
type DevopsNetalertxDevicesResult struct {
Items []*capability.DevopsNetalertxDevice `json:"data"`
Page *capability.PageInfo `json:"page"`
}
DevopsNetalertxDevicesResult holds NetAlertX devices from InvokeResult.
type DevopsNetalertxSearchRequest ¶ added in v0.97.8
type DevopsNetalertxSearchRequest struct {
Query string `json:"query"`
}
DevopsNetalertxSearchRequest is the request body for NetAlertX device search.
type DevopsNetalertxTotalsResult ¶ added in v0.97.8
type DevopsNetalertxTotalsResult struct {
Totals capability.DevopsNetalertxTotals `json:"data"`
}
DevopsNetalertxTotalsResult holds NetAlertX totals from InvokeResult.
type DevopsRoutersResult ¶ added in v0.97.8
type DevopsRoutersResult struct {
Items []*capability.DevopsRouter `json:"data"`
Page *capability.PageInfo `json:"page"`
}
DevopsRoutersResult holds Traefik routers from InvokeResult.
type DevopsServicesResult ¶ added in v0.97.8
type DevopsServicesResult struct {
Items []*capability.DevopsService `json:"data"`
Page *capability.PageInfo `json:"page"`
}
DevopsServicesResult holds Traefik services from InvokeResult.
type DevopsStatusResult ¶ added in v0.97.8
type DevopsStatusResult struct {
Status capability.DevopsStatus `json:"data"`
}
DevopsStatusResult holds status extracted from InvokeResult.
type DevopsSystemResult ¶ added in v0.97.8
type DevopsSystemResult struct {
Item capability.DevopsSystem `json:"data"`
}
DevopsSystemResult holds a single Beszel system from InvokeResult.
type DevopsSystemsResult ¶ added in v0.97.8
type DevopsSystemsResult struct {
Items []*capability.DevopsSystem `json:"data"`
Page *capability.PageInfo `json:"page"`
}
DevopsSystemsResult holds Beszel systems from InvokeResult.
type DevopsTraefikOverviewResult ¶ added in v0.97.8
type DevopsTraefikOverviewResult struct {
Overview capability.DevopsTraefikOverview `json:"data"`
}
DevopsTraefikOverviewResult holds Traefik overview from InvokeResult.
type DevopsWakapiProjectsResult ¶ added in v0.97.8
type DevopsWakapiProjectsResult struct {
Items []*capability.DevopsWakapiProject `json:"data"`
Page *capability.PageInfo `json:"page"`
}
DevopsWakapiProjectsResult holds Wakapi projects from InvokeResult.
type DevopsWakapiSummaryResult ¶ added in v0.97.8
type DevopsWakapiSummaryResult struct {
Summary capability.DevopsWakapiSummary `json:"data"`
}
DevopsWakapiSummaryResult holds Wakapi summary from InvokeResult.
type ExampleData ¶
type ExampleData struct {
Title string `json:"title"`
CPU string `json:"cpu"`
Mem string `json:"mem"`
Disk string `json:"disk"`
}
ExampleData represents example data from the dev endpoint.
type FileContentQuery ¶
FileContentQuery contains optional query parameters for retrieving file content.
type FinanceAboutResult ¶ added in v0.97.8
type FinanceAboutResult struct {
Item capability.FinanceAbout `json:"data"`
}
FinanceAboutResult holds about info extracted from InvokeResult.
type FinanceHealthResult ¶ added in v0.97.8
type FinanceHealthResult struct {
Healthy bool `json:"data"`
}
FinanceHealthResult holds the health check result extracted from InvokeResult.
type FinanceUserResult ¶ added in v0.97.8
type FinanceUserResult struct {
Item capability.FinanceUser `json:"data"`
}
FinanceUserResult holds user info extracted from InvokeResult.
type FireflyiiiClient ¶ added in v0.97.8
type FireflyiiiClient struct {
// contains filtered or unexported fields
}
FireflyiiiClient provides access to the Firefly III finance API.
func (*FireflyiiiClient) About ¶ added in v0.97.8
func (f *FireflyiiiClient) About(ctx context.Context) (*capability.FinanceAbout, error)
About returns Firefly III instance metadata.
func (*FireflyiiiClient) CreateTransaction ¶ added in v0.97.8
func (f *FireflyiiiClient) CreateTransaction(ctx context.Context, req *CreateTransactionRequest) (*capability.Transaction, error)
CreateTransaction creates a new finance transaction.
func (*FireflyiiiClient) CurrentUser ¶ added in v0.97.8
func (f *FireflyiiiClient) CurrentUser(ctx context.Context) (*capability.FinanceUser, error)
CurrentUser returns the authenticated Firefly III user.
type ForgeClient ¶
type ForgeClient struct {
// contains filtered or unexported fields
}
ForgeClient provides access to the forge API.
func (*ForgeClient) GetCommitDiff ¶
func (f *ForgeClient) GetCommitDiff(ctx context.Context, owner, repo, commitID string) (*capability.ForgeCommitDiff, error)
GetCommitDiff returns the diff for a specific commit.
func (*ForgeClient) GetFileContent ¶
func (f *ForgeClient) GetFileContent(ctx context.Context, owner, repo, commitID, filePath string, query *FileContentQuery) (string, error)
GetFileContent returns the content of a file at a specific commit.
func (*ForgeClient) GetIssue ¶
func (f *ForgeClient) GetIssue(ctx context.Context, owner, repo string, index int64) (*capability.ForgeIssue, error)
GetIssue returns a single issue by owner, repo, and issue index.
func (*ForgeClient) GetRepo ¶
func (f *ForgeClient) GetRepo(ctx context.Context, owner, repo string) (*capability.ForgeRepo, error)
GetRepo returns a repository by owner and repo name.
func (*ForgeClient) GetUser ¶
func (f *ForgeClient) GetUser(ctx context.Context) (*capability.ForgeUser, error)
GetUser returns the authenticated forge user.
func (*ForgeClient) ListIssues ¶
func (f *ForgeClient) ListIssues(ctx context.Context, owner string, query *ListIssuesQuery) ([]*capability.ForgeIssue, error)
ListIssues returns issues for an owner with optional filtering.
type GC ¶
type GC struct {
NumGC uint32 `json:"num_gc"`
PauseTotalNs uint64 `json:"pause_total_ns"`
LastGC string `json:"last_gc"`
}
GC contains garbage collection statistics.
type GetFeedEntriesQuery ¶
GetFeedEntriesQuery contains query parameters for getting feed entries.
type GetSubtaskTimeSpentResult ¶
type GetSubtaskTimeSpentResult struct {
Result float64 `json:"result"`
}
GetSubtaskTimeSpentResult contains the result of getting time spent on a subtask.
type GithubClient ¶
type GithubClient struct {
// contains filtered or unexported fields
}
GithubClient provides access to the github API.
func (*GithubClient) GetCommitDiff ¶
func (g *GithubClient) GetCommitDiff(ctx context.Context, owner, repo, commitID string) (*capability.ForgeCommitDiff, error)
GetCommitDiff returns the diff for a specific commit.
func (*GithubClient) GetFileContent ¶
func (g *GithubClient) GetFileContent(ctx context.Context, owner, repo, commitID, filePath string, query *FileContentQuery) (string, error)
GetFileContent returns the content of a file at a specific commit.
func (*GithubClient) GetIssue ¶
func (g *GithubClient) GetIssue(ctx context.Context, owner, repo string, number int64) (*capability.ForgeIssue, error)
GetIssue returns a single issue by owner, repo, and issue number.
func (*GithubClient) GetRepo ¶
func (g *GithubClient) GetRepo(ctx context.Context, owner, repo string) (*capability.ForgeRepo, error)
GetRepo returns a repository by owner and repo name.
func (*GithubClient) GetUser ¶
func (g *GithubClient) GetUser(ctx context.Context) (*capability.ForgeUser, error)
GetUser returns the authenticated github user.
func (*GithubClient) GetUserByLogin ¶
func (g *GithubClient) GetUserByLogin(ctx context.Context, login string) (*capability.ForgeUser, error)
GetUserByLogin returns a github user by login name.
func (*GithubClient) ListIssues ¶
func (g *GithubClient) ListIssues(ctx context.Context, owner string, query *ListIssuesQuery) ([]*capability.ForgeIssue, error)
ListIssues returns issues for an owner with optional filtering.
func (*GithubClient) ListNotifications ¶
func (g *GithubClient) ListNotifications(ctx context.Context, query *ListNotificationsQuery) ([]*capability.Notification, error)
ListNotifications returns the authenticated user's notifications.
func (*GithubClient) ListReleases ¶
func (g *GithubClient) ListReleases(ctx context.Context, owner, repo string, query *ListNotificationsQuery) ([]*capability.Release, error)
ListReleases returns releases for a repository.
type HasSubtaskTimerResult ¶
type HasSubtaskTimerResult struct {
Result bool `json:"result"`
}
HasSubtaskTimerResult contains the result of checking if a subtask timer is active.
type HubApp ¶
type HubApp struct {
Name string `json:"name"`
Path string `json:"path"`
Status string `json:"status"`
Health string `json:"health"`
Labels map[string]any `json:"labels,omitempty"`
}
HubApp represents a homelab app returned by the hub API.
type HubAppStatus ¶
type HubAppStatus struct {
Name string `json:"name"`
Status string `json:"status"`
Logs []string `json:"logs,omitempty"`
}
HubAppStatus represents the status of a homelab app.
type HubCapability ¶
type HubCapability struct {
Type string `json:"type"`
App string `json:"app"`
Description string `json:"description,omitempty"`
Healthy bool `json:"healthy"`
}
HubCapability represents a registered capability.
type HubClient ¶
type HubClient struct {
// contains filtered or unexported fields
}
HubClient provides access to the hub management API.
func (*HubClient) GetAppLogs ¶
GetAppLogs returns logs for an app.
func (*HubClient) GetAppStatus ¶
GetAppStatus returns the status of an app.
func (*HubClient) GetCapability ¶
GetCapability returns a single capability by type.
func (*HubClient) ListCapabilities ¶
func (h *HubClient) ListCapabilities(ctx context.Context) ([]HubCapability, error)
ListCapabilities lists all registered capabilities.
func (*HubClient) RestartApp ¶
RestartApp restarts a homelab app.
type HubHealth ¶
type HubHealth struct {
Status string `json:"status"`
Timestamp string `json:"timestamp"`
Details []CapabilityHealth `json:"details,omitempty"`
AppStatuses []AppHealthStatus `json:"app_statuses,omitempty"`
}
HubHealth represents the overall hub health.
type KanbanClient ¶
type KanbanClient struct {
// contains filtered or unexported fields
}
KanbanClient provides access to the kanban API.
func (*KanbanClient) Close ¶
func (k *KanbanClient) Close(ctx context.Context, id int) (*KanbanUpdateResult, error)
Close closes (deletes) a kanban task.
func (*KanbanClient) Create ¶
func (k *KanbanClient) Create(ctx context.Context, req KanbanCreateRequest) (*capability.Task, error)
Create creates a new kanban task.
func (*KanbanClient) CreateSubtask ¶
func (k *KanbanClient) CreateSubtask(ctx context.Context, taskID int, req KanbanCreateSubtaskRequest) (*KanbanCreateSubtaskResult, error)
CreateSubtask creates a new subtask for a task.
func (*KanbanClient) CreateTag ¶
func (k *KanbanClient) CreateTag(ctx context.Context, req KanbanCreateTagRequest) (*KanbanCreateTagResult, error)
CreateTag creates a new tag.
func (*KanbanClient) Get ¶
func (k *KanbanClient) Get(ctx context.Context, id int) (*capability.Task, error)
Get returns a single kanban task by ID.
func (*KanbanClient) GetMetadata ¶
func (k *KanbanClient) GetMetadata(ctx context.Context, taskID int) ([]kanboard.TaskMetadata, error)
GetMetadata returns all metadata for a task.
func (*KanbanClient) GetMetadataByName ¶
func (k *KanbanClient) GetMetadataByName(ctx context.Context, taskID int, name string) (string, error)
GetMetadataByName returns a specific metadata value by name.
func (*KanbanClient) GetSubtask ¶
func (k *KanbanClient) GetSubtask(ctx context.Context, taskID, subtaskID int) (*kanboard.Subtask, error)
GetSubtask returns a single subtask by ID.
func (*KanbanClient) GetSubtaskTimeSpent ¶
func (k *KanbanClient) GetSubtaskTimeSpent(ctx context.Context, taskID, subtaskID, userID int) (*GetSubtaskTimeSpentResult, error)
GetSubtaskTimeSpent gets the time spent on a subtask for a user (in hours).
func (*KanbanClient) GetTaskTags ¶
GetTaskTags returns all tags assigned to a task.
func (*KanbanClient) HasSubtaskTimer ¶
func (k *KanbanClient) HasSubtaskTimer(ctx context.Context, taskID, subtaskID, userID int) (*HasSubtaskTimerResult, error)
HasSubtaskTimer checks if a timer is started for the given subtask and user.
func (*KanbanClient) List ¶
func (k *KanbanClient) List(ctx context.Context, projectID int, status kanboard.StatusId) ([]*capability.Task, error)
List returns all kanban tasks for the given project and status. Use kanboard.Active (1) for active tasks or kanboard.Inactive (0) for closed tasks.
func (*KanbanClient) ListAll ¶
func (k *KanbanClient) ListAll(ctx context.Context, projectID int) ([]*capability.Task, error)
ListAll returns all kanban tasks for the given project regardless of status.
func (*KanbanClient) ListColumns ¶
func (k *KanbanClient) ListColumns(ctx context.Context, projectID int) ([]KanbanColumn, error)
ListColumns returns all columns for the given project.
func (*KanbanClient) ListSubtasks ¶
ListSubtasks returns all subtasks for a task.
func (*KanbanClient) ListTags ¶
func (k *KanbanClient) ListTags(ctx context.Context) ([]KanbanTag, error)
ListTags returns all tags.
func (*KanbanClient) ListTagsByProject ¶
ListTagsByProject returns all tags for a given project.
func (*KanbanClient) Move ¶
func (k *KanbanClient) Move(ctx context.Context, id int, req KanbanMoveRequest) (*capability.Task, error)
Move moves a kanban task to a different column and/or position.
func (*KanbanClient) RemoveMetadata ¶
func (k *KanbanClient) RemoveMetadata(ctx context.Context, taskID int, name string) (*KanbanRemoveMetadataResult, error)
RemoveMetadata removes a metadata entry from a task.
func (*KanbanClient) RemoveSubtask ¶
func (k *KanbanClient) RemoveSubtask(ctx context.Context, taskID, subtaskID int) (*KanbanRemoveSubtaskResult, error)
RemoveSubtask removes a subtask.
func (*KanbanClient) RemoveTag ¶
func (k *KanbanClient) RemoveTag(ctx context.Context, id int) (*KanbanRemoveTagResult, error)
RemoveTag removes a tag.
func (*KanbanClient) SaveMetadata ¶
func (k *KanbanClient) SaveMetadata(ctx context.Context, taskID int, values kanboard.TaskMetadata) (*KanbanSaveMetadataResult, error)
SaveMetadata saves metadata for a task.
func (*KanbanClient) Search ¶
func (k *KanbanClient) Search(ctx context.Context, projectID int, query string) ([]*capability.Task, error)
Search searches kanban tasks by query.
func (*KanbanClient) SetSubtaskEndTime ¶
func (k *KanbanClient) SetSubtaskEndTime(ctx context.Context, taskID, subtaskID, userID int) (*SetSubtaskEndTimeResult, error)
SetSubtaskEndTime stops the subtask timer for a user.
func (*KanbanClient) SetSubtaskStartTime ¶
func (k *KanbanClient) SetSubtaskStartTime(ctx context.Context, taskID, subtaskID, userID int) (*SetSubtaskStartTimeResult, error)
SetSubtaskStartTime starts the subtask timer for a user.
func (*KanbanClient) SetTaskTags ¶
func (k *KanbanClient) SetTaskTags(ctx context.Context, taskID int, req KanbanSetTaskTagsRequest) (*KanbanSetTaskTagsResult, error)
SetTaskTags sets tags for a task.
func (*KanbanClient) Update ¶
func (k *KanbanClient) Update(ctx context.Context, id int, req KanbanUpdateRequest) (*capability.Task, error)
Update updates an existing kanban task.
func (*KanbanClient) UpdateSubtask ¶
func (k *KanbanClient) UpdateSubtask(ctx context.Context, taskID, subtaskID int, req KanbanUpdateSubtaskRequest) (*KanbanUpdateSubtaskResult, error)
UpdateSubtask updates an existing subtask.
func (*KanbanClient) UpdateTag ¶
func (k *KanbanClient) UpdateTag(ctx context.Context, id int, req KanbanUpdateTagRequest) (*KanbanUpdateTagResult, error)
UpdateTag updates an existing tag.
type KanbanColumn ¶
KanbanColumn represents a kanban column.
type KanbanCreateRequest ¶
type KanbanCreateRequest struct {
Title string `json:"title"`
Description string `json:"description,omitempty"`
ProjectID int `json:"project_id,omitempty"`
ColumnID int `json:"column_id,omitempty"`
}
KanbanCreateRequest contains the data needed to create a new kanban task.
type KanbanCreateSubtaskRequest ¶
type KanbanCreateSubtaskRequest struct {
Title string `json:"title"`
UserID int `json:"user_id,omitempty"`
TimeEstimated int `json:"time_estimated,omitempty"`
TimeSpent int `json:"time_spent,omitempty"`
Status int `json:"status,omitempty"`
}
KanbanCreateSubtaskRequest contains the data needed to create a new subtask.
type KanbanCreateSubtaskResult ¶
type KanbanCreateSubtaskResult struct {
ID int64 `json:"id"`
}
KanbanCreateSubtaskResult contains the result of creating a subtask.
type KanbanCreateTagRequest ¶
type KanbanCreateTagRequest struct {
ProjectID int `json:"project_id"`
Name string `json:"name"`
ColorID string `json:"color_id,omitempty"`
}
KanbanCreateTagRequest contains the data needed to create a new tag.
type KanbanCreateTagResult ¶
type KanbanCreateTagResult struct {
ID int64 `json:"id"`
}
KanbanCreateTagResult contains the result of creating a tag.
type KanbanGetMetadataByNameResult ¶
type KanbanGetMetadataByNameResult struct {
Value string `json:"value"`
}
KanbanGetMetadataByNameResult contains the result of getting a single metadata value.
type KanbanGetMetadataResult ¶
type KanbanGetMetadataResult struct {
Metadata []kanboard.TaskMetadata `json:"metadata"`
}
KanbanGetMetadataResult contains the result of getting task metadata.
type KanbanGetTaskTagsResult ¶
KanbanGetTaskTagsResult contains the result of getting task tags.
type KanbanMoveRequest ¶
type KanbanMoveRequest struct {
ColumnID int `json:"column_id"`
Position int `json:"position,omitempty"`
SwimlaneID int `json:"swimlane_id,omitempty"`
ProjectID int `json:"project_id,omitempty"`
}
KanbanMoveRequest contains the parameters for moving a kanban task.
type KanbanRemoveMetadataResult ¶
type KanbanRemoveMetadataResult struct {
Success bool `json:"success"`
}
KanbanRemoveMetadataResult contains the result of removing task metadata.
type KanbanRemoveSubtaskResult ¶
type KanbanRemoveSubtaskResult struct {
Success bool `json:"success"`
}
KanbanRemoveSubtaskResult contains the result of removing a subtask.
type KanbanRemoveTagResult ¶
type KanbanRemoveTagResult struct {
Success bool `json:"success"`
}
KanbanRemoveTagResult contains the result of removing a tag.
type KanbanSaveMetadataRequest ¶
type KanbanSaveMetadataRequest struct {
Values kanboard.TaskMetadata `json:"values"`
}
KanbanSaveMetadataRequest contains the request for saving task metadata.
type KanbanSaveMetadataResult ¶
type KanbanSaveMetadataResult struct {
Success bool `json:"success"`
}
KanbanSaveMetadataResult contains the result of saving task metadata.
type KanbanSetTaskTagsRequest ¶
type KanbanSetTaskTagsRequest struct {
ProjectID int `json:"project_id"`
Tags []string `json:"tags"`
}
KanbanSetTaskTagsRequest contains the request for setting task tags.
type KanbanSetTaskTagsResult ¶
type KanbanSetTaskTagsResult struct {
Success bool `json:"success"`
}
KanbanSetTaskTagsResult contains the result of setting task tags.
type KanbanTag ¶
type KanbanTag struct {
ID string `json:"id"`
Name string `json:"name"`
ProjectID string `json:"project_id"`
}
KanbanTag represents a kanban tag.
type KanbanUpdateRequest ¶
type KanbanUpdateRequest struct {
Title string `json:"title,omitempty"`
Description string `json:"description,omitempty"`
}
KanbanUpdateRequest contains the data for updating a kanban task.
type KanbanUpdateResult ¶
type KanbanUpdateResult struct {
Success bool `json:"success"`
}
KanbanUpdateResult contains the result of updating a kanban task.
type KanbanUpdateSubtaskRequest ¶
type KanbanUpdateSubtaskRequest struct {
Title string `json:"title,omitempty"`
UserID int `json:"user_id,omitempty"`
TimeEstimated int `json:"time_estimated,omitempty"`
TimeSpent int `json:"time_spent,omitempty"`
Status int `json:"status,omitempty"`
}
KanbanUpdateSubtaskRequest contains the data for updating a subtask.
type KanbanUpdateSubtaskResult ¶
type KanbanUpdateSubtaskResult struct {
Success bool `json:"success"`
}
KanbanUpdateSubtaskResult contains the result of updating a subtask.
type KanbanUpdateTagRequest ¶
type KanbanUpdateTagRequest struct {
Name string `json:"name"`
ColorID string `json:"color_id,omitempty"`
}
KanbanUpdateTagRequest contains the data for updating a tag.
type KanbanUpdateTagResult ¶
type KanbanUpdateTagResult struct {
Success bool `json:"success"`
}
KanbanUpdateTagResult contains the result of updating a tag.
type ListBookmarksQuery ¶
ListBookmarksQuery contains query parameters for listing bookmarks.
type ListEntriesQuery ¶
ListEntriesQuery contains query parameters for listing entries.
type ListIssuesQuery ¶
ListIssuesQuery contains query parameters for listing forge issues.
type ListMemosQuery ¶
ListMemosQuery contains query parameters for listing memos.
type ListNotesQuery ¶ added in v0.97.8
ListNotesQuery contains query parameters for listing notes.
type ListNotificationsQuery ¶
ListNotificationsQuery contains query parameters for listing notifications.
type MemoClient ¶
type MemoClient struct {
// contains filtered or unexported fields
}
MemoClient provides access to the memo API.
func (*MemoClient) Create ¶
func (m *MemoClient) Create(ctx context.Context, content, visibility string) (*capability.Memo, error)
Create creates a new memo.
func (*MemoClient) Delete ¶
func (m *MemoClient) Delete(ctx context.Context, name string) error
Delete removes a memo by its resource name.
func (*MemoClient) Get ¶
func (m *MemoClient) Get(ctx context.Context, name string) (*capability.Memo, error)
Get returns a single memo by its resource name (e.g., "memos/123").
func (*MemoClient) Health ¶
func (m *MemoClient) Health(ctx context.Context) (bool, error)
Health checks whether the memo backend is reachable.
func (*MemoClient) List ¶
func (m *MemoClient) List(ctx context.Context, query *ListMemosQuery) (*MemoListResult, error)
List returns a paginated list of memos.
func (*MemoClient) Update ¶
func (m *MemoClient) Update(ctx context.Context, name string, req *UpdateMemoRequest) (*capability.Memo, error)
Update updates an existing memo.
type MemoHealthResult ¶
type MemoHealthResult struct {
Healthy bool `json:"data"`
}
MemoHealthResult holds the health check result extracted from InvokeResult.
type MemoItemResult ¶
type MemoItemResult struct {
Item capability.Memo `json:"data"`
}
MemoItemResult holds a single memo extracted from InvokeResult.
type MemoListResult ¶
type MemoListResult struct {
Items []*capability.Memo `json:"data"`
Page MemoPage `json:"page"`
}
MemoListResult holds the paginated list response extracted from InvokeResult.
type MemoPage ¶
type MemoPage struct {
Limit int `json:"limit"`
HasMore bool `json:"has_more"`
NextCursor string `json:"next_cursor,omitzero"`
}
MemoPage holds pagination metadata.
type Memory ¶
type Memory struct {
RSSBytes int64 `json:"rss_bytes"`
VMSBytes int64 `json:"vms_bytes"`
SwapBytes int64 `json:"swap_bytes"`
RSSMB float64 `json:"rss_mb"`
VMSMB float64 `json:"vms_mb"`
}
Memory contains memory statistics.
type MetricsResult ¶
type MetricsResult struct {
BotTotalStats int64 `json:"bot_total_stats,omitempty"`
BookmarkTotalStats int64 `json:"bookmark_total_stats,omitempty"`
TorrentDownloadTotalStats int64 `json:"torrent_download_total_stats,omitempty"`
GiteaIssueTotalStats int64 `json:"gitea_issue_total_stats,omitempty"`
ReaderUnreadTotalStats int64 `json:"reader_unread_total_stats,omitempty"`
KanbanTaskTotalStats int64 `json:"kanban_task_total_stats,omitempty"`
MonitorUpTotalStats int64 `json:"monitor_up_total_stats,omitempty"`
MonitorDownTotalStats int64 `json:"monitor_down_total_stats,omitempty"`
DockerContainerTotalStats int64 `json:"docker_container_total_stats,omitempty"`
}
MetricsResult contains system metrics data.
type NocoBasesResult ¶ added in v0.97.8
type NocoBasesResult struct {
Items []*capability.NocoBase `json:"data"`
Page *capability.PageInfo `json:"page"`
}
NocoBasesResult holds bases extracted from InvokeResult.
type NocoCreateRecordRequest ¶ added in v0.97.8
NocoCreateRecordRequest is the request body for creating a record.
type NocoDeleteRecordRequest ¶ added in v0.97.8
type NocoDeleteRecordRequest struct {
ID string `json:"id"`
}
NocoDeleteRecordRequest is the request body for deleting a record.
type NocoDeleteResult ¶ added in v0.97.8
NocoDeleteResult holds delete confirmation extracted from InvokeResult.
type NocoHealthResult ¶ added in v0.97.8
type NocoHealthResult struct {
Healthy bool `json:"data"`
}
NocoHealthResult holds the health check result extracted from InvokeResult.
type NocoListRecordsQuery ¶ added in v0.97.8
NocoListRecordsQuery holds optional query parameters for listing records.
type NocoRecordResult ¶ added in v0.97.8
type NocoRecordResult struct {
Item capability.NocoRecord `json:"data"`
}
NocoRecordResult holds a single record extracted from InvokeResult.
type NocoRecordsResult ¶ added in v0.97.8
type NocoRecordsResult struct {
Items []*capability.NocoRecord `json:"data"`
Page *capability.PageInfo `json:"page"`
}
NocoRecordsResult holds records extracted from InvokeResult.
type NocoTableResult ¶ added in v0.97.8
type NocoTableResult struct {
Item capability.NocoTable `json:"data"`
}
NocoTableResult holds a single table extracted from InvokeResult.
type NocoTablesResult ¶ added in v0.97.8
type NocoTablesResult struct {
Items []*capability.NocoTable `json:"data"`
Page *capability.PageInfo `json:"page"`
}
NocoTablesResult holds tables extracted from InvokeResult.
type NocoUpdateRecordRequest ¶ added in v0.97.8
NocoUpdateRecordRequest is the request body for updating a record.
type NocodbClient ¶ added in v0.97.8
type NocodbClient struct {
// contains filtered or unexported fields
}
NocodbClient provides access to the NocoDB capability API.
func (*NocodbClient) CreateRecord ¶ added in v0.97.8
func (n *NocodbClient) CreateRecord(ctx context.Context, tableID string, fields map[string]any) (*capability.NocoRecord, error)
CreateRecord creates a record.
func (*NocodbClient) DeleteRecord ¶ added in v0.97.8
func (n *NocodbClient) DeleteRecord(ctx context.Context, tableID, recordID string) error
DeleteRecord deletes a record.
func (*NocodbClient) GetRecord ¶ added in v0.97.8
func (n *NocodbClient) GetRecord(ctx context.Context, tableID, recordID string) (*capability.NocoRecord, error)
GetRecord returns a single record.
func (*NocodbClient) GetTable ¶ added in v0.97.8
func (n *NocodbClient) GetTable(ctx context.Context, tableID string) (*capability.NocoTable, error)
GetTable returns table metadata.
func (*NocodbClient) Health ¶ added in v0.97.8
func (n *NocodbClient) Health(ctx context.Context) (bool, error)
Health checks whether the NocoDB backend is reachable.
func (*NocodbClient) ListBases ¶ added in v0.97.8
func (n *NocodbClient) ListBases(ctx context.Context) (*NocoBasesResult, error)
ListBases returns NocoDB bases (first page).
func (*NocodbClient) ListRecords ¶ added in v0.97.8
func (n *NocodbClient) ListRecords(ctx context.Context, tableID string, q NocoListRecordsQuery) (*NocoRecordsResult, error)
ListRecords returns records for a table.
func (*NocodbClient) ListTables ¶ added in v0.97.8
func (n *NocodbClient) ListTables(ctx context.Context, baseID string) (*NocoTablesResult, error)
ListTables returns tables in a base (first page).
func (*NocodbClient) UpdateRecord ¶ added in v0.97.8
func (n *NocodbClient) UpdateRecord(ctx context.Context, tableID, recordID string, fields map[string]any) (*capability.NocoRecord, error)
UpdateRecord updates a record.
type NoteContentResult ¶ added in v0.97.8
type NoteContentResult struct {
Content string `json:"data"`
}
NoteContentResult holds note content extracted from InvokeResult.
type NoteItemResult ¶ added in v0.97.8
type NoteItemResult struct {
Item capability.Note `json:"data"`
}
NoteItemResult holds a single note extracted from InvokeResult.
type NoteListResult ¶ added in v0.97.8
type NoteListResult struct {
Items []*capability.Note `json:"data"`
Page NotePage `json:"page"`
}
NoteListResult holds the paginated list response extracted from InvokeResult.
type NotePage ¶ added in v0.97.8
type NotePage struct {
Limit int `json:"limit"`
HasMore bool `json:"has_more"`
NextCursor string `json:"next_cursor,omitzero"`
}
NotePage holds pagination metadata.
type PipelineClient ¶
type PipelineClient struct {
// contains filtered or unexported fields
}
PipelineClient provides access to the pipeline API.
func (*PipelineClient) List ¶
func (p *PipelineClient) List(ctx context.Context) (*PipelineListResult, error)
List returns configured pipelines from the hub.
func (*PipelineClient) Run ¶
func (p *PipelineClient) Run(ctx context.Context, name string) (*PipelineRunResult, error)
Run triggers a pipeline run by name.
type PipelineInfo ¶
type PipelineInfo struct {
Name string `json:"name"`
Description string `json:"description"`
Enabled bool `json:"enabled"`
Trigger PipelineInfoTrigger `json:"trigger"`
Steps []PipelineInfoStep `json:"steps"`
}
PipelineInfo is a pipeline metadata record.
type PipelineInfoStep ¶
type PipelineInfoStep struct {
Name string `json:"name"`
Capability string `json:"capability"`
Operation string `json:"operation"`
Params map[string]any `json:"params"`
}
PipelineInfoStep holds a step definition in a pipeline list result.
type PipelineInfoTrigger ¶
type PipelineInfoTrigger struct {
Event string `json:"event"`
}
PipelineInfoTrigger holds the trigger definition for a pipeline.
type PipelineListResult ¶
type PipelineListResult struct {
Pipelines []PipelineInfo `json:"pipelines"`
}
PipelineListResult contains the list of pipelines.
type PipelineRunResult ¶
type PipelineRunResult struct {
Message string `json:"message"`
}
PipelineRunResult is the response from triggering a pipeline run.
type Process ¶
type Process struct {
Name string `json:"name"`
PID int `json:"pid"`
CreateTime string `json:"create_time"`
UptimeSeconds float64 `json:"uptime_seconds"`
Memory Memory `json:"memory"`
CPUPercent float64 `json:"cpu_percent"`
NumThreads int32 `json:"num_threads"`
}
Process contains process-level information.
type ReaderClient ¶
type ReaderClient struct {
// contains filtered or unexported fields
}
ReaderClient provides access to the reader API.
func (*ReaderClient) CreateFeed ¶
func (r *ReaderClient) CreateFeed(ctx context.Context, req *CreateFeedRequest) (*capability.Feed, error)
CreateFeed creates a new feed.
func (*ReaderClient) GetFeed ¶
func (r *ReaderClient) GetFeed(ctx context.Context, id int64) (*capability.Feed, error)
GetFeed returns a single feed by ID by listing feeds and filtering. The server does not expose a dedicated get-feed endpoint.
func (*ReaderClient) GetFeedEntries ¶
func (r *ReaderClient) GetFeedEntries(ctx context.Context, feedID int64, query *GetFeedEntriesQuery) ([]*capability.Entry, error)
GetFeedEntries returns entries for a specific feed via the shared entries endpoint.
func (*ReaderClient) ListEntries ¶
func (r *ReaderClient) ListEntries(ctx context.Context, query *ListEntriesQuery) ([]*capability.Entry, error)
ListEntries returns entries with optional filtering.
func (*ReaderClient) ListFeeds ¶
func (r *ReaderClient) ListFeeds(ctx context.Context) ([]*capability.Feed, error)
ListFeeds returns all feeds.
func (*ReaderClient) UpdateEntriesStatus ¶
func (r *ReaderClient) UpdateEntriesStatus(ctx context.Context, req *UpdateEntriesRequest) (*UpdateEntriesResult, error)
UpdateEntriesStatus updates the status of multiple entries.
type Runtime ¶
type Runtime struct {
GoVersion string `json:"go_version"`
NumCPU int `json:"num_cpu"`
NumGoroutine int `json:"num_goroutine"`
Memory RuntimeMemory `json:"memory"`
GC GC `json:"gc"`
}
Runtime contains Go runtime information.
type RuntimeMemory ¶
type RuntimeMemory struct {
AllocBytes uint64 `json:"alloc_bytes"`
TotalAllocBytes uint64 `json:"total_alloc_bytes"`
SysBytes uint64 `json:"sys_bytes"`
HeapAllocBytes uint64 `json:"heap_alloc_bytes"`
HeapSysBytes uint64 `json:"heap_sys_bytes"`
AllocMB float64 `json:"alloc_mb"`
SysMB float64 `json:"sys_mb"`
}
RuntimeMemory contains Go runtime memory statistics.
type SearchBookmarksQuery ¶
type SearchBookmarksQuery struct {
Q string
SortOrder string
Limit int
Cursor string
IncludeContent bool
}
SearchBookmarksQuery contains query parameters for searching bookmarks.
type SearchClient ¶
type SearchClient struct {
// contains filtered or unexported fields
}
SearchClient provides access to the search API.
func (*SearchClient) Autocomplete ¶
func (s *SearchClient) Autocomplete(ctx context.Context, query, source string) ([]SearchResult, error)
Autocomplete performs a search autocomplete query. The source parameter filters by data source (optional).
func (*SearchClient) Search ¶
func (s *SearchClient) Search(ctx context.Context, query, source string) ([]SearchResult, error)
Search performs a full-text search. The source parameter filters by data source (optional).
type SearchNotesQuery ¶ added in v0.97.8
type SearchNotesQuery struct {
Q string
}
SearchNotesQuery contains query parameters for searching notes.
type SearchResult ¶
type SearchResult struct {
ID string `json:"id"`
Title string `json:"title"`
Content string `json:"content,omitempty"`
Source string `json:"source"`
URL string `json:"url,omitempty"`
}
SearchResult represents a single search result.
type ServerClient ¶
type ServerClient struct {
// contains filtered or unexported fields
}
ServerClient provides access to the server management API.
func (*ServerClient) Stacktrace ¶
func (s *ServerClient) Stacktrace(ctx context.Context) (*StacktraceResult, error)
Stacktrace retrieves server diagnostic information including goroutine stack traces.
func (*ServerClient) Upload ¶
func (s *ServerClient) Upload(ctx context.Context, files map[string]io.Reader, filenames map[string]string) (*UploadResult, error)
Upload uploads files to the server. files should be a map of field name to file content.
func (*ServerClient) UploadMultipart ¶
func (s *ServerClient) UploadMultipart(ctx context.Context, writer *multipart.Writer, body io.Reader) (*UploadResult, error)
UploadMultipart uploads files using multipart form data.
type SetSubtaskEndTimeResult ¶
type SetSubtaskEndTimeResult struct {
Result bool `json:"result"`
}
SetSubtaskEndTimeResult contains the result of stopping a subtask timer.
type SetSubtaskStartTimeResult ¶
type SetSubtaskStartTimeResult struct {
Result bool `json:"result"`
}
SetSubtaskStartTimeResult contains the result of starting a subtask timer.
type StacktraceResult ¶
type StacktraceResult struct {
Timestamp string `json:"timestamp"`
Process Process `json:"process"`
Runtime Runtime `json:"runtime"`
BuildInfo BuildInfo `json:"build_info"`
StackTrace string `json:"stack_trace"`
}
StacktraceResult contains server diagnostic information.
type TorrentItemResult ¶ added in v0.97.8
type TorrentItemResult struct {
Item capability.Torrent `json:"data"`
}
TorrentItemResult holds a single torrent extracted from InvokeResult.
type TorrentListResult ¶ added in v0.97.8
type TorrentListResult struct {
Items []*capability.Torrent `json:"data"`
}
TorrentListResult holds torrents extracted from InvokeResult.
type TorrentsActionRequest ¶ added in v0.97.8
type TorrentsActionRequest struct {
IDs []int64 `json:"ids"`
}
TorrentsActionRequest is the request body for stop/remove operations.
type TorrentsActionResult ¶ added in v0.97.8
TorrentsActionResult holds stop/remove counts extracted from InvokeResult.
type TransactionItemResult ¶ added in v0.97.8
type TransactionItemResult struct {
Item capability.Transaction `json:"data"`
}
TransactionItemResult holds a single transaction extracted from InvokeResult.
type TransmissionClient ¶ added in v0.97.8
type TransmissionClient struct {
// contains filtered or unexported fields
}
TransmissionClient provides access to the Transmission download API.
func (*TransmissionClient) AddTorrent ¶ added in v0.97.8
func (t *TransmissionClient) AddTorrent(ctx context.Context, req *AddTorrentRequest) (*capability.Torrent, error)
AddTorrent adds a torrent by magnet link or HTTP(S) .torrent URL.
func (*TransmissionClient) Health ¶ added in v0.97.8
func (t *TransmissionClient) Health(ctx context.Context) (bool, error)
Health checks whether the Transmission backend is reachable.
func (*TransmissionClient) ListTorrents ¶ added in v0.97.8
func (t *TransmissionClient) ListTorrents(ctx context.Context) ([]*capability.Torrent, error)
ListTorrents returns all torrents.
func (*TransmissionClient) RemoveTorrents ¶ added in v0.97.8
func (t *TransmissionClient) RemoveTorrents(ctx context.Context, ids []int64) error
RemoveTorrents removes torrents by ID.
func (*TransmissionClient) StopTorrents ¶ added in v0.97.8
func (t *TransmissionClient) StopTorrents(ctx context.Context, ids []int64) error
StopTorrents stops torrents by ID.
type TransmissionHealthResult ¶ added in v0.97.8
type TransmissionHealthResult struct {
Healthy bool `json:"data"`
}
TransmissionHealthResult holds the health check result extracted from InvokeResult.
type TriliumClient ¶ added in v0.97.8
type TriliumClient struct {
// contains filtered or unexported fields
}
TriliumClient provides access to the trilium note API.
func (*TriliumClient) Create ¶ added in v0.97.8
func (t *TriliumClient) Create(ctx context.Context, req *CreateNoteRequest) (*capability.Note, error)
Create creates a new note.
func (*TriliumClient) Delete ¶ added in v0.97.8
func (t *TriliumClient) Delete(ctx context.Context, id string) error
Delete removes a note by ID.
func (*TriliumClient) Get ¶ added in v0.97.8
func (t *TriliumClient) Get(ctx context.Context, id string) (*capability.Note, error)
Get returns a single note by ID.
func (*TriliumClient) GetContent ¶ added in v0.97.8
GetContent returns the full content of a note.
func (*TriliumClient) Health ¶ added in v0.97.8
func (t *TriliumClient) Health(ctx context.Context) (*capability.Note, error)
Health returns app info when the trilium backend is reachable.
func (*TriliumClient) List ¶ added in v0.97.8
func (t *TriliumClient) List(ctx context.Context, query *ListNotesQuery) (*NoteListResult, error)
List returns a paginated list of notes.
func (*TriliumClient) Search ¶ added in v0.97.8
func (t *TriliumClient) Search(ctx context.Context, query *SearchNotesQuery) (*NoteListResult, error)
Search searches notes by query string.
func (*TriliumClient) SetContent ¶ added in v0.97.8
func (t *TriliumClient) SetContent(ctx context.Context, id, content string) error
SetContent replaces the full content of a note.
func (*TriliumClient) Update ¶ added in v0.97.8
func (t *TriliumClient) Update(ctx context.Context, id string, req *UpdateNoteRequest) (*capability.Note, error)
Update updates an existing note.
type UpdateEntriesRequest ¶
type UpdateEntriesRequest struct {
EntryIDs []int64 `json:"entry_ids"`
Status string `json:"status"`
}
UpdateEntriesRequest contains parameters for updating entries status.
type UpdateEntriesResult ¶
type UpdateEntriesResult struct {
Success bool `json:"success"`
}
UpdateEntriesResult contains the result of updating entries.
type UpdateMemoRequest ¶
type UpdateMemoRequest struct {
Content string `json:"content,omitempty"`
Visibility string `json:"visibility,omitempty"`
Pinned *bool `json:"pinned"`
}
UpdateMemoRequest is the request body for updating a memo.
type UpdateNoteRequest ¶ added in v0.97.8
type UpdateNoteRequest struct {
Title string `json:"title,omitempty"`
Content string `json:"content,omitempty"`
}
UpdateNoteRequest is the request body for updating a note.
type UploadResult ¶
UploadResult contains the result of uploading files.
type UserClient ¶
type UserClient struct {
// contains filtered or unexported fields
}
UserClient provides access to the user API.
func (*UserClient) BookmarkList ¶
BookmarkList returns the user's bookmark list.
func (*UserClient) KanbanList ¶
KanbanList returns the user's kanban task list.
func (*UserClient) Metrics ¶
func (u *UserClient) Metrics(ctx context.Context) (*MetricsResult, error)
Metrics returns system metrics.
type WorkflowClient ¶
type WorkflowClient struct {
// contains filtered or unexported fields
}
WorkflowClient provides access to the workflow execution API.
func (*WorkflowClient) RunFile ¶
func (w *WorkflowClient) RunFile(ctx context.Context, filePath string) (*WorkflowRunResult, error)
RunFile uploads a workflow YAML file and runs it on the server.
type WorkflowRunResult ¶
type WorkflowRunResult struct {
Message string `json:"message"`
}
WorkflowRunResult is the response from a workflow run.