server

package
v0.22.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 6, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package server 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

Constants

View Source
const (
	BearerAuthScopes bearerAuthContextKey = "BearerAuth.Scopes"
)

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 Article

type Article = externalRef0.Article

Article defines model for Article.

type ArticleList

type ArticleList = externalRef0.ArticleList

ArticleList defines model for ArticleList.

type ArticleStatus

type ArticleStatus = externalRef0.ArticleStatus

ArticleStatus defines model for ArticleStatus.

type CreateFeedJSONRequestBody

type CreateFeedJSONRequestBody = externalRef0.CreateFeedRequest

CreateFeedJSONRequestBody defines body for CreateFeed for application/json ContentType.

type CreateFeedRequest

type CreateFeedRequest = externalRef0.CreateFeedRequest

CreateFeedRequest defines model for CreateFeedRequest.

type CreateSchedulerJobJSONRequestBody

type CreateSchedulerJobJSONRequestBody = externalRef0.JobInput

CreateSchedulerJobJSONRequestBody defines body for CreateSchedulerJob for application/json ContentType.

type DeleteResult

type DeleteResult = externalRef0.DeleteResult

DeleteResult defines model for DeleteResult.

type Digest

type Digest = externalRef0.Digest

Digest defines model for Digest.

type Error

type Error = externalRef0.Error

Error defines model for Error.

type Feed

type Feed = externalRef0.Feed

Feed defines model for Feed.

type FeedEntry

type FeedEntry = externalRef0.FeedEntry

FeedEntry defines model for FeedEntry.

type FeedEntryList

type FeedEntryList = externalRef0.FeedEntryList

FeedEntryList defines model for FeedEntryList.

type FeedEntryStatus

type FeedEntryStatus = externalRef0.FeedEntryStatus

FeedEntryStatus defines model for FeedEntryStatus.

type FeedList

type FeedList = externalRef0.FeedList

FeedList defines model for FeedList.

type FeedPollResult

type FeedPollResult = externalRef0.FeedPollResult

FeedPollResult defines model for FeedPollResult.

type GetArticleParams

type GetArticleParams struct {
	// Include Comma-separated extras (only `content` supported)
	Include *string `form:"include,omitempty" json:"include,omitempty"`
}

GetArticleParams defines parameters for GetArticle.

type InvalidParamFormatError

type InvalidParamFormatError struct {
	ParamName string
	Err       error
}

func (*InvalidParamFormatError) Error

func (e *InvalidParamFormatError) Error() string

func (*InvalidParamFormatError) Unwrap

func (e *InvalidParamFormatError) Unwrap() error

type Job

type Job = externalRef0.Job

Job defines model for Job.

type JobInput

type JobInput = externalRef0.JobInput

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 = externalRef0.JobList

JobList defines model for JobList.

type ListArticlesParams

type ListArticlesParams struct {
	// Q Free-text search across title, summary, tags, author
	Q          *string                     `form:"q,omitempty" json:"q,omitempty"`
	Status     *externalRef0.ArticleStatus `form:"status,omitempty" json:"status,omitempty"`
	SourceType *externalRef0.SourceType    `form:"source_type,omitempty" json:"source_type,omitempty"`
	Starred    *bool                       `form:"starred,omitempty" json:"starred,omitempty"`

	// CanonicalUrl Lookup by exact canonical URL
	CanonicalUrl *string `form:"canonical_url,omitempty" json:"canonical_url,omitempty"`
	Limit        *int    `form:"limit,omitempty" json:"limit,omitempty"`
}

ListArticlesParams defines parameters for ListArticles.

type ListFeedEntriesParams

type ListFeedEntriesParams struct {
	// Status Filter by entry status. Currently only 'pending' is supported; other values return 400.
	Status *externalRef0.FeedEntryStatus `form:"status,omitempty" json:"status,omitempty"`
	Limit  *int                          `form:"limit,omitempty" json:"limit,omitempty"`
}

ListFeedEntriesParams defines parameters for ListFeedEntries.

type ListFeedsParams

type ListFeedsParams struct {
	// Url Lookup by exact feed URL
	Url *string `form:"url,omitempty" json:"url,omitempty"`
}

ListFeedsParams defines parameters for ListFeeds.

type MiddlewareFunc

type MiddlewareFunc func(http.Handler) http.Handler

type PollFeedParams

type PollFeedParams struct {
	Limit *int `form:"limit,omitempty" json:"limit,omitempty"`
}

PollFeedParams defines parameters for PollFeed.

type RequiredHeaderError

type RequiredHeaderError struct {
	ParamName string
	Err       error
}

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 SaveArticleJSONRequestBody

type SaveArticleJSONRequestBody = externalRef0.SaveArticleRequest

SaveArticleJSONRequestBody defines body for SaveArticle for application/json ContentType.

type SaveArticleRequest

type SaveArticleRequest = externalRef0.SaveArticleRequest

SaveArticleRequest defines model for SaveArticleRequest.

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 {
	// List or search articles
	// (GET /api/recally/articles)
	ListArticles(w http.ResponseWriter, r *http.Request, params ListArticlesParams)
	// Save an article (upsert by canonical URL)
	// (POST /api/recally/articles)
	SaveArticle(w http.ResponseWriter, r *http.Request)
	// Delete an article (DB row + markdown file)
	// (DELETE /api/recally/articles/{id})
	DeleteArticle(w http.ResponseWriter, r *http.Request, id string)
	// Get an article
	// (GET /api/recally/articles/{id})
	GetArticle(w http.ResponseWriter, r *http.Request, id string, params GetArticleParams)
	// Update article fields (partial)
	// (PUT /api/recally/articles/{id})
	UpdateArticle(w http.ResponseWriter, r *http.Request, id string)
	// Get the current user's reading digest
	// (GET /api/recally/digest)
	GetDigest(w http.ResponseWriter, r *http.Request)
	// List subscribed feeds
	// (GET /api/recally/feeds)
	ListFeeds(w http.ResponseWriter, r *http.Request, params ListFeedsParams)
	// Subscribe to a new feed (server fetches metadata)
	// (POST /api/recally/feeds)
	CreateFeed(w http.ResponseWriter, r *http.Request)
	// List entries for a feed
	// (GET /api/recally/feeds/{feedId}/entries)
	ListFeedEntries(w http.ResponseWriter, r *http.Request, feedId string, params ListFeedEntriesParams)
	// Update an entry (status transition)
	// (PUT /api/recally/feeds/{feedId}/entries/{id})
	UpdateFeedEntry(w http.ResponseWriter, r *http.Request, feedId string, id string)
	// Unsubscribe from a feed (cascade deletes entries)
	// (DELETE /api/recally/feeds/{id})
	DeleteFeed(w http.ResponseWriter, r *http.Request, id string)
	// Get a feed
	// (GET /api/recally/feeds/{id})
	GetFeed(w http.ResponseWriter, r *http.Request, id string)
	// Update feed fields (partial)
	// (PUT /api/recally/feeds/{id})
	UpdateFeed(w http.ResponseWriter, r *http.Request, id string)
	// Poll a feed (server fetches RSS, creates pending entries)
	// (POST /api/recally/feeds/{id}/poll)
	PollFeed(w http.ResponseWriter, r *http.Request, id string, params PollFeedParams)
	// List scheduler jobs
	// (GET /api/scheduler/jobs)
	ListSchedulerJobs(w http.ResponseWriter, r *http.Request)
	// Create a scheduler job
	// (POST /api/scheduler/jobs)
	CreateSchedulerJob(w http.ResponseWriter, r *http.Request)
	// Delete a scheduler job
	// (DELETE /api/scheduler/jobs/{id})
	DeleteSchedulerJob(w http.ResponseWriter, r *http.Request, id string)
	// Update a scheduler job (partial — missing fields are merged from existing)
	// (PUT /api/scheduler/jobs/{id})
	UpdateSchedulerJob(w http.ResponseWriter, r *http.Request, id string)
	// Trigger a scheduler job immediately
	// (POST /api/scheduler/jobs/{id}/run)
	TriggerSchedulerJob(w http.ResponseWriter, r *http.Request, id string)
	// List scheduler job runs
	// (GET /api/scheduler/jobs/{id}/runs)
	ListSchedulerJobRuns(w http.ResponseWriter, r *http.Request, id string)
}

ServerInterface represents all server handlers.

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) CreateFeed

func (siw *ServerInterfaceWrapper) CreateFeed(w http.ResponseWriter, r *http.Request)

CreateFeed operation middleware

func (*ServerInterfaceWrapper) CreateSchedulerJob

func (siw *ServerInterfaceWrapper) CreateSchedulerJob(w http.ResponseWriter, r *http.Request)

CreateSchedulerJob operation middleware

func (*ServerInterfaceWrapper) DeleteArticle

func (siw *ServerInterfaceWrapper) DeleteArticle(w http.ResponseWriter, r *http.Request)

DeleteArticle operation middleware

func (*ServerInterfaceWrapper) DeleteFeed

func (siw *ServerInterfaceWrapper) DeleteFeed(w http.ResponseWriter, r *http.Request)

DeleteFeed operation middleware

func (*ServerInterfaceWrapper) DeleteSchedulerJob

func (siw *ServerInterfaceWrapper) DeleteSchedulerJob(w http.ResponseWriter, r *http.Request)

DeleteSchedulerJob operation middleware

func (*ServerInterfaceWrapper) GetArticle

func (siw *ServerInterfaceWrapper) GetArticle(w http.ResponseWriter, r *http.Request)

GetArticle operation middleware

func (*ServerInterfaceWrapper) GetDigest

func (siw *ServerInterfaceWrapper) GetDigest(w http.ResponseWriter, r *http.Request)

GetDigest operation middleware

func (*ServerInterfaceWrapper) GetFeed

GetFeed operation middleware

func (*ServerInterfaceWrapper) ListArticles

func (siw *ServerInterfaceWrapper) ListArticles(w http.ResponseWriter, r *http.Request)

ListArticles operation middleware

func (*ServerInterfaceWrapper) ListFeedEntries

func (siw *ServerInterfaceWrapper) ListFeedEntries(w http.ResponseWriter, r *http.Request)

ListFeedEntries operation middleware

func (*ServerInterfaceWrapper) ListFeeds

func (siw *ServerInterfaceWrapper) ListFeeds(w http.ResponseWriter, r *http.Request)

ListFeeds operation middleware

func (*ServerInterfaceWrapper) ListSchedulerJobRuns

func (siw *ServerInterfaceWrapper) ListSchedulerJobRuns(w http.ResponseWriter, r *http.Request)

ListSchedulerJobRuns operation middleware

func (*ServerInterfaceWrapper) ListSchedulerJobs

func (siw *ServerInterfaceWrapper) ListSchedulerJobs(w http.ResponseWriter, r *http.Request)

ListSchedulerJobs operation middleware

func (*ServerInterfaceWrapper) PollFeed

func (siw *ServerInterfaceWrapper) PollFeed(w http.ResponseWriter, r *http.Request)

PollFeed operation middleware

func (*ServerInterfaceWrapper) SaveArticle

func (siw *ServerInterfaceWrapper) SaveArticle(w http.ResponseWriter, r *http.Request)

SaveArticle operation middleware

func (*ServerInterfaceWrapper) TriggerSchedulerJob

func (siw *ServerInterfaceWrapper) TriggerSchedulerJob(w http.ResponseWriter, r *http.Request)

TriggerSchedulerJob operation middleware

func (*ServerInterfaceWrapper) UpdateArticle

func (siw *ServerInterfaceWrapper) UpdateArticle(w http.ResponseWriter, r *http.Request)

UpdateArticle operation middleware

func (*ServerInterfaceWrapper) UpdateFeed

func (siw *ServerInterfaceWrapper) UpdateFeed(w http.ResponseWriter, r *http.Request)

UpdateFeed operation middleware

func (*ServerInterfaceWrapper) UpdateFeedEntry

func (siw *ServerInterfaceWrapper) UpdateFeedEntry(w http.ResponseWriter, r *http.Request)

UpdateFeedEntry operation middleware

func (*ServerInterfaceWrapper) UpdateSchedulerJob

func (siw *ServerInterfaceWrapper) UpdateSchedulerJob(w http.ResponseWriter, r *http.Request)

UpdateSchedulerJob operation middleware

type SourceType

type SourceType = externalRef0.SourceType

SourceType defines model for SourceType.

type StdHTTPServerOptions

type StdHTTPServerOptions struct {
	BaseURL          string
	BaseRouter       ServeMux
	Middlewares      []MiddlewareFunc
	ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
}

type TagCount

type TagCount = externalRef0.TagCount

TagCount defines model for TagCount.

type TooManyValuesForParamError

type TooManyValuesForParamError struct {
	ParamName string
	Count     int
}

func (*TooManyValuesForParamError) Error

type UnescapedCookieParamError

type UnescapedCookieParamError struct {
	ParamName string
	Err       error
}

func (*UnescapedCookieParamError) Error

func (e *UnescapedCookieParamError) Error() string

func (*UnescapedCookieParamError) Unwrap

func (e *UnescapedCookieParamError) Unwrap() error

type UnmarshalingParamError

type UnmarshalingParamError struct {
	ParamName string
	Err       error
}

func (*UnmarshalingParamError) Error

func (e *UnmarshalingParamError) Error() string

func (*UnmarshalingParamError) Unwrap

func (e *UnmarshalingParamError) Unwrap() error

type UpdateArticleJSONRequestBody

type UpdateArticleJSONRequestBody = externalRef0.UpdateArticleRequest

UpdateArticleJSONRequestBody defines body for UpdateArticle for application/json ContentType.

type UpdateArticleRequest

type UpdateArticleRequest = externalRef0.UpdateArticleRequest

UpdateArticleRequest Only provided fields are updated.

type UpdateFeedEntryJSONRequestBody

type UpdateFeedEntryJSONRequestBody = externalRef0.UpdateFeedEntryRequest

UpdateFeedEntryJSONRequestBody defines body for UpdateFeedEntry for application/json ContentType.

type UpdateFeedEntryRequest

type UpdateFeedEntryRequest = externalRef0.UpdateFeedEntryRequest

UpdateFeedEntryRequest defines model for UpdateFeedEntryRequest.

type UpdateFeedJSONRequestBody

type UpdateFeedJSONRequestBody = externalRef0.UpdateFeedRequest

UpdateFeedJSONRequestBody defines body for UpdateFeed for application/json ContentType.

type UpdateFeedRequest

type UpdateFeedRequest = externalRef0.UpdateFeedRequest

UpdateFeedRequest defines model for UpdateFeedRequest.

type UpdateSchedulerJobJSONRequestBody

type UpdateSchedulerJobJSONRequestBody = externalRef0.JobInput

UpdateSchedulerJobJSONRequestBody defines body for UpdateSchedulerJob for application/json ContentType.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL