Documentation
¶
Overview ¶
Package openapi provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.5.1 DO NOT EDIT.
Package openapi provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.5.1 DO NOT EDIT.
Index ¶
- func Handler(si ServerInterface) http.Handler
- func HandlerFromMux(si ServerInterface, r chi.Router) http.Handler
- func HandlerFromMuxWithBaseURL(si ServerInterface, r chi.Router, baseURL string) http.Handler
- func HandlerWithOptions(si ServerInterface, options ChiServerOptions) http.Handler
- func NewCloneStoryRequest(server string, anthologyId AnthologyIdPath, storyId StoryPath, ...) (*http.Request, error)
- func NewCloneStoryRequestWithBody(server string, anthologyId AnthologyIdPath, storyId StoryPath, ...) (*http.Request, error)
- func NewCreateStoryRequest(server string, anthologyId AnthologyIdPath, storyId StoryPath, ...) (*http.Request, error)
- func NewCreateStoryRequestWithBody(server string, anthologyId AnthologyIdPath, storyId StoryPath, ...) (*http.Request, error)
- func NewDeleteStoryRequest(server string, anthologyId AnthologyIdPath, storyId StoryPath) (*http.Request, error)
- func NewListStoriesRequest(server string, anthologyId AnthologyIdPath, params *ListStoriesParams) (*http.Request, error)
- func NewListStoryChaptersRequest(server string, anthologyId AnthologyIdPath, storyId StoryPath, ...) (*http.Request, error)
- func NewPublishStoryRequest(server string, anthologyId AnthologyIdPath, storyId StoryPath) (*http.Request, error)
- func NewReadChapterArtifactRequest(server string, anthologyId AnthologyIdPath, storyId StoryPath, ...) (*http.Request, error)
- func NewReadChapterRequest(server string, anthologyId AnthologyIdPath, storyId StoryPath, ...) (*http.Request, error)
- func NewReadStoryRequest(server string, anthologyId AnthologyIdPath, storyId StoryPath, ...) (*http.Request, error)
- func NewUpsertChapterRequestWithBody(server string, anthologyId AnthologyIdPath, storyId StoryPath, ...) (*http.Request, error)
- type AnthologyId
- type AnthologyIdPath
- type AnthologyNotFound
- type AnthologyNotFoundJSONResponse
- type BadRequest
- type BadRequestJSONResponse
- type ChapterContentType
- type ChapterNotFound
- type ChapterNotFoundJSONResponse
- type ChapterOrdinal
- type ChapterPath
- type ChapterReadFilter
- func (t ChapterReadFilter) AsChapterReadFilterFirstBytes() (ChapterReadFilterFirstBytes, error)
- func (t ChapterReadFilter) AsChapterReadFilterJsonJq() (ChapterReadFilterJsonJq, error)
- func (t ChapterReadFilter) Discriminator() (string, error)
- func (t *ChapterReadFilter) FromChapterReadFilterFirstBytes(v ChapterReadFilterFirstBytes) error
- func (t *ChapterReadFilter) FromChapterReadFilterJsonJq(v ChapterReadFilterJsonJq) error
- func (t ChapterReadFilter) MarshalJSON() ([]byte, error)
- func (t *ChapterReadFilter) MergeChapterReadFilterFirstBytes(v ChapterReadFilterFirstBytes) error
- func (t *ChapterReadFilter) MergeChapterReadFilterJsonJq(v ChapterReadFilterJsonJq) error
- func (t *ChapterReadFilter) UnmarshalJSON(b []byte) error
- func (t ChapterReadFilter) ValueByDiscriminator() (interface{}, error)
- type ChapterReadFilterFirstBytes
- type ChapterReadFilterFirstBytesKind
- type ChapterReadFilterJsonJq
- type ChapterReadFilterJsonJqKind
- type ChapterSelector
- type ChiServerOptions
- type Client
- func (c *Client) CloneStory(ctx context.Context, anthologyId AnthologyIdPath, storyId StoryPath, ...) (*http.Response, error)
- func (c *Client) CloneStoryWithBody(ctx context.Context, anthologyId AnthologyIdPath, storyId StoryPath, ...) (*http.Response, error)
- func (c *Client) CreateStory(ctx context.Context, anthologyId AnthologyIdPath, storyId StoryPath, ...) (*http.Response, error)
- func (c *Client) CreateStoryWithBody(ctx context.Context, anthologyId AnthologyIdPath, storyId StoryPath, ...) (*http.Response, error)
- func (c *Client) DeleteStory(ctx context.Context, anthologyId AnthologyIdPath, storyId StoryPath, ...) (*http.Response, error)
- func (c *Client) ListStories(ctx context.Context, anthologyId AnthologyIdPath, params *ListStoriesParams, ...) (*http.Response, error)
- func (c *Client) ListStoryChapters(ctx context.Context, anthologyId AnthologyIdPath, storyId StoryPath, ...) (*http.Response, error)
- func (c *Client) PublishStory(ctx context.Context, anthologyId AnthologyIdPath, storyId StoryPath, ...) (*http.Response, error)
- func (c *Client) ReadChapter(ctx context.Context, anthologyId AnthologyIdPath, storyId StoryPath, ...) (*http.Response, error)
- func (c *Client) ReadChapterArtifact(ctx context.Context, anthologyId AnthologyIdPath, storyId StoryPath, ...) (*http.Response, error)
- func (c *Client) ReadStory(ctx context.Context, anthologyId AnthologyIdPath, storyId StoryPath, ...) (*http.Response, error)
- func (c *Client) UpsertChapterWithBody(ctx context.Context, anthologyId AnthologyIdPath, storyId StoryPath, ...) (*http.Response, error)
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- func (c *ClientWithResponses) CloneStoryWithBodyWithResponse(ctx context.Context, anthologyId AnthologyIdPath, storyId StoryPath, ...) (*CloneStoryResult, error)
- func (c *ClientWithResponses) CloneStoryWithResponse(ctx context.Context, anthologyId AnthologyIdPath, storyId StoryPath, ...) (*CloneStoryResult, error)
- func (c *ClientWithResponses) CreateStoryWithBodyWithResponse(ctx context.Context, anthologyId AnthologyIdPath, storyId StoryPath, ...) (*CreateStoryResult, error)
- func (c *ClientWithResponses) CreateStoryWithResponse(ctx context.Context, anthologyId AnthologyIdPath, storyId StoryPath, ...) (*CreateStoryResult, error)
- func (c *ClientWithResponses) DeleteStoryWithResponse(ctx context.Context, anthologyId AnthologyIdPath, storyId StoryPath, ...) (*DeleteStoryResult, error)
- func (c *ClientWithResponses) ListStoriesWithResponse(ctx context.Context, anthologyId AnthologyIdPath, params *ListStoriesParams, ...) (*ListStoriesResult, error)
- func (c *ClientWithResponses) ListStoryChaptersWithResponse(ctx context.Context, anthologyId AnthologyIdPath, storyId StoryPath, ...) (*ListStoryChaptersResult, error)
- func (c *ClientWithResponses) PublishStoryWithResponse(ctx context.Context, anthologyId AnthologyIdPath, storyId StoryPath, ...) (*PublishStoryResult, error)
- func (c *ClientWithResponses) ReadChapterArtifactWithResponse(ctx context.Context, anthologyId AnthologyIdPath, storyId StoryPath, ...) (*ReadChapterArtifactResult, error)
- func (c *ClientWithResponses) ReadChapterWithResponse(ctx context.Context, anthologyId AnthologyIdPath, storyId StoryPath, ...) (*ReadChapterResult, error)
- func (c *ClientWithResponses) ReadStoryWithResponse(ctx context.Context, anthologyId AnthologyIdPath, storyId StoryPath, ...) (*ReadStoryResult, error)
- func (c *ClientWithResponses) UpsertChapterWithBodyWithResponse(ctx context.Context, anthologyId AnthologyIdPath, storyId StoryPath, ...) (*UpsertChapterResult, error)
- type ClientWithResponsesInterface
- type CloneStory201JSONResponse
- type CloneStory201ResponseHeaders
- type CloneStory400JSONResponse
- type CloneStory404JSONResponse
- type CloneStory409JSONResponse
- type CloneStoryJSONRequestBody
- type CloneStoryRequest
- type CloneStoryRequestObject
- type CloneStoryResponseObject
- type CloneStoryResult
- type CreateStory201Response
- type CreateStory201ResponseHeaders
- type CreateStory400JSONResponse
- type CreateStory404JSONResponse
- type CreateStory409JSONResponse
- type CreateStoryJSONRequestBody
- type CreateStoryMultipartBody
- type CreateStoryMultipartRequestBody
- type CreateStoryParams
- type CreateStoryRequest
- type CreateStoryRequestObject
- type CreateStoryResponseObject
- type CreateStoryResult
- type DeleteStory204Response
- type DeleteStory404JSONResponse
- type DeleteStoryRequestObject
- type DeleteStoryResponseObject
- type DeleteStoryResult
- type ErrorResponse
- type HttpRequestDoer
- type Identifier
- type InvalidParamFormatError
- type ListChaptersResponse
- type ListStories200JSONResponse
- type ListStories404JSONResponse
- type ListStoriesParams
- type ListStoriesRequestObject
- type ListStoriesResponseObject
- type ListStoriesResult
- type ListStoryChapters200JSONResponse
- type ListStoryChapters404JSONResponse
- type ListStoryChaptersParams
- type ListStoryChaptersRequestObject
- type ListStoryChaptersResponseObject
- type ListStoryChaptersResult
- type MiddlewareFunc
- type PublishStory200JSONResponse
- type PublishStory404JSONResponse
- type PublishStory409JSONResponse
- type PublishStoryRequestObject
- type PublishStoryResponse
- type PublishStoryResponseObject
- type PublishStoryResponseStatus
- type PublishStoryResult
- type ReadChapter200JSONResponse
- type ReadChapter404JSONResponse
- type ReadChapterArtifact200ApplicationoctetStreamResponse
- type ReadChapterArtifact404Response
- type ReadChapterArtifactRequestObject
- type ReadChapterArtifactResponseObject
- type ReadChapterArtifactResult
- type ReadChapterParams
- type ReadChapterRequestObject
- type ReadChapterResponseObject
- type ReadChapterResult
- type ReadStory200ApplicationoctetStreamResponse
- type ReadStory200JSONResponse
- type ReadStory200ResponseHeaders
- type ReadStory200TextResponse
- type ReadStory404JSONResponse
- type ReadStoryParams
- type ReadStoryRequestObject
- type ReadStoryResponseObject
- type ReadStoryResult
- type RequestEditorFn
- type RequestId
- type RequestIdQuery
- type RequiredHeaderError
- type RequiredParamError
- type ServerInterface
- type ServerInterfaceWrapper
- func (siw *ServerInterfaceWrapper) CloneStory(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) CreateStory(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) DeleteStory(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListStories(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListStoryChapters(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) PublishStory(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ReadChapter(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ReadChapterArtifact(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ReadStory(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) UpsertChapter(w http.ResponseWriter, r *http.Request)
- type StoryAlreadyExists
- type StoryAlreadyExistsJSONResponse
- type StoryEnvelope
- type StoryId
- type StoryNotFound
- type StoryNotFoundJSONResponse
- type StoryPath
- type StoryPublished
- type StoryPublishedJSONResponse
- type StoryReadFilter
- func (t StoryReadFilter) AsStoryReadFilterFirstBytes() (StoryReadFilterFirstBytes, error)
- func (t StoryReadFilter) AsStoryReadFilterJsonJq() (StoryReadFilterJsonJq, error)
- func (t StoryReadFilter) Discriminator() (string, error)
- func (t *StoryReadFilter) FromStoryReadFilterFirstBytes(v StoryReadFilterFirstBytes) error
- func (t *StoryReadFilter) FromStoryReadFilterJsonJq(v StoryReadFilterJsonJq) error
- func (t StoryReadFilter) MarshalJSON() ([]byte, error)
- func (t *StoryReadFilter) MergeStoryReadFilterFirstBytes(v StoryReadFilterFirstBytes) error
- func (t *StoryReadFilter) MergeStoryReadFilterJsonJq(v StoryReadFilterJsonJq) error
- func (t *StoryReadFilter) UnmarshalJSON(b []byte) error
- func (t StoryReadFilter) ValueByDiscriminator() (interface{}, error)
- type StoryReadFilterFirstBytes
- type StoryReadFilterFirstBytesKind
- type StoryReadFilterJsonJq
- type StoryReadFilterJsonJqKind
- type StorySummary
- type StrictHTTPServerOptions
- type StrictHandlerFunc
- type StrictMiddlewareFunc
- type StrictServerInterface
- type TooManyValuesForParamError
- type UnescapedCookieParamError
- type Unimplemented
- func (_ Unimplemented) CloneStory(w http.ResponseWriter, r *http.Request, anthologyId AnthologyIdPath, ...)
- func (_ Unimplemented) CreateStory(w http.ResponseWriter, r *http.Request, anthologyId AnthologyIdPath, ...)
- func (_ Unimplemented) DeleteStory(w http.ResponseWriter, r *http.Request, anthologyId AnthologyIdPath, ...)
- func (_ Unimplemented) ListStories(w http.ResponseWriter, r *http.Request, anthologyId AnthologyIdPath, ...)
- func (_ Unimplemented) ListStoryChapters(w http.ResponseWriter, r *http.Request, anthologyId AnthologyIdPath, ...)
- func (_ Unimplemented) PublishStory(w http.ResponseWriter, r *http.Request, anthologyId AnthologyIdPath, ...)
- func (_ Unimplemented) ReadChapter(w http.ResponseWriter, r *http.Request, anthologyId AnthologyIdPath, ...)
- func (_ Unimplemented) ReadChapterArtifact(w http.ResponseWriter, r *http.Request, anthologyId AnthologyIdPath, ...)
- func (_ Unimplemented) ReadStory(w http.ResponseWriter, r *http.Request, anthologyId AnthologyIdPath, ...)
- func (_ Unimplemented) UpsertChapter(w http.ResponseWriter, r *http.Request, anthologyId AnthologyIdPath, ...)
- type UnmarshalingParamError
- type UpsertChapter200Response
- type UpsertChapter202Response
- type UpsertChapter400JSONResponse
- type UpsertChapter404JSONResponse
- type UpsertChapter409JSONResponse
- type UpsertChapterMultipartBody
- type UpsertChapterMultipartRequestBody
- type UpsertChapterParams
- type UpsertChapterRequestObject
- type UpsertChapterResponseObject
- type UpsertChapterResult
Constants ¶
This section is empty.
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, r chi.Router) http.Handler
HandlerFromMux creates http.Handler with routing matching OpenAPI spec based on the provided mux.
func HandlerWithOptions ¶
func HandlerWithOptions(si ServerInterface, options ChiServerOptions) http.Handler
HandlerWithOptions creates http.Handler with additional options
func NewCloneStoryRequest ¶
func NewCloneStoryRequest(server string, anthologyId AnthologyIdPath, storyId StoryPath, body CloneStoryJSONRequestBody) (*http.Request, error)
NewCloneStoryRequest calls the generic CloneStory builder with application/json body
func NewCloneStoryRequestWithBody ¶
func NewCloneStoryRequestWithBody(server string, anthologyId AnthologyIdPath, storyId StoryPath, contentType string, body io.Reader) (*http.Request, error)
NewCloneStoryRequestWithBody generates requests for CloneStory with any type of body
func NewCreateStoryRequest ¶
func NewCreateStoryRequest(server string, anthologyId AnthologyIdPath, storyId StoryPath, params *CreateStoryParams, body CreateStoryJSONRequestBody) (*http.Request, error)
NewCreateStoryRequest calls the generic CreateStory builder with application/json body
func NewCreateStoryRequestWithBody ¶
func NewCreateStoryRequestWithBody(server string, anthologyId AnthologyIdPath, storyId StoryPath, params *CreateStoryParams, contentType string, body io.Reader) (*http.Request, error)
NewCreateStoryRequestWithBody generates requests for CreateStory with any type of body
func NewDeleteStoryRequest ¶
func NewDeleteStoryRequest(server string, anthologyId AnthologyIdPath, storyId StoryPath) (*http.Request, error)
NewDeleteStoryRequest generates requests for DeleteStory
func NewListStoriesRequest ¶
func NewListStoriesRequest(server string, anthologyId AnthologyIdPath, params *ListStoriesParams) (*http.Request, error)
NewListStoriesRequest generates requests for ListStories
func NewListStoryChaptersRequest ¶
func NewListStoryChaptersRequest(server string, anthologyId AnthologyIdPath, storyId StoryPath, params *ListStoryChaptersParams) (*http.Request, error)
NewListStoryChaptersRequest generates requests for ListStoryChapters
func NewPublishStoryRequest ¶
func NewPublishStoryRequest(server string, anthologyId AnthologyIdPath, storyId StoryPath) (*http.Request, error)
NewPublishStoryRequest generates requests for PublishStory
func NewReadChapterArtifactRequest ¶
func NewReadChapterArtifactRequest(server string, anthologyId AnthologyIdPath, storyId StoryPath, selector ChapterPath, artifactName string) (*http.Request, error)
NewReadChapterArtifactRequest generates requests for ReadChapterArtifact
func NewReadChapterRequest ¶
func NewReadChapterRequest(server string, anthologyId AnthologyIdPath, storyId StoryPath, selector ChapterPath, params *ReadChapterParams) (*http.Request, error)
NewReadChapterRequest generates requests for ReadChapter
func NewReadStoryRequest ¶
func NewReadStoryRequest(server string, anthologyId AnthologyIdPath, storyId StoryPath, params *ReadStoryParams) (*http.Request, error)
NewReadStoryRequest generates requests for ReadStory
func NewUpsertChapterRequestWithBody ¶
func NewUpsertChapterRequestWithBody(server string, anthologyId AnthologyIdPath, storyId StoryPath, selector ChapterPath, params *UpsertChapterParams, contentType string, body io.Reader) (*http.Request, error)
NewUpsertChapterRequestWithBody generates requests for UpsertChapter with any type of body
Types ¶
type AnthologyId ¶
type AnthologyId = Identifier
AnthologyId Case-sensitive identifier (<= 36 characters) limited to characters matching [-_.a-zA-Z0-9]+.
type AnthologyIdPath ¶
type AnthologyIdPath = AnthologyId
AnthologyIdPath Anthology identifier scoped to the deployment.
type AnthologyNotFound ¶
type AnthologyNotFound = ErrorResponse
AnthologyNotFound defines model for AnthologyNotFound.
type AnthologyNotFoundJSONResponse ¶
type AnthologyNotFoundJSONResponse ErrorResponse
type BadRequestJSONResponse ¶
type BadRequestJSONResponse ErrorResponse
type ChapterContentType ¶
type ChapterContentType string
ChapterContentType Media type applied to chapter payloads. Only JSON content is supported.
const (
Applicationjson ChapterContentType = "application/json"
)
Defines values for ChapterContentType.
type ChapterNotFound ¶
type ChapterNotFound = ErrorResponse
ChapterNotFound defines model for ChapterNotFound.
type ChapterNotFoundJSONResponse ¶
type ChapterNotFoundJSONResponse ErrorResponse
type ChapterOrdinal ¶
type ChapterOrdinal = int
ChapterOrdinal Zero-based ordinal applied to a chapter within its story.
type ChapterPath ¶
type ChapterPath = ChapterSelector
ChapterPath Integer selector where non-negative values reference absolute ordinals and negative values walk backward from the latest chapter (-1 = most recent).
type ChapterReadFilter ¶
type ChapterReadFilter struct {
// contains filtered or unexported fields
}
ChapterReadFilter Filter to apply when reading a single chapter.
func (ChapterReadFilter) AsChapterReadFilterFirstBytes ¶
func (t ChapterReadFilter) AsChapterReadFilterFirstBytes() (ChapterReadFilterFirstBytes, error)
AsChapterReadFilterFirstBytes returns the union data inside the ChapterReadFilter as a ChapterReadFilterFirstBytes
func (ChapterReadFilter) AsChapterReadFilterJsonJq ¶
func (t ChapterReadFilter) AsChapterReadFilterJsonJq() (ChapterReadFilterJsonJq, error)
AsChapterReadFilterJsonJq returns the union data inside the ChapterReadFilter as a ChapterReadFilterJsonJq
func (ChapterReadFilter) Discriminator ¶
func (t ChapterReadFilter) Discriminator() (string, error)
func (*ChapterReadFilter) FromChapterReadFilterFirstBytes ¶
func (t *ChapterReadFilter) FromChapterReadFilterFirstBytes(v ChapterReadFilterFirstBytes) error
FromChapterReadFilterFirstBytes overwrites any union data inside the ChapterReadFilter as the provided ChapterReadFilterFirstBytes
func (*ChapterReadFilter) FromChapterReadFilterJsonJq ¶
func (t *ChapterReadFilter) FromChapterReadFilterJsonJq(v ChapterReadFilterJsonJq) error
FromChapterReadFilterJsonJq overwrites any union data inside the ChapterReadFilter as the provided ChapterReadFilterJsonJq
func (ChapterReadFilter) MarshalJSON ¶
func (t ChapterReadFilter) MarshalJSON() ([]byte, error)
func (*ChapterReadFilter) MergeChapterReadFilterFirstBytes ¶
func (t *ChapterReadFilter) MergeChapterReadFilterFirstBytes(v ChapterReadFilterFirstBytes) error
MergeChapterReadFilterFirstBytes performs a merge with any union data inside the ChapterReadFilter, using the provided ChapterReadFilterFirstBytes
func (*ChapterReadFilter) MergeChapterReadFilterJsonJq ¶
func (t *ChapterReadFilter) MergeChapterReadFilterJsonJq(v ChapterReadFilterJsonJq) error
MergeChapterReadFilterJsonJq performs a merge with any union data inside the ChapterReadFilter, using the provided ChapterReadFilterJsonJq
func (*ChapterReadFilter) UnmarshalJSON ¶
func (t *ChapterReadFilter) UnmarshalJSON(b []byte) error
func (ChapterReadFilter) ValueByDiscriminator ¶
func (t ChapterReadFilter) ValueByDiscriminator() (interface{}, error)
type ChapterReadFilterFirstBytes ¶
type ChapterReadFilterFirstBytes struct {
Kind ChapterReadFilterFirstBytesKind `json:"kind"`
// LimitBytes Number of bytes from the start of the chapter to return.
LimitBytes int `json:"limitBytes"`
}
ChapterReadFilterFirstBytes Returns only the first N bytes of the chapter payload.
type ChapterReadFilterFirstBytesKind ¶
type ChapterReadFilterFirstBytesKind string
ChapterReadFilterFirstBytesKind defines model for ChapterReadFilterFirstBytes.Kind.
const (
ChapterReadFilterFirstBytesKindFirstBytes ChapterReadFilterFirstBytesKind = "first_bytes"
)
Defines values for ChapterReadFilterFirstBytesKind.
type ChapterReadFilterJsonJq ¶
type ChapterReadFilterJsonJq struct {
Kind ChapterReadFilterJsonJqKind `json:"kind"`
// Program jq program executed against the chapter's JSON payload.
Program string `json:"program"`
}
ChapterReadFilterJsonJq Applies a jq program to the chapter payload. Only valid for JSON chapters.
type ChapterReadFilterJsonJqKind ¶
type ChapterReadFilterJsonJqKind string
ChapterReadFilterJsonJqKind defines model for ChapterReadFilterJsonJq.Kind.
const (
ChapterReadFilterJsonJqKindJsonJq ChapterReadFilterJsonJqKind = "json_jq"
)
Defines values for ChapterReadFilterJsonJqKind.
type ChapterSelector ¶
type ChapterSelector = int
ChapterSelector Integer selector where non-negative values reference absolute ordinals and negative values walk backward from the latest chapter (-1 = most recent).
type ChiServerOptions ¶
type ChiServerOptions struct {
BaseURL string
BaseRouter chi.Router
Middlewares []MiddlewareFunc
ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
}
type Client ¶
type Client struct {
// The endpoint of the server conforming to this interface, with scheme,
// https://api.deepmap.com for example. This can contain a path relative
// to the server, such as https://api.deepmap.com/dev-test, and all the
// paths in the swagger spec will be appended to the server.
Server string
// Doer for performing requests, typically a *http.Client with any
// customized settings, such as certificate chains.
Client HttpRequestDoer
// A list of callbacks for modifying requests which are generated before sending over
// the network.
RequestEditors []RequestEditorFn
}
Client which conforms to the OpenAPI3 specification for this service.
func NewClient ¶
func NewClient(server string, opts ...ClientOption) (*Client, error)
Creates a new Client, with reasonable defaults
func (*Client) CloneStory ¶
func (c *Client) CloneStory(ctx context.Context, anthologyId AnthologyIdPath, storyId StoryPath, body CloneStoryJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) CloneStoryWithBody ¶
func (*Client) CreateStory ¶
func (c *Client) CreateStory(ctx context.Context, anthologyId AnthologyIdPath, storyId StoryPath, params *CreateStoryParams, body CreateStoryJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) CreateStoryWithBody ¶
func (c *Client) CreateStoryWithBody(ctx context.Context, anthologyId AnthologyIdPath, storyId StoryPath, params *CreateStoryParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) DeleteStory ¶
func (c *Client) DeleteStory(ctx context.Context, anthologyId AnthologyIdPath, storyId StoryPath, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) ListStories ¶
func (c *Client) ListStories(ctx context.Context, anthologyId AnthologyIdPath, params *ListStoriesParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) ListStoryChapters ¶
func (c *Client) ListStoryChapters(ctx context.Context, anthologyId AnthologyIdPath, storyId StoryPath, params *ListStoryChaptersParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) PublishStory ¶
func (c *Client) PublishStory(ctx context.Context, anthologyId AnthologyIdPath, storyId StoryPath, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) ReadChapter ¶
func (c *Client) ReadChapter(ctx context.Context, anthologyId AnthologyIdPath, storyId StoryPath, selector ChapterPath, params *ReadChapterParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) ReadChapterArtifact ¶
func (c *Client) ReadChapterArtifact(ctx context.Context, anthologyId AnthologyIdPath, storyId StoryPath, selector ChapterPath, artifactName string, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) ReadStory ¶
func (c *Client) ReadStory(ctx context.Context, anthologyId AnthologyIdPath, storyId StoryPath, params *ReadStoryParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) UpsertChapterWithBody ¶
func (c *Client) UpsertChapterWithBody(ctx context.Context, anthologyId AnthologyIdPath, storyId StoryPath, selector ChapterPath, params *UpsertChapterParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
type ClientInterface ¶
type ClientInterface interface {
// ListStories request
ListStories(ctx context.Context, anthologyId AnthologyIdPath, params *ListStoriesParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// DeleteStory request
DeleteStory(ctx context.Context, anthologyId AnthologyIdPath, storyId StoryPath, reqEditors ...RequestEditorFn) (*http.Response, error)
// ReadStory request
ReadStory(ctx context.Context, anthologyId AnthologyIdPath, storyId StoryPath, params *ReadStoryParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// CreateStoryWithBody request with any body
CreateStoryWithBody(ctx context.Context, anthologyId AnthologyIdPath, storyId StoryPath, params *CreateStoryParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
CreateStory(ctx context.Context, anthologyId AnthologyIdPath, storyId StoryPath, params *CreateStoryParams, body CreateStoryJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// ListStoryChapters request
ListStoryChapters(ctx context.Context, anthologyId AnthologyIdPath, storyId StoryPath, params *ListStoryChaptersParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// ReadChapter request
ReadChapter(ctx context.Context, anthologyId AnthologyIdPath, storyId StoryPath, selector ChapterPath, params *ReadChapterParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// UpsertChapterWithBody request with any body
UpsertChapterWithBody(ctx context.Context, anthologyId AnthologyIdPath, storyId StoryPath, selector ChapterPath, params *UpsertChapterParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
// ReadChapterArtifact request
ReadChapterArtifact(ctx context.Context, anthologyId AnthologyIdPath, storyId StoryPath, selector ChapterPath, artifactName string, reqEditors ...RequestEditorFn) (*http.Response, error)
// CloneStoryWithBody request with any body
CloneStoryWithBody(ctx context.Context, anthologyId AnthologyIdPath, storyId StoryPath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
CloneStory(ctx context.Context, anthologyId AnthologyIdPath, storyId StoryPath, body CloneStoryJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// PublishStory request
PublishStory(ctx context.Context, anthologyId AnthologyIdPath, storyId StoryPath, reqEditors ...RequestEditorFn) (*http.Response, error)
}
The interface specification for the client above.
type ClientOption ¶
ClientOption allows setting custom parameters during construction
func WithHTTPClient ¶
func WithHTTPClient(doer HttpRequestDoer) ClientOption
WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.
func WithRequestEditorFn ¶
func WithRequestEditorFn(fn RequestEditorFn) ClientOption
WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.
type ClientWithResponses ¶
type ClientWithResponses struct {
ClientInterface
}
ClientWithResponses builds on ClientInterface to offer response payloads
func NewClientWithResponses ¶
func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error)
NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling
func (*ClientWithResponses) CloneStoryWithBodyWithResponse ¶
func (c *ClientWithResponses) CloneStoryWithBodyWithResponse(ctx context.Context, anthologyId AnthologyIdPath, storyId StoryPath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CloneStoryResult, error)
CloneStoryWithBodyWithResponse request with arbitrary body returning *CloneStoryResult
func (*ClientWithResponses) CloneStoryWithResponse ¶
func (c *ClientWithResponses) CloneStoryWithResponse(ctx context.Context, anthologyId AnthologyIdPath, storyId StoryPath, body CloneStoryJSONRequestBody, reqEditors ...RequestEditorFn) (*CloneStoryResult, error)
func (*ClientWithResponses) CreateStoryWithBodyWithResponse ¶
func (c *ClientWithResponses) CreateStoryWithBodyWithResponse(ctx context.Context, anthologyId AnthologyIdPath, storyId StoryPath, params *CreateStoryParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateStoryResult, error)
CreateStoryWithBodyWithResponse request with arbitrary body returning *CreateStoryResult
func (*ClientWithResponses) CreateStoryWithResponse ¶
func (c *ClientWithResponses) CreateStoryWithResponse(ctx context.Context, anthologyId AnthologyIdPath, storyId StoryPath, params *CreateStoryParams, body CreateStoryJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateStoryResult, error)
func (*ClientWithResponses) DeleteStoryWithResponse ¶
func (c *ClientWithResponses) DeleteStoryWithResponse(ctx context.Context, anthologyId AnthologyIdPath, storyId StoryPath, reqEditors ...RequestEditorFn) (*DeleteStoryResult, error)
DeleteStoryWithResponse request returning *DeleteStoryResult
func (*ClientWithResponses) ListStoriesWithResponse ¶
func (c *ClientWithResponses) ListStoriesWithResponse(ctx context.Context, anthologyId AnthologyIdPath, params *ListStoriesParams, reqEditors ...RequestEditorFn) (*ListStoriesResult, error)
ListStoriesWithResponse request returning *ListStoriesResult
func (*ClientWithResponses) ListStoryChaptersWithResponse ¶
func (c *ClientWithResponses) ListStoryChaptersWithResponse(ctx context.Context, anthologyId AnthologyIdPath, storyId StoryPath, params *ListStoryChaptersParams, reqEditors ...RequestEditorFn) (*ListStoryChaptersResult, error)
ListStoryChaptersWithResponse request returning *ListStoryChaptersResult
func (*ClientWithResponses) PublishStoryWithResponse ¶
func (c *ClientWithResponses) PublishStoryWithResponse(ctx context.Context, anthologyId AnthologyIdPath, storyId StoryPath, reqEditors ...RequestEditorFn) (*PublishStoryResult, error)
PublishStoryWithResponse request returning *PublishStoryResult
func (*ClientWithResponses) ReadChapterArtifactWithResponse ¶
func (c *ClientWithResponses) ReadChapterArtifactWithResponse(ctx context.Context, anthologyId AnthologyIdPath, storyId StoryPath, selector ChapterPath, artifactName string, reqEditors ...RequestEditorFn) (*ReadChapterArtifactResult, error)
ReadChapterArtifactWithResponse request returning *ReadChapterArtifactResult
func (*ClientWithResponses) ReadChapterWithResponse ¶
func (c *ClientWithResponses) ReadChapterWithResponse(ctx context.Context, anthologyId AnthologyIdPath, storyId StoryPath, selector ChapterPath, params *ReadChapterParams, reqEditors ...RequestEditorFn) (*ReadChapterResult, error)
ReadChapterWithResponse request returning *ReadChapterResult
func (*ClientWithResponses) ReadStoryWithResponse ¶
func (c *ClientWithResponses) ReadStoryWithResponse(ctx context.Context, anthologyId AnthologyIdPath, storyId StoryPath, params *ReadStoryParams, reqEditors ...RequestEditorFn) (*ReadStoryResult, error)
ReadStoryWithResponse request returning *ReadStoryResult
func (*ClientWithResponses) UpsertChapterWithBodyWithResponse ¶
func (c *ClientWithResponses) UpsertChapterWithBodyWithResponse(ctx context.Context, anthologyId AnthologyIdPath, storyId StoryPath, selector ChapterPath, params *UpsertChapterParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpsertChapterResult, error)
UpsertChapterWithBodyWithResponse request with arbitrary body returning *UpsertChapterResult
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface {
// ListStoriesWithResponse request
ListStoriesWithResponse(ctx context.Context, anthologyId AnthologyIdPath, params *ListStoriesParams, reqEditors ...RequestEditorFn) (*ListStoriesResult, error)
// DeleteStoryWithResponse request
DeleteStoryWithResponse(ctx context.Context, anthologyId AnthologyIdPath, storyId StoryPath, reqEditors ...RequestEditorFn) (*DeleteStoryResult, error)
// ReadStoryWithResponse request
ReadStoryWithResponse(ctx context.Context, anthologyId AnthologyIdPath, storyId StoryPath, params *ReadStoryParams, reqEditors ...RequestEditorFn) (*ReadStoryResult, error)
// CreateStoryWithBodyWithResponse request with any body
CreateStoryWithBodyWithResponse(ctx context.Context, anthologyId AnthologyIdPath, storyId StoryPath, params *CreateStoryParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateStoryResult, error)
CreateStoryWithResponse(ctx context.Context, anthologyId AnthologyIdPath, storyId StoryPath, params *CreateStoryParams, body CreateStoryJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateStoryResult, error)
// ListStoryChaptersWithResponse request
ListStoryChaptersWithResponse(ctx context.Context, anthologyId AnthologyIdPath, storyId StoryPath, params *ListStoryChaptersParams, reqEditors ...RequestEditorFn) (*ListStoryChaptersResult, error)
// ReadChapterWithResponse request
ReadChapterWithResponse(ctx context.Context, anthologyId AnthologyIdPath, storyId StoryPath, selector ChapterPath, params *ReadChapterParams, reqEditors ...RequestEditorFn) (*ReadChapterResult, error)
// UpsertChapterWithBodyWithResponse request with any body
UpsertChapterWithBodyWithResponse(ctx context.Context, anthologyId AnthologyIdPath, storyId StoryPath, selector ChapterPath, params *UpsertChapterParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpsertChapterResult, error)
// ReadChapterArtifactWithResponse request
ReadChapterArtifactWithResponse(ctx context.Context, anthologyId AnthologyIdPath, storyId StoryPath, selector ChapterPath, artifactName string, reqEditors ...RequestEditorFn) (*ReadChapterArtifactResult, error)
// CloneStoryWithBodyWithResponse request with any body
CloneStoryWithBodyWithResponse(ctx context.Context, anthologyId AnthologyIdPath, storyId StoryPath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CloneStoryResult, error)
CloneStoryWithResponse(ctx context.Context, anthologyId AnthologyIdPath, storyId StoryPath, body CloneStoryJSONRequestBody, reqEditors ...RequestEditorFn) (*CloneStoryResult, error)
// PublishStoryWithResponse request
PublishStoryWithResponse(ctx context.Context, anthologyId AnthologyIdPath, storyId StoryPath, reqEditors ...RequestEditorFn) (*PublishStoryResult, error)
}
ClientWithResponsesInterface is the interface specification for the client with responses above.
type CloneStory201JSONResponse ¶
type CloneStory201JSONResponse struct {
Body StoryEnvelope
Headers CloneStory201ResponseHeaders
}
func (CloneStory201JSONResponse) VisitCloneStoryResponse ¶
func (response CloneStory201JSONResponse) VisitCloneStoryResponse(w http.ResponseWriter) error
type CloneStory201ResponseHeaders ¶
type CloneStory201ResponseHeaders struct {
Location string
}
type CloneStory400JSONResponse ¶
type CloneStory400JSONResponse struct{ BadRequestJSONResponse }
func (CloneStory400JSONResponse) VisitCloneStoryResponse ¶
func (response CloneStory400JSONResponse) VisitCloneStoryResponse(w http.ResponseWriter) error
type CloneStory404JSONResponse ¶
type CloneStory404JSONResponse struct{ StoryNotFoundJSONResponse }
func (CloneStory404JSONResponse) VisitCloneStoryResponse ¶
func (response CloneStory404JSONResponse) VisitCloneStoryResponse(w http.ResponseWriter) error
type CloneStory409JSONResponse ¶
type CloneStory409JSONResponse struct{ StoryAlreadyExistsJSONResponse }
func (CloneStory409JSONResponse) VisitCloneStoryResponse ¶
func (response CloneStory409JSONResponse) VisitCloneStoryResponse(w http.ResponseWriter) error
type CloneStoryJSONRequestBody ¶
type CloneStoryJSONRequestBody = CloneStoryRequest
CloneStoryJSONRequestBody defines body for CloneStory for application/json ContentType.
type CloneStoryRequest ¶
type CloneStoryRequest struct {
// LastOrdinal Last ordinal from the source story to include.
LastOrdinal ChapterOrdinal `json:"lastOrdinal"`
// NewStoryId Identifier for the cloned story.
NewStoryId StoryId `json:"newStoryId"`
}
CloneStoryRequest defines model for CloneStoryRequest.
type CloneStoryRequestObject ¶
type CloneStoryRequestObject struct {
AnthologyId AnthologyIdPath `json:"anthologyId"`
StoryId StoryPath `json:"storyId"`
Body *CloneStoryJSONRequestBody
}
type CloneStoryResponseObject ¶
type CloneStoryResponseObject interface {
VisitCloneStoryResponse(w http.ResponseWriter) error
}
type CloneStoryResult ¶
type CloneStoryResult struct {
Body []byte
HTTPResponse *http.Response
JSON201 *StoryEnvelope
JSON400 *BadRequest
JSON404 *StoryNotFound
JSON409 *StoryAlreadyExists
}
func ParseCloneStoryResult ¶
func ParseCloneStoryResult(rsp *http.Response) (*CloneStoryResult, error)
ParseCloneStoryResult parses an HTTP response from a CloneStoryWithResponse call
func (CloneStoryResult) Status ¶
func (r CloneStoryResult) Status() string
Status returns HTTPResponse.Status
func (CloneStoryResult) StatusCode ¶
func (r CloneStoryResult) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type CreateStory201Response ¶
type CreateStory201Response struct {
Headers CreateStory201ResponseHeaders
}
func (CreateStory201Response) VisitCreateStoryResponse ¶
func (response CreateStory201Response) VisitCreateStoryResponse(w http.ResponseWriter) error
type CreateStory201ResponseHeaders ¶
type CreateStory201ResponseHeaders struct {
Location string
}
type CreateStory400JSONResponse ¶
type CreateStory400JSONResponse struct{ BadRequestJSONResponse }
func (CreateStory400JSONResponse) VisitCreateStoryResponse ¶
func (response CreateStory400JSONResponse) VisitCreateStoryResponse(w http.ResponseWriter) error
type CreateStory404JSONResponse ¶
type CreateStory404JSONResponse struct{ AnthologyNotFoundJSONResponse }
func (CreateStory404JSONResponse) VisitCreateStoryResponse ¶
func (response CreateStory404JSONResponse) VisitCreateStoryResponse(w http.ResponseWriter) error
type CreateStory409JSONResponse ¶
type CreateStory409JSONResponse struct{ StoryAlreadyExistsJSONResponse }
func (CreateStory409JSONResponse) VisitCreateStoryResponse ¶
func (response CreateStory409JSONResponse) VisitCreateStoryResponse(w http.ResponseWriter) error
type CreateStoryJSONRequestBody ¶
type CreateStoryJSONRequestBody = CreateStoryRequest
CreateStoryJSONRequestBody defines body for CreateStory for application/json ContentType.
type CreateStoryMultipartBody ¶
type CreateStoryMultipartBody struct {
// Chapter Chapter payload (<= 4 MiB) containing UTF-8 encoded JSON content.
Chapter *openapi_types.File `json:"chapter,omitempty"`
Metadata *CreateStoryRequest `json:"metadata,omitempty"`
}
CreateStoryMultipartBody defines parameters for CreateStory.
type CreateStoryMultipartRequestBody ¶
type CreateStoryMultipartRequestBody CreateStoryMultipartBody
CreateStoryMultipartRequestBody defines body for CreateStory for multipart/form-data ContentType.
type CreateStoryParams ¶
type CreateStoryParams struct {
// RequestId Optional UUID used to provide idempotent semantics for mutations.
RequestId *RequestIdQuery `form:"requestId,omitempty" json:"requestId,omitempty"`
}
CreateStoryParams defines parameters for CreateStory.
type CreateStoryRequest ¶
type CreateStoryRequest struct {
// Metadata Optional key-value metadata to associate with the story.
Metadata *map[string]interface{} `json:"metadata,omitempty"`
}
CreateStoryRequest defines model for CreateStoryRequest.
type CreateStoryRequestObject ¶
type CreateStoryRequestObject struct {
AnthologyId AnthologyIdPath `json:"anthologyId"`
StoryId StoryPath `json:"storyId"`
Params CreateStoryParams
JSONBody *CreateStoryJSONRequestBody
MultipartBody *multipart.Reader
}
type CreateStoryResponseObject ¶
type CreateStoryResponseObject interface {
VisitCreateStoryResponse(w http.ResponseWriter) error
}
type CreateStoryResult ¶
type CreateStoryResult struct {
Body []byte
HTTPResponse *http.Response
JSON400 *BadRequest
JSON404 *AnthologyNotFound
JSON409 *StoryAlreadyExists
}
func ParseCreateStoryResult ¶
func ParseCreateStoryResult(rsp *http.Response) (*CreateStoryResult, error)
ParseCreateStoryResult parses an HTTP response from a CreateStoryWithResponse call
func (CreateStoryResult) Status ¶
func (r CreateStoryResult) Status() string
Status returns HTTPResponse.Status
func (CreateStoryResult) StatusCode ¶
func (r CreateStoryResult) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type DeleteStory204Response ¶
type DeleteStory204Response struct {
}
func (DeleteStory204Response) VisitDeleteStoryResponse ¶
func (response DeleteStory204Response) VisitDeleteStoryResponse(w http.ResponseWriter) error
type DeleteStory404JSONResponse ¶
type DeleteStory404JSONResponse struct{ StoryNotFoundJSONResponse }
func (DeleteStory404JSONResponse) VisitDeleteStoryResponse ¶
func (response DeleteStory404JSONResponse) VisitDeleteStoryResponse(w http.ResponseWriter) error
type DeleteStoryRequestObject ¶
type DeleteStoryRequestObject struct {
AnthologyId AnthologyIdPath `json:"anthologyId"`
StoryId StoryPath `json:"storyId"`
}
type DeleteStoryResponseObject ¶
type DeleteStoryResponseObject interface {
VisitDeleteStoryResponse(w http.ResponseWriter) error
}
type DeleteStoryResult ¶
type DeleteStoryResult struct {
Body []byte
HTTPResponse *http.Response
JSON404 *StoryNotFound
}
func ParseDeleteStoryResult ¶
func ParseDeleteStoryResult(rsp *http.Response) (*DeleteStoryResult, error)
ParseDeleteStoryResult parses an HTTP response from a DeleteStoryWithResponse call
func (DeleteStoryResult) Status ¶
func (r DeleteStoryResult) Status() string
Status returns HTTPResponse.Status
func (DeleteStoryResult) StatusCode ¶
func (r DeleteStoryResult) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ErrorResponse ¶
type ErrorResponse struct {
Code string `json:"code"`
Details *map[string]interface{} `json:"details,omitempty"`
Message string `json:"message"`
}
ErrorResponse defines model for ErrorResponse.
type HttpRequestDoer ¶
Doer performs HTTP requests.
The standard http.Client implements this interface.
type Identifier ¶
type Identifier = string
Identifier Case-sensitive identifier (<= 36 characters) limited to characters matching [-_.a-zA-Z0-9]+.
type InvalidParamFormatError ¶
func (*InvalidParamFormatError) Error ¶
func (e *InvalidParamFormatError) Error() string
func (*InvalidParamFormatError) Unwrap ¶
func (e *InvalidParamFormatError) Unwrap() error
type ListChaptersResponse ¶
type ListChaptersResponse struct {
// Chapters Ordered chapter ordinals for the story.
Chapters []ChapterOrdinal `json:"chapters"`
// NextPageToken Cursor for fetching the next page of chapter identifiers.
NextPageToken *string `json:"nextPageToken,omitempty"`
}
ListChaptersResponse defines model for ListChaptersResponse.
type ListStories200JSONResponse ¶
type ListStories200JSONResponse struct {
// NextPageToken Cursor for fetching the next page of results.
NextPageToken *string `json:"nextPageToken,omitempty"`
Stories []StorySummary `json:"stories"`
}
func (ListStories200JSONResponse) VisitListStoriesResponse ¶
func (response ListStories200JSONResponse) VisitListStoriesResponse(w http.ResponseWriter) error
type ListStories404JSONResponse ¶
type ListStories404JSONResponse struct{ AnthologyNotFoundJSONResponse }
func (ListStories404JSONResponse) VisitListStoriesResponse ¶
func (response ListStories404JSONResponse) VisitListStoriesResponse(w http.ResponseWriter) error
type ListStoriesParams ¶
type ListStoriesParams struct {
// PageSize Maximum number of results to return.
PageSize *int `form:"pageSize,omitempty" json:"pageSize,omitempty"`
// PageToken Cursor returned from a previous list invocation.
PageToken *string `form:"pageToken,omitempty" json:"pageToken,omitempty"`
}
ListStoriesParams defines parameters for ListStories.
type ListStoriesRequestObject ¶
type ListStoriesRequestObject struct {
AnthologyId AnthologyIdPath `json:"anthologyId"`
Params ListStoriesParams
}
type ListStoriesResponseObject ¶
type ListStoriesResponseObject interface {
VisitListStoriesResponse(w http.ResponseWriter) error
}
type ListStoriesResult ¶
type ListStoriesResult struct {
Body []byte
HTTPResponse *http.Response
JSON200 *struct {
// NextPageToken Cursor for fetching the next page of results.
NextPageToken *string `json:"nextPageToken,omitempty"`
Stories []StorySummary `json:"stories"`
}
JSON404 *AnthologyNotFound
}
func ParseListStoriesResult ¶
func ParseListStoriesResult(rsp *http.Response) (*ListStoriesResult, error)
ParseListStoriesResult parses an HTTP response from a ListStoriesWithResponse call
func (ListStoriesResult) Status ¶
func (r ListStoriesResult) Status() string
Status returns HTTPResponse.Status
func (ListStoriesResult) StatusCode ¶
func (r ListStoriesResult) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ListStoryChapters200JSONResponse ¶
type ListStoryChapters200JSONResponse ListChaptersResponse
func (ListStoryChapters200JSONResponse) VisitListStoryChaptersResponse ¶
func (response ListStoryChapters200JSONResponse) VisitListStoryChaptersResponse(w http.ResponseWriter) error
type ListStoryChapters404JSONResponse ¶
type ListStoryChapters404JSONResponse struct{ StoryNotFoundJSONResponse }
func (ListStoryChapters404JSONResponse) VisitListStoryChaptersResponse ¶
func (response ListStoryChapters404JSONResponse) VisitListStoryChaptersResponse(w http.ResponseWriter) error
type ListStoryChaptersParams ¶
type ListStoryChaptersParams struct {
// PageSize Maximum number of chapter identifiers to return.
PageSize *int `form:"pageSize,omitempty" json:"pageSize,omitempty"`
// PageToken Cursor returned from a previous chapter listing.
PageToken *string `form:"pageToken,omitempty" json:"pageToken,omitempty"`
}
ListStoryChaptersParams defines parameters for ListStoryChapters.
type ListStoryChaptersRequestObject ¶
type ListStoryChaptersRequestObject struct {
AnthologyId AnthologyIdPath `json:"anthologyId"`
StoryId StoryPath `json:"storyId"`
Params ListStoryChaptersParams
}
type ListStoryChaptersResponseObject ¶
type ListStoryChaptersResponseObject interface {
VisitListStoryChaptersResponse(w http.ResponseWriter) error
}
type ListStoryChaptersResult ¶
type ListStoryChaptersResult struct {
Body []byte
HTTPResponse *http.Response
JSON200 *ListChaptersResponse
JSON404 *StoryNotFound
}
func ParseListStoryChaptersResult ¶
func ParseListStoryChaptersResult(rsp *http.Response) (*ListStoryChaptersResult, error)
ParseListStoryChaptersResult parses an HTTP response from a ListStoryChaptersWithResponse call
func (ListStoryChaptersResult) Status ¶
func (r ListStoryChaptersResult) Status() string
Status returns HTTPResponse.Status
func (ListStoryChaptersResult) StatusCode ¶
func (r ListStoryChaptersResult) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type PublishStory200JSONResponse ¶
type PublishStory200JSONResponse PublishStoryResponse
func (PublishStory200JSONResponse) VisitPublishStoryResponse ¶
func (response PublishStory200JSONResponse) VisitPublishStoryResponse(w http.ResponseWriter) error
type PublishStory404JSONResponse ¶
type PublishStory404JSONResponse struct{ StoryNotFoundJSONResponse }
func (PublishStory404JSONResponse) VisitPublishStoryResponse ¶
func (response PublishStory404JSONResponse) VisitPublishStoryResponse(w http.ResponseWriter) error
type PublishStory409JSONResponse ¶
type PublishStory409JSONResponse struct{ StoryPublishedJSONResponse }
func (PublishStory409JSONResponse) VisitPublishStoryResponse ¶
func (response PublishStory409JSONResponse) VisitPublishStoryResponse(w http.ResponseWriter) error
type PublishStoryRequestObject ¶
type PublishStoryRequestObject struct {
AnthologyId AnthologyIdPath `json:"anthologyId"`
StoryId StoryPath `json:"storyId"`
}
type PublishStoryResponse ¶
type PublishStoryResponse struct {
// ContentType Media type applied to chapter payloads. Only JSON content is supported.
ContentType *ChapterContentType `json:"contentType,omitempty"`
PublishedAt *time.Time `json:"publishedAt,omitempty"`
Status PublishStoryResponseStatus `json:"status"`
}
PublishStoryResponse defines model for PublishStoryResponse.
type PublishStoryResponseObject ¶
type PublishStoryResponseObject interface {
VisitPublishStoryResponse(w http.ResponseWriter) error
}
type PublishStoryResponseStatus ¶
type PublishStoryResponseStatus string
PublishStoryResponseStatus defines model for PublishStoryResponse.Status.
const (
Ok PublishStoryResponseStatus = "ok"
)
Defines values for PublishStoryResponseStatus.
type PublishStoryResult ¶
type PublishStoryResult struct {
Body []byte
HTTPResponse *http.Response
JSON200 *PublishStoryResponse
JSON404 *StoryNotFound
JSON409 *StoryPublished
}
func ParsePublishStoryResult ¶
func ParsePublishStoryResult(rsp *http.Response) (*PublishStoryResult, error)
ParsePublishStoryResult parses an HTTP response from a PublishStoryWithResponse call
func (PublishStoryResult) Status ¶
func (r PublishStoryResult) Status() string
Status returns HTTPResponse.Status
func (PublishStoryResult) StatusCode ¶
func (r PublishStoryResult) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ReadChapter200JSONResponse ¶
type ReadChapter200JSONResponse struct {
Artifacts []struct {
// Data Base64 payload when the artifact was included inline.
Data *string `json:"data,omitempty"`
// Excluded Present and true when the artifact body was omitted from the response.
Excluded *bool `json:"excluded,omitempty"`
Name string `json:"name"`
// Sha256 Lowercase hex-encoded SHA-256 of the artifact body (64 chars).
Sha256 string `json:"sha256"`
SizeBytes int64 `json:"size_bytes"`
} `json:"artifacts"`
// ChapterJson JSON body of the chapter.
ChapterJson interface{} `json:"chapter_json"`
}
func (ReadChapter200JSONResponse) VisitReadChapterResponse ¶
func (response ReadChapter200JSONResponse) VisitReadChapterResponse(w http.ResponseWriter) error
type ReadChapter404JSONResponse ¶
type ReadChapter404JSONResponse struct{ ChapterNotFoundJSONResponse }
func (ReadChapter404JSONResponse) VisitReadChapterResponse ¶
func (response ReadChapter404JSONResponse) VisitReadChapterResponse(w http.ResponseWriter) error
type ReadChapterArtifact200ApplicationoctetStreamResponse ¶
type ReadChapterArtifact200ApplicationoctetStreamResponse struct {
Body io.Reader
ContentLength int64
}
func (ReadChapterArtifact200ApplicationoctetStreamResponse) VisitReadChapterArtifactResponse ¶
func (response ReadChapterArtifact200ApplicationoctetStreamResponse) VisitReadChapterArtifactResponse(w http.ResponseWriter) error
type ReadChapterArtifact404Response ¶
type ReadChapterArtifact404Response struct {
}
func (ReadChapterArtifact404Response) VisitReadChapterArtifactResponse ¶
func (response ReadChapterArtifact404Response) VisitReadChapterArtifactResponse(w http.ResponseWriter) error
type ReadChapterArtifactRequestObject ¶
type ReadChapterArtifactRequestObject struct {
AnthologyId AnthologyIdPath `json:"anthologyId"`
StoryId StoryPath `json:"storyId"`
Selector ChapterPath `json:"selector"`
ArtifactName string `json:"artifactName"`
}
type ReadChapterArtifactResponseObject ¶
type ReadChapterArtifactResponseObject interface {
VisitReadChapterArtifactResponse(w http.ResponseWriter) error
}
type ReadChapterArtifactResult ¶
func ParseReadChapterArtifactResult ¶
func ParseReadChapterArtifactResult(rsp *http.Response) (*ReadChapterArtifactResult, error)
ParseReadChapterArtifactResult parses an HTTP response from a ReadChapterArtifactWithResponse call
func (ReadChapterArtifactResult) Status ¶
func (r ReadChapterArtifactResult) Status() string
Status returns HTTPResponse.Status
func (ReadChapterArtifactResult) StatusCode ¶
func (r ReadChapterArtifactResult) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ReadChapterParams ¶
type ReadChapterParams struct {
Filter *ChapterReadFilter `form:"filter,omitempty" json:"filter,omitempty"`
}
ReadChapterParams defines parameters for ReadChapter.
type ReadChapterRequestObject ¶
type ReadChapterRequestObject struct {
AnthologyId AnthologyIdPath `json:"anthologyId"`
StoryId StoryPath `json:"storyId"`
Selector ChapterPath `json:"selector"`
Params ReadChapterParams
}
type ReadChapterResponseObject ¶
type ReadChapterResponseObject interface {
VisitReadChapterResponse(w http.ResponseWriter) error
}
type ReadChapterResult ¶
type ReadChapterResult struct {
Body []byte
HTTPResponse *http.Response
JSON200 *struct {
Artifacts []struct {
// Data Base64 payload when the artifact was included inline.
Data *string `json:"data,omitempty"`
// Excluded Present and true when the artifact body was omitted from the response.
Excluded *bool `json:"excluded,omitempty"`
Name string `json:"name"`
// Sha256 Lowercase hex-encoded SHA-256 of the artifact body (64 chars).
Sha256 string `json:"sha256"`
SizeBytes int64 `json:"size_bytes"`
} `json:"artifacts"`
// ChapterJson JSON body of the chapter.
ChapterJson interface{} `json:"chapter_json"`
}
JSON404 *ChapterNotFound
}
func ParseReadChapterResult ¶
func ParseReadChapterResult(rsp *http.Response) (*ReadChapterResult, error)
ParseReadChapterResult parses an HTTP response from a ReadChapterWithResponse call
func (ReadChapterResult) Status ¶
func (r ReadChapterResult) Status() string
Status returns HTTPResponse.Status
func (ReadChapterResult) StatusCode ¶
func (r ReadChapterResult) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ReadStory200ApplicationoctetStreamResponse ¶
type ReadStory200ApplicationoctetStreamResponse struct {
Body io.Reader
Headers ReadStory200ResponseHeaders
ContentLength int64
}
func (ReadStory200ApplicationoctetStreamResponse) VisitReadStoryResponse ¶
func (response ReadStory200ApplicationoctetStreamResponse) VisitReadStoryResponse(w http.ResponseWriter) error
type ReadStory200JSONResponse ¶
type ReadStory200JSONResponse struct {
Body interface{}
Headers ReadStory200ResponseHeaders
}
func (ReadStory200JSONResponse) VisitReadStoryResponse ¶
func (response ReadStory200JSONResponse) VisitReadStoryResponse(w http.ResponseWriter) error
type ReadStory200ResponseHeaders ¶
type ReadStory200ResponseHeaders struct {
StrataStoryPublished bool
}
type ReadStory200TextResponse ¶
type ReadStory200TextResponse struct {
Body string
Headers ReadStory200ResponseHeaders
}
func (ReadStory200TextResponse) VisitReadStoryResponse ¶
func (response ReadStory200TextResponse) VisitReadStoryResponse(w http.ResponseWriter) error
type ReadStory404JSONResponse ¶
type ReadStory404JSONResponse struct{ StoryNotFoundJSONResponse }
func (ReadStory404JSONResponse) VisitReadStoryResponse ¶
func (response ReadStory404JSONResponse) VisitReadStoryResponse(w http.ResponseWriter) error
type ReadStoryParams ¶
type ReadStoryParams struct {
Filter *StoryReadFilter `form:"filter,omitempty" json:"filter,omitempty"`
}
ReadStoryParams defines parameters for ReadStory.
type ReadStoryRequestObject ¶
type ReadStoryRequestObject struct {
AnthologyId AnthologyIdPath `json:"anthologyId"`
StoryId StoryPath `json:"storyId"`
Params ReadStoryParams
}
type ReadStoryResponseObject ¶
type ReadStoryResponseObject interface {
VisitReadStoryResponse(w http.ResponseWriter) error
}
type ReadStoryResult ¶
type ReadStoryResult struct {
Body []byte
HTTPResponse *http.Response
JSON200 *interface{}
JSON404 *StoryNotFound
}
func ParseReadStoryResult ¶
func ParseReadStoryResult(rsp *http.Response) (*ReadStoryResult, error)
ParseReadStoryResult parses an HTTP response from a ReadStoryWithResponse call
func (ReadStoryResult) Status ¶
func (r ReadStoryResult) Status() string
Status returns HTTPResponse.Status
func (ReadStoryResult) StatusCode ¶
func (r ReadStoryResult) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type RequestEditorFn ¶
RequestEditorFn is the function signature for the RequestEditor callback function
type RequestId ¶
type RequestId = openapi_types.UUID
RequestId Caller-supplied UUID that enables idempotent mutation retries.
type RequestIdQuery ¶
type RequestIdQuery = RequestId
RequestIdQuery Caller-supplied UUID that enables idempotent mutation retries.
type RequiredHeaderError ¶
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 ServerInterface ¶
type ServerInterface interface {
// List stories
// (GET /anthologies/{anthologyId}/stories)
ListStories(w http.ResponseWriter, r *http.Request, anthologyId AnthologyIdPath, params ListStoriesParams)
// Delete story
// (DELETE /anthologies/{anthologyId}/stories/{storyId})
DeleteStory(w http.ResponseWriter, r *http.Request, anthologyId AnthologyIdPath, storyId StoryPath)
// Read story
// (GET /anthologies/{anthologyId}/stories/{storyId})
ReadStory(w http.ResponseWriter, r *http.Request, anthologyId AnthologyIdPath, storyId StoryPath, params ReadStoryParams)
// Create story
// (PUT /anthologies/{anthologyId}/stories/{storyId})
CreateStory(w http.ResponseWriter, r *http.Request, anthologyId AnthologyIdPath, storyId StoryPath, params CreateStoryParams)
// List story chapters
// (GET /anthologies/{anthologyId}/stories/{storyId}/chapters)
ListStoryChapters(w http.ResponseWriter, r *http.Request, anthologyId AnthologyIdPath, storyId StoryPath, params ListStoryChaptersParams)
// Read story chapter
// (GET /anthologies/{anthologyId}/stories/{storyId}/chapters/{selector})
ReadChapter(w http.ResponseWriter, r *http.Request, anthologyId AnthologyIdPath, storyId StoryPath, selector ChapterPath, params ReadChapterParams)
// Upload story chapter by ordinal
// (PUT /anthologies/{anthologyId}/stories/{storyId}/chapters/{selector})
UpsertChapter(w http.ResponseWriter, r *http.Request, anthologyId AnthologyIdPath, storyId StoryPath, selector ChapterPath, params UpsertChapterParams)
// Download chapter artifact
// (GET /anthologies/{anthologyId}/stories/{storyId}/chapters/{selector}/artifacts/{artifactName})
ReadChapterArtifact(w http.ResponseWriter, r *http.Request, anthologyId AnthologyIdPath, storyId StoryPath, selector ChapterPath, artifactName string)
// Clone story
// (POST /anthologies/{anthologyId}/stories/{storyId}/clone)
CloneStory(w http.ResponseWriter, r *http.Request, anthologyId AnthologyIdPath, storyId StoryPath)
// Publish story
// (POST /anthologies/{anthologyId}/stories/{storyId}/publish)
PublishStory(w http.ResponseWriter, r *http.Request, anthologyId AnthologyIdPath, storyId StoryPath)
}
ServerInterface represents all server handlers.
func NewStrictHandler ¶
func NewStrictHandler(ssi StrictServerInterface, middlewares []StrictMiddlewareFunc) ServerInterface
func NewStrictHandlerWithOptions ¶
func NewStrictHandlerWithOptions(ssi StrictServerInterface, middlewares []StrictMiddlewareFunc, options StrictHTTPServerOptions) ServerInterface
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) CloneStory ¶
func (siw *ServerInterfaceWrapper) CloneStory(w http.ResponseWriter, r *http.Request)
CloneStory operation middleware
func (*ServerInterfaceWrapper) CreateStory ¶
func (siw *ServerInterfaceWrapper) CreateStory(w http.ResponseWriter, r *http.Request)
CreateStory operation middleware
func (*ServerInterfaceWrapper) DeleteStory ¶
func (siw *ServerInterfaceWrapper) DeleteStory(w http.ResponseWriter, r *http.Request)
DeleteStory operation middleware
func (*ServerInterfaceWrapper) ListStories ¶
func (siw *ServerInterfaceWrapper) ListStories(w http.ResponseWriter, r *http.Request)
ListStories operation middleware
func (*ServerInterfaceWrapper) ListStoryChapters ¶
func (siw *ServerInterfaceWrapper) ListStoryChapters(w http.ResponseWriter, r *http.Request)
ListStoryChapters operation middleware
func (*ServerInterfaceWrapper) PublishStory ¶
func (siw *ServerInterfaceWrapper) PublishStory(w http.ResponseWriter, r *http.Request)
PublishStory operation middleware
func (*ServerInterfaceWrapper) ReadChapter ¶
func (siw *ServerInterfaceWrapper) ReadChapter(w http.ResponseWriter, r *http.Request)
ReadChapter operation middleware
func (*ServerInterfaceWrapper) ReadChapterArtifact ¶
func (siw *ServerInterfaceWrapper) ReadChapterArtifact(w http.ResponseWriter, r *http.Request)
ReadChapterArtifact operation middleware
func (*ServerInterfaceWrapper) ReadStory ¶
func (siw *ServerInterfaceWrapper) ReadStory(w http.ResponseWriter, r *http.Request)
ReadStory operation middleware
func (*ServerInterfaceWrapper) UpsertChapter ¶
func (siw *ServerInterfaceWrapper) UpsertChapter(w http.ResponseWriter, r *http.Request)
UpsertChapter operation middleware
type StoryAlreadyExists ¶
type StoryAlreadyExists = ErrorResponse
StoryAlreadyExists defines model for StoryAlreadyExists.
type StoryAlreadyExistsJSONResponse ¶
type StoryAlreadyExistsJSONResponse ErrorResponse
type StoryEnvelope ¶
type StoryEnvelope struct {
// AnthologyId Anthology identifier scoped to the deployment.
AnthologyId AnthologyId `json:"anthologyId"`
Finalized bool `json:"finalized"`
LatestOrdinal nullable.Nullable[ChapterOrdinal] `json:"latestOrdinal,omitempty"`
// StoryId Story identifier scoped to its anthology.
StoryId StoryId `json:"storyId"`
}
StoryEnvelope defines model for StoryEnvelope.
type StoryId ¶
type StoryId = Identifier
StoryId Case-sensitive identifier (<= 36 characters) limited to characters matching [-_.a-zA-Z0-9]+.
type StoryNotFound ¶
type StoryNotFound = ErrorResponse
StoryNotFound defines model for StoryNotFound.
type StoryNotFoundJSONResponse ¶
type StoryNotFoundJSONResponse ErrorResponse
type StoryPublished ¶
type StoryPublished = ErrorResponse
StoryPublished defines model for StoryPublished.
type StoryPublishedJSONResponse ¶
type StoryPublishedJSONResponse ErrorResponse
type StoryReadFilter ¶
type StoryReadFilter struct {
// contains filtered or unexported fields
}
StoryReadFilter Filter to apply when reading a story.
func (StoryReadFilter) AsStoryReadFilterFirstBytes ¶
func (t StoryReadFilter) AsStoryReadFilterFirstBytes() (StoryReadFilterFirstBytes, error)
AsStoryReadFilterFirstBytes returns the union data inside the StoryReadFilter as a StoryReadFilterFirstBytes
func (StoryReadFilter) AsStoryReadFilterJsonJq ¶
func (t StoryReadFilter) AsStoryReadFilterJsonJq() (StoryReadFilterJsonJq, error)
AsStoryReadFilterJsonJq returns the union data inside the StoryReadFilter as a StoryReadFilterJsonJq
func (StoryReadFilter) Discriminator ¶
func (t StoryReadFilter) Discriminator() (string, error)
func (*StoryReadFilter) FromStoryReadFilterFirstBytes ¶
func (t *StoryReadFilter) FromStoryReadFilterFirstBytes(v StoryReadFilterFirstBytes) error
FromStoryReadFilterFirstBytes overwrites any union data inside the StoryReadFilter as the provided StoryReadFilterFirstBytes
func (*StoryReadFilter) FromStoryReadFilterJsonJq ¶
func (t *StoryReadFilter) FromStoryReadFilterJsonJq(v StoryReadFilterJsonJq) error
FromStoryReadFilterJsonJq overwrites any union data inside the StoryReadFilter as the provided StoryReadFilterJsonJq
func (StoryReadFilter) MarshalJSON ¶
func (t StoryReadFilter) MarshalJSON() ([]byte, error)
func (*StoryReadFilter) MergeStoryReadFilterFirstBytes ¶
func (t *StoryReadFilter) MergeStoryReadFilterFirstBytes(v StoryReadFilterFirstBytes) error
MergeStoryReadFilterFirstBytes performs a merge with any union data inside the StoryReadFilter, using the provided StoryReadFilterFirstBytes
func (*StoryReadFilter) MergeStoryReadFilterJsonJq ¶
func (t *StoryReadFilter) MergeStoryReadFilterJsonJq(v StoryReadFilterJsonJq) error
MergeStoryReadFilterJsonJq performs a merge with any union data inside the StoryReadFilter, using the provided StoryReadFilterJsonJq
func (*StoryReadFilter) UnmarshalJSON ¶
func (t *StoryReadFilter) UnmarshalJSON(b []byte) error
func (StoryReadFilter) ValueByDiscriminator ¶
func (t StoryReadFilter) ValueByDiscriminator() (interface{}, error)
type StoryReadFilterFirstBytes ¶
type StoryReadFilterFirstBytes struct {
Kind StoryReadFilterFirstBytesKind `json:"kind"`
// LimitBytes Number of bytes from the start of the response to return.
LimitBytes int `json:"limitBytes"`
}
StoryReadFilterFirstBytes Returns only the first N bytes of the aggregated story output.
type StoryReadFilterFirstBytesKind ¶
type StoryReadFilterFirstBytesKind string
StoryReadFilterFirstBytesKind defines model for StoryReadFilterFirstBytes.Kind.
const (
StoryReadFilterFirstBytesKindFirstBytes StoryReadFilterFirstBytesKind = "first_bytes"
)
Defines values for StoryReadFilterFirstBytesKind.
type StoryReadFilterJsonJq ¶
type StoryReadFilterJsonJq struct {
Kind StoryReadFilterJsonJqKind `json:"kind"`
// Program jq program executed independently against each chapter's JSON payload.
Program string `json:"program"`
}
StoryReadFilterJsonJq Applies a jq program to each JSON chapter before aggregation.
type StoryReadFilterJsonJqKind ¶
type StoryReadFilterJsonJqKind string
StoryReadFilterJsonJqKind defines model for StoryReadFilterJsonJq.Kind.
const (
StoryReadFilterJsonJqKindJsonJq StoryReadFilterJsonJqKind = "json_jq"
)
Defines values for StoryReadFilterJsonJqKind.
type StorySummary ¶
type StorySummary struct {
// AnthologyId Anthology identifier scoped to the deployment.
AnthologyId AnthologyId `json:"anthologyId"`
CreatedAt *time.Time `json:"createdAt,omitempty"`
Finalized bool `json:"finalized"`
LatestOrdinal nullable.Nullable[ChapterOrdinal] `json:"latestOrdinal,omitempty"`
// StoryId Story identifier scoped to its anthology.
StoryId StoryId `json:"storyId"`
UpdatedAt *time.Time `json:"updatedAt,omitempty"`
}
StorySummary defines model for StorySummary.
type StrictHTTPServerOptions ¶
type StrictHTTPServerOptions struct {
RequestErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
ResponseErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
}
type StrictHandlerFunc ¶
type StrictHandlerFunc = strictnethttp.StrictHTTPHandlerFunc
type StrictMiddlewareFunc ¶
type StrictMiddlewareFunc = strictnethttp.StrictHTTPMiddlewareFunc
type StrictServerInterface ¶
type StrictServerInterface interface {
// List stories
// (GET /anthologies/{anthologyId}/stories)
ListStories(ctx context.Context, request ListStoriesRequestObject) (ListStoriesResponseObject, error)
// Delete story
// (DELETE /anthologies/{anthologyId}/stories/{storyId})
DeleteStory(ctx context.Context, request DeleteStoryRequestObject) (DeleteStoryResponseObject, error)
// Read story
// (GET /anthologies/{anthologyId}/stories/{storyId})
ReadStory(ctx context.Context, request ReadStoryRequestObject) (ReadStoryResponseObject, error)
// Create story
// (PUT /anthologies/{anthologyId}/stories/{storyId})
CreateStory(ctx context.Context, request CreateStoryRequestObject) (CreateStoryResponseObject, error)
// List story chapters
// (GET /anthologies/{anthologyId}/stories/{storyId}/chapters)
ListStoryChapters(ctx context.Context, request ListStoryChaptersRequestObject) (ListStoryChaptersResponseObject, error)
// Read story chapter
// (GET /anthologies/{anthologyId}/stories/{storyId}/chapters/{selector})
ReadChapter(ctx context.Context, request ReadChapterRequestObject) (ReadChapterResponseObject, error)
// Upload story chapter by ordinal
// (PUT /anthologies/{anthologyId}/stories/{storyId}/chapters/{selector})
UpsertChapter(ctx context.Context, request UpsertChapterRequestObject) (UpsertChapterResponseObject, error)
// Download chapter artifact
// (GET /anthologies/{anthologyId}/stories/{storyId}/chapters/{selector}/artifacts/{artifactName})
ReadChapterArtifact(ctx context.Context, request ReadChapterArtifactRequestObject) (ReadChapterArtifactResponseObject, error)
// Clone story
// (POST /anthologies/{anthologyId}/stories/{storyId}/clone)
CloneStory(ctx context.Context, request CloneStoryRequestObject) (CloneStoryResponseObject, error)
// Publish story
// (POST /anthologies/{anthologyId}/stories/{storyId}/publish)
PublishStory(ctx context.Context, request PublishStoryRequestObject) (PublishStoryResponseObject, error)
}
StrictServerInterface represents all server handlers.
type TooManyValuesForParamError ¶
func (*TooManyValuesForParamError) Error ¶
func (e *TooManyValuesForParamError) Error() string
type UnescapedCookieParamError ¶
func (*UnescapedCookieParamError) Error ¶
func (e *UnescapedCookieParamError) Error() string
func (*UnescapedCookieParamError) Unwrap ¶
func (e *UnescapedCookieParamError) Unwrap() error
type Unimplemented ¶
type Unimplemented struct{}
func (Unimplemented) CloneStory ¶
func (_ Unimplemented) CloneStory(w http.ResponseWriter, r *http.Request, anthologyId AnthologyIdPath, storyId StoryPath)
Clone story (POST /anthologies/{anthologyId}/stories/{storyId}/clone)
func (Unimplemented) CreateStory ¶
func (_ Unimplemented) CreateStory(w http.ResponseWriter, r *http.Request, anthologyId AnthologyIdPath, storyId StoryPath, params CreateStoryParams)
Create story (PUT /anthologies/{anthologyId}/stories/{storyId})
func (Unimplemented) DeleteStory ¶
func (_ Unimplemented) DeleteStory(w http.ResponseWriter, r *http.Request, anthologyId AnthologyIdPath, storyId StoryPath)
Delete story (DELETE /anthologies/{anthologyId}/stories/{storyId})
func (Unimplemented) ListStories ¶
func (_ Unimplemented) ListStories(w http.ResponseWriter, r *http.Request, anthologyId AnthologyIdPath, params ListStoriesParams)
List stories (GET /anthologies/{anthologyId}/stories)
func (Unimplemented) ListStoryChapters ¶
func (_ Unimplemented) ListStoryChapters(w http.ResponseWriter, r *http.Request, anthologyId AnthologyIdPath, storyId StoryPath, params ListStoryChaptersParams)
List story chapters (GET /anthologies/{anthologyId}/stories/{storyId}/chapters)
func (Unimplemented) PublishStory ¶
func (_ Unimplemented) PublishStory(w http.ResponseWriter, r *http.Request, anthologyId AnthologyIdPath, storyId StoryPath)
Publish story (POST /anthologies/{anthologyId}/stories/{storyId}/publish)
func (Unimplemented) ReadChapter ¶
func (_ Unimplemented) ReadChapter(w http.ResponseWriter, r *http.Request, anthologyId AnthologyIdPath, storyId StoryPath, selector ChapterPath, params ReadChapterParams)
Read story chapter (GET /anthologies/{anthologyId}/stories/{storyId}/chapters/{selector})
func (Unimplemented) ReadChapterArtifact ¶
func (_ Unimplemented) ReadChapterArtifact(w http.ResponseWriter, r *http.Request, anthologyId AnthologyIdPath, storyId StoryPath, selector ChapterPath, artifactName string)
Download chapter artifact (GET /anthologies/{anthologyId}/stories/{storyId}/chapters/{selector}/artifacts/{artifactName})
func (Unimplemented) ReadStory ¶
func (_ Unimplemented) ReadStory(w http.ResponseWriter, r *http.Request, anthologyId AnthologyIdPath, storyId StoryPath, params ReadStoryParams)
Read story (GET /anthologies/{anthologyId}/stories/{storyId})
func (Unimplemented) UpsertChapter ¶
func (_ Unimplemented) UpsertChapter(w http.ResponseWriter, r *http.Request, anthologyId AnthologyIdPath, storyId StoryPath, selector ChapterPath, params UpsertChapterParams)
Upload story chapter by ordinal (PUT /anthologies/{anthologyId}/stories/{storyId}/chapters/{selector})
type UnmarshalingParamError ¶
func (*UnmarshalingParamError) Error ¶
func (e *UnmarshalingParamError) Error() string
func (*UnmarshalingParamError) Unwrap ¶
func (e *UnmarshalingParamError) Unwrap() error
type UpsertChapter200Response ¶
type UpsertChapter200Response struct {
}
func (UpsertChapter200Response) VisitUpsertChapterResponse ¶
func (response UpsertChapter200Response) VisitUpsertChapterResponse(w http.ResponseWriter) error
type UpsertChapter202Response ¶
type UpsertChapter202Response struct {
}
func (UpsertChapter202Response) VisitUpsertChapterResponse ¶
func (response UpsertChapter202Response) VisitUpsertChapterResponse(w http.ResponseWriter) error
type UpsertChapter400JSONResponse ¶
type UpsertChapter400JSONResponse struct{ BadRequestJSONResponse }
func (UpsertChapter400JSONResponse) VisitUpsertChapterResponse ¶
func (response UpsertChapter400JSONResponse) VisitUpsertChapterResponse(w http.ResponseWriter) error
type UpsertChapter404JSONResponse ¶
type UpsertChapter404JSONResponse struct{ StoryNotFoundJSONResponse }
func (UpsertChapter404JSONResponse) VisitUpsertChapterResponse ¶
func (response UpsertChapter404JSONResponse) VisitUpsertChapterResponse(w http.ResponseWriter) error
type UpsertChapter409JSONResponse ¶
type UpsertChapter409JSONResponse struct{ StoryPublishedJSONResponse }
func (UpsertChapter409JSONResponse) VisitUpsertChapterResponse ¶
func (response UpsertChapter409JSONResponse) VisitUpsertChapterResponse(w http.ResponseWriter) error
type UpsertChapterMultipartBody ¶
type UpsertChapterMultipartBody struct {
// Chapter Stringified JSON chapter payload (<= 32 KiB).
Chapter *string `json:"chapter,omitempty"`
AdditionalProperties map[string]string `json:"-"`
}
UpsertChapterMultipartBody defines parameters for UpsertChapter.
func (UpsertChapterMultipartBody) Get ¶
func (a UpsertChapterMultipartBody) Get(fieldName string) (value string, found bool)
Getter for additional properties for UpsertChapterMultipartBody. Returns the specified element and whether it was found
func (UpsertChapterMultipartBody) MarshalJSON ¶
func (a UpsertChapterMultipartBody) MarshalJSON() ([]byte, error)
Override default JSON handling for UpsertChapterMultipartBody to handle AdditionalProperties
func (*UpsertChapterMultipartBody) Set ¶
func (a *UpsertChapterMultipartBody) Set(fieldName string, value string)
Setter for additional properties for UpsertChapterMultipartBody
func (*UpsertChapterMultipartBody) UnmarshalJSON ¶
func (a *UpsertChapterMultipartBody) UnmarshalJSON(b []byte) error
Override default JSON handling for UpsertChapterMultipartBody to handle AdditionalProperties
type UpsertChapterMultipartRequestBody ¶
type UpsertChapterMultipartRequestBody UpsertChapterMultipartBody
UpsertChapterMultipartRequestBody defines body for UpsertChapter for multipart/form-data ContentType.
type UpsertChapterParams ¶
type UpsertChapterParams struct {
// RequestId Optional UUID used to provide idempotent semantics for mutations.
RequestId *RequestIdQuery `form:"requestId,omitempty" json:"requestId,omitempty"`
}
UpsertChapterParams defines parameters for UpsertChapter.
type UpsertChapterRequestObject ¶
type UpsertChapterRequestObject struct {
AnthologyId AnthologyIdPath `json:"anthologyId"`
StoryId StoryPath `json:"storyId"`
Selector ChapterPath `json:"selector"`
Params UpsertChapterParams
Body *multipart.Reader
}
type UpsertChapterResponseObject ¶
type UpsertChapterResponseObject interface {
VisitUpsertChapterResponse(w http.ResponseWriter) error
}
type UpsertChapterResult ¶
type UpsertChapterResult struct {
Body []byte
HTTPResponse *http.Response
JSON400 *BadRequest
JSON404 *StoryNotFound
JSON409 *StoryPublished
}
func ParseUpsertChapterResult ¶
func ParseUpsertChapterResult(rsp *http.Response) (*UpsertChapterResult, error)
ParseUpsertChapterResult parses an HTTP response from a UpsertChapterWithResponse call
func (UpsertChapterResult) Status ¶
func (r UpsertChapterResult) Status() string
Status returns HTTPResponse.Status
func (UpsertChapterResult) StatusCode ¶
func (r UpsertChapterResult) StatusCode() int
StatusCode returns HTTPResponse.StatusCode