Documentation
¶
Overview ¶
Package types provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.7.0 DO NOT EDIT.
Index ¶
- type Article
- type ArticleList
- type ArticleStatus
- type BadRequest
- type Conflict
- type CreateFeedRequest
- type DeleteResult
- type Digest
- type Error
- type Feed
- type FeedEntry
- type FeedEntryList
- type FeedEntryStatus
- type FeedList
- type FeedPollResult
- type Forbidden
- type Job
- type JobInput
- type JobList
- type JobRun
- type JobRunList
- type NotFound
- type SaveArticleRequest
- type SourceType
- type TagCount
- type TriggerJobResult
- type Unauthorized
- type UpdateArticleRequest
- type UpdateFeedEntryRequest
- type UpdateFeedRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Article ¶
type Article struct {
AgentId *string `json:"agent_id,omitempty"`
Author *string `json:"author,omitempty"`
CanonicalUrl string `json:"canonical_url"`
// Content Article body in markdown. Returned only when ?include=content is set.
Content *string `json:"content,omitempty"`
CreatedAt time.Time `json:"created_at"`
FilePath string `json:"file_path"`
Id string `json:"id"`
Metadata *map[string]string `json:"metadata,omitempty"`
PublishedAt *time.Time `json:"published_at,omitempty"`
ReadAt *time.Time `json:"read_at,omitempty"`
SavedAt time.Time `json:"saved_at"`
SourceType SourceType `json:"source_type"`
Starred bool `json:"starred"`
Status ArticleStatus `json:"status"`
Summary *string `json:"summary,omitempty"`
Tags *[]string `json:"tags,omitempty"`
Title string `json:"title"`
UpdatedAt time.Time `json:"updated_at"`
Url string `json:"url"`
}
Article defines model for Article.
type ArticleList ¶
type ArticleList struct {
Items []Article `json:"items"`
}
ArticleList defines model for ArticleList.
type ArticleStatus ¶
type ArticleStatus string
ArticleStatus defines model for ArticleStatus.
const ( Archived ArticleStatus = "archived" Read ArticleStatus = "read" Unread ArticleStatus = "unread" )
Defines values for ArticleStatus.
func (ArticleStatus) Valid ¶
func (e ArticleStatus) Valid() bool
Valid indicates whether the value is a known member of the ArticleStatus enum.
type BadRequest ¶
type BadRequest struct {
Error string `json:"error"`
}
BadRequest defines model for BadRequest.
type Conflict ¶
type Conflict struct {
Error string `json:"error"`
}
Conflict defines model for Conflict.
type CreateFeedRequest ¶
type CreateFeedRequest struct {
AgentId *string `json:"agent_id,omitempty"`
// Title Optional override; server fetches feed metadata if omitted
Title *string `json:"title,omitempty"`
Url string `json:"url"`
}
CreateFeedRequest defines model for CreateFeedRequest.
type DeleteResult ¶
type DeleteResult struct {
Status string `json:"status"`
}
DeleteResult defines model for DeleteResult.
type Digest ¶
type Digest struct {
ArchivedCount int64 `json:"archived_count"`
Date time.Time `json:"date"`
ReadCount int64 `json:"read_count"`
SavedYesterday []Article `json:"saved_yesterday"`
SavedYesterdayCount int `json:"saved_yesterday_count"`
StarredCount int64 `json:"starred_count"`
TopTags []TagCount `json:"top_tags"`
TotalArticles int64 `json:"total_articles"`
UnreadCount int64 `json:"unread_count"`
WorthRevisiting []Article `json:"worth_revisiting"`
WorthRevisitingCount int `json:"worth_revisiting_count"`
}
Digest defines model for Digest.
type Feed ¶
type Feed struct {
AgentId *string `json:"agent_id,omitempty"`
CheckInterval string `json:"check_interval"`
CreatedAt time.Time `json:"created_at"`
Description *string `json:"description,omitempty"`
Enabled bool `json:"enabled"`
Id string `json:"id"`
LastCheckedAt *time.Time `json:"last_checked_at,omitempty"`
LastEtag *string `json:"last_etag,omitempty"`
LastModified *string `json:"last_modified,omitempty"`
Title string `json:"title"`
UpdatedAt time.Time `json:"updated_at"`
Url string `json:"url"`
}
Feed defines model for Feed.
type FeedEntry ¶
type FeedEntry struct {
ArticleId *string `json:"article_id,omitempty"`
Attempts int `json:"attempts"`
DiscoveredAt time.Time `json:"discovered_at"`
ErrorMsg *string `json:"error_msg,omitempty"`
FeedId string `json:"feed_id"`
Guid string `json:"guid"`
Id string `json:"id"`
ProcessedAt *time.Time `json:"processed_at,omitempty"`
Status FeedEntryStatus `json:"status"`
Title string `json:"title"`
Url string `json:"url"`
}
FeedEntry defines model for FeedEntry.
type FeedEntryList ¶
type FeedEntryList struct {
Items []FeedEntry `json:"items"`
}
FeedEntryList defines model for FeedEntryList.
type FeedEntryStatus ¶
type FeedEntryStatus string
FeedEntryStatus defines model for FeedEntryStatus.
const ( FeedEntryStatusError FeedEntryStatus = "error" FeedEntryStatusPending FeedEntryStatus = "pending" FeedEntryStatusSaved FeedEntryStatus = "saved" FeedEntryStatusSkipped FeedEntryStatus = "skipped" )
Defines values for FeedEntryStatus.
func (FeedEntryStatus) Valid ¶
func (e FeedEntryStatus) Valid() bool
Valid indicates whether the value is a known member of the FeedEntryStatus enum.
type FeedList ¶
type FeedList struct {
Items []Feed `json:"items"`
}
FeedList defines model for FeedList.
type FeedPollResult ¶
type FeedPollResult struct {
// Error Set if the upstream RSS fetch failed but the feed exists
Error *string `json:"error,omitempty"`
Feed Feed `json:"feed"`
NewEntries []FeedEntry `json:"new_entries"`
}
FeedPollResult defines model for FeedPollResult.
type Forbidden ¶
type Forbidden struct {
Error string `json:"error"`
}
Forbidden defines model for Forbidden.
type Job ¶
type Job struct {
AgentId *string `json:"agent_id,omitempty"`
// At RFC3339 one-time timestamp (mutually exclusive with cron/every)
At *string `json:"at,omitempty"`
CreatedAt *time.Time `json:"created_at,omitempty"`
// Cron Cron expression (mutually exclusive with every/at)
Cron *string `json:"cron,omitempty"`
Description *string `json:"description,omitempty"`
Enabled bool `json:"enabled"`
// Every Go duration string, e.g. '30m' (mutually exclusive with cron/at)
Every *string `json:"every,omitempty"`
Id string `json:"id"`
JobKey *string `json:"job_key,omitempty"`
LastError *string `json:"last_error,omitempty"`
LastRunAt *time.Time `json:"last_run_at,omitempty"`
// Message Prompt/instruction to run on schedule
Message string `json:"message"`
Name string `json:"name"`
// OwnerKind Ownership class: 'user' or 'plugin'
OwnerKind *string `json:"owner_kind,omitempty"`
// Payload Arbitrary structured data for plugin-owned jobs
Payload *map[string]interface{} `json:"payload,omitempty"`
PluginId *string `json:"plugin_id,omitempty"`
RuntimeName *string `json:"runtime_name,omitempty"`
// SessionMode Session behaviour: 'reuse' or 'new'
SessionMode string `json:"session_mode"`
UpdatedAt *time.Time `json:"updated_at,omitempty"`
UserId *int64 `json:"user_id,omitempty"`
}
Job defines model for Job.
type JobInput ¶
type JobInput struct {
AgentId *string `json:"agent_id,omitempty"`
At *string `json:"at,omitempty"`
Cron *string `json:"cron,omitempty"`
Description *string `json:"description,omitempty"`
Enabled *bool `json:"enabled,omitempty"`
Every *string `json:"every,omitempty"`
Message *string `json:"message,omitempty"`
Name *string `json:"name,omitempty"`
SessionMode *string `json:"session_mode,omitempty"`
// UserId Admin-only: set 0 for system jobs
UserId *int64 `json:"user_id,omitempty"`
}
JobInput Fields for creating or updating a job. For create: name, message, and exactly one of cron/every/at are required.
type JobList ¶
type JobList struct {
Items []Job `json:"items"`
}
JobList defines model for JobList.
type JobRun ¶
type JobRun struct {
Duration *string `json:"duration,omitempty"`
Error *string `json:"error,omitempty"`
FinishedAt *string `json:"finished_at,omitempty"`
Id string `json:"id"`
JobId string `json:"job_id"`
SessionId string `json:"session_id"`
StartedAt string `json:"started_at"`
Status string `json:"status"`
UserId *int64 `json:"user_id,omitempty"`
}
JobRun defines model for JobRun.
type NotFound ¶
type NotFound struct {
Error string `json:"error"`
}
NotFound defines model for NotFound.
type SaveArticleRequest ¶
type SaveArticleRequest struct {
AgentId *string `json:"agent_id,omitempty"`
Author *string `json:"author,omitempty"`
CanonicalUrl *string `json:"canonical_url,omitempty"`
// Content Markdown body. If empty and the article exists, only metadata is updated; if empty and the article is new, the request fails 400.
Content *string `json:"content,omitempty"`
Metadata *map[string]string `json:"metadata,omitempty"`
PublishedAt *time.Time `json:"published_at,omitempty"`
SourceType *SourceType `json:"source_type,omitempty"`
Summary *string `json:"summary,omitempty"`
Tags *[]string `json:"tags,omitempty"`
Title *string `json:"title,omitempty"`
Url string `json:"url"`
}
SaveArticleRequest defines model for SaveArticleRequest.
type SourceType ¶
type SourceType string
SourceType defines model for SourceType.
const ( Github SourceType = "github" Pdf SourceType = "pdf" Rss SourceType = "rss" Twitter SourceType = "twitter" Web SourceType = "web" Youtube SourceType = "youtube" )
Defines values for SourceType.
func (SourceType) Valid ¶
func (e SourceType) Valid() bool
Valid indicates whether the value is a known member of the SourceType enum.
type TriggerJobResult ¶
type TriggerJobResult struct {
RunId *string `json:"run_id,omitempty"`
Status string `json:"status"`
}
TriggerJobResult defines model for TriggerJobResult.
type UpdateArticleRequest ¶
type UpdateArticleRequest struct {
Author *string `json:"author,omitempty"`
// Content If set, rewrites the markdown file body.
Content *string `json:"content,omitempty"`
FilePath *string `json:"file_path,omitempty"`
Metadata *map[string]string `json:"metadata,omitempty"`
PublishedAt *time.Time `json:"published_at,omitempty"`
Starred *bool `json:"starred,omitempty"`
Status *ArticleStatus `json:"status,omitempty"`
Summary *string `json:"summary,omitempty"`
Tags *[]string `json:"tags,omitempty"`
Title *string `json:"title,omitempty"`
}
UpdateArticleRequest Only provided fields are updated.
type UpdateFeedEntryRequest ¶
type UpdateFeedEntryRequest struct {
ArticleId *string `json:"article_id,omitempty"`
ErrorMsg *string `json:"error_msg,omitempty"`
Status FeedEntryStatus `json:"status"`
}
UpdateFeedEntryRequest defines model for UpdateFeedEntryRequest.
type UpdateFeedRequest ¶
type UpdateFeedRequest struct {
CheckInterval *string `json:"check_interval,omitempty"`
Description *string `json:"description,omitempty"`
Enabled *bool `json:"enabled,omitempty"`
Title *string `json:"title,omitempty"`
}
UpdateFeedRequest defines model for UpdateFeedRequest.