Documentation ¶
Overview ¶
Code generated by ogen, DO NOT EDIT.
Index ¶
- func WithServerURL(ctx context.Context, u *url.URL) context.Context
- type Book
- func (s *Book) Decode(d *jx.Decoder) error
- func (s *Book) Encode(e *jx.Encoder)
- func (s *Book) GetID() OptInt
- func (s *Book) GetImages() OptImages
- func (s *Book) GetMediaID() OptInt
- func (s *Book) GetNumFavorites() OptInt
- func (s *Book) GetNumPages() OptInt
- func (s *Book) GetScanlator() OptString
- func (s *Book) GetTags() []Tag
- func (s *Book) GetTitle() OptTitle
- func (s *Book) GetUploadDate() OptInt
- func (s *Book) MarshalJSON() ([]byte, error)
- func (s *Book) SetFake()
- func (s *Book) SetID(val OptInt)
- func (s *Book) SetImages(val OptImages)
- func (s *Book) SetMediaID(val OptInt)
- func (s *Book) SetNumFavorites(val OptInt)
- func (s *Book) SetNumPages(val OptInt)
- func (s *Book) SetScanlator(val OptString)
- func (s *Book) SetTags(val []Tag)
- func (s *Book) SetTitle(val OptTitle)
- func (s *Book) SetUploadDate(val OptInt)
- func (s *Book) UnmarshalJSON(data []byte) error
- func (s *Book) Validate() error
- type Client
- func (c *Client) GetBook(ctx context.Context, params GetBookParams) (GetBookRes, error)
- func (c *Client) GetPageCoverImage(ctx context.Context, params GetPageCoverImageParams) (GetPageCoverImageRes, error)
- func (c *Client) GetPageImage(ctx context.Context, params GetPageImageParams) (GetPageImageRes, error)
- func (c *Client) GetPageThumbnailImage(ctx context.Context, params GetPageThumbnailImageParams) (GetPageThumbnailImageRes, error)
- func (c *Client) Search(ctx context.Context, params SearchParams) (SearchRes, error)
- func (c *Client) SearchByTagID(ctx context.Context, params SearchByTagIDParams) (SearchByTagIDRes, error)
- type ClientOption
- type ErrorHandler
- type GetBookForbidden
- type GetBookParams
- type GetBookRes
- type GetPageCoverImageForbidden
- type GetPageCoverImageOK
- type GetPageCoverImageOKHeaders
- type GetPageCoverImageParams
- type GetPageCoverImageRes
- type GetPageImageForbidden
- type GetPageImageOK
- type GetPageImageOKHeaders
- type GetPageImageParams
- type GetPageImageRes
- type GetPageThumbnailImageForbidden
- type GetPageThumbnailImageOK
- type GetPageThumbnailImageOKHeaders
- type GetPageThumbnailImageParams
- type GetPageThumbnailImageRes
- type Handler
- type Image
- func (s *Image) Decode(d *jx.Decoder) error
- func (s *Image) Encode(e *jx.Encoder)
- func (s *Image) GetH() OptInt
- func (s *Image) GetT() OptString
- func (s *Image) GetW() OptInt
- func (s *Image) MarshalJSON() ([]byte, error)
- func (s *Image) SetFake()
- func (s *Image) SetH(val OptInt)
- func (s *Image) SetT(val OptString)
- func (s *Image) SetW(val OptInt)
- func (s *Image) UnmarshalJSON(data []byte) error
- func (s *Image) Validate() error
- type Images
- func (s *Images) Decode(d *jx.Decoder) error
- func (s *Images) Encode(e *jx.Encoder)
- func (s *Images) GetCover() OptImage
- func (s *Images) GetPages() []Image
- func (s *Images) GetThumbnail() OptImage
- func (s *Images) MarshalJSON() ([]byte, error)
- func (s *Images) SetCover(val OptImage)
- func (s *Images) SetFake()
- func (s *Images) SetPages(val []Image)
- func (s *Images) SetThumbnail(val OptImage)
- func (s *Images) UnmarshalJSON(data []byte) error
- func (s *Images) Validate() error
- type Invoker
- type Middleware
- type OptImage
- func (o *OptImage) Decode(d *jx.Decoder) error
- func (o OptImage) Encode(e *jx.Encoder)
- func (o OptImage) Get() (v Image, ok bool)
- func (o OptImage) IsSet() bool
- func (s OptImage) MarshalJSON() ([]byte, error)
- func (o OptImage) Or(d Image) Image
- func (o *OptImage) Reset()
- func (s *OptImage) SetFake()
- func (o *OptImage) SetTo(v Image)
- func (s *OptImage) UnmarshalJSON(data []byte) error
- type OptImages
- func (o *OptImages) Decode(d *jx.Decoder) error
- func (o OptImages) Encode(e *jx.Encoder)
- func (o OptImages) Get() (v Images, ok bool)
- func (o OptImages) IsSet() bool
- func (s OptImages) MarshalJSON() ([]byte, error)
- func (o OptImages) Or(d Images) Images
- func (o *OptImages) Reset()
- func (s *OptImages) SetFake()
- func (o *OptImages) SetTo(v Images)
- func (s *OptImages) UnmarshalJSON(data []byte) error
- type OptInt
- func (o *OptInt) Decode(d *jx.Decoder) error
- func (o OptInt) Encode(e *jx.Encoder)
- func (o OptInt) Get() (v int, ok bool)
- func (o OptInt) IsSet() bool
- func (s OptInt) MarshalJSON() ([]byte, error)
- func (o OptInt) Or(d int) int
- func (o *OptInt) Reset()
- func (s *OptInt) SetFake()
- func (o *OptInt) SetTo(v int)
- func (s *OptInt) UnmarshalJSON(data []byte) error
- type OptString
- func (o *OptString) Decode(d *jx.Decoder) error
- func (o OptString) Encode(e *jx.Encoder)
- func (o OptString) Get() (v string, ok bool)
- func (o OptString) IsSet() bool
- func (s OptString) MarshalJSON() ([]byte, error)
- func (o OptString) Or(d string) string
- func (o *OptString) Reset()
- func (s *OptString) SetFake()
- func (o *OptString) SetTo(v string)
- func (s *OptString) UnmarshalJSON(data []byte) error
- type OptTagType
- func (o *OptTagType) Decode(d *jx.Decoder) error
- func (o OptTagType) Encode(e *jx.Encoder)
- func (o OptTagType) Get() (v TagType, ok bool)
- func (o OptTagType) IsSet() bool
- func (s OptTagType) MarshalJSON() ([]byte, error)
- func (o OptTagType) Or(d TagType) TagType
- func (o *OptTagType) Reset()
- func (s *OptTagType) SetFake()
- func (o *OptTagType) SetTo(v TagType)
- func (s *OptTagType) UnmarshalJSON(data []byte) error
- type OptTitle
- func (o *OptTitle) Decode(d *jx.Decoder) error
- func (o OptTitle) Encode(e *jx.Encoder)
- func (o OptTitle) Get() (v Title, ok bool)
- func (o OptTitle) IsSet() bool
- func (s OptTitle) MarshalJSON() ([]byte, error)
- func (o OptTitle) Or(d Title) Title
- func (o *OptTitle) Reset()
- func (s *OptTitle) SetFake()
- func (o *OptTitle) SetTo(v Title)
- func (s *OptTitle) UnmarshalJSON(data []byte) error
- type Option
- type Route
- type SearchByTagIDForbidden
- type SearchByTagIDOKApplicationJSON
- func (s *SearchByTagIDOKApplicationJSON) Decode(d *jx.Decoder) error
- func (s SearchByTagIDOKApplicationJSON) Encode(e *jx.Encoder)
- func (s SearchByTagIDOKApplicationJSON) MarshalJSON() ([]byte, error)
- func (s *SearchByTagIDOKApplicationJSON) SetFake()
- func (s *SearchByTagIDOKApplicationJSON) UnmarshalJSON(data []byte) error
- func (s SearchByTagIDOKApplicationJSON) Validate() error
- type SearchByTagIDParams
- type SearchByTagIDRes
- type SearchForbidden
- type SearchOKApplicationJSON
- func (s *SearchOKApplicationJSON) Decode(d *jx.Decoder) error
- func (s SearchOKApplicationJSON) Encode(e *jx.Encoder)
- func (s SearchOKApplicationJSON) MarshalJSON() ([]byte, error)
- func (s *SearchOKApplicationJSON) SetFake()
- func (s *SearchOKApplicationJSON) UnmarshalJSON(data []byte) error
- func (s SearchOKApplicationJSON) Validate() error
- type SearchParams
- type SearchRes
- type SearchResponse
- func (s *SearchResponse) Decode(d *jx.Decoder) error
- func (s *SearchResponse) Encode(e *jx.Encoder)
- func (s *SearchResponse) GetNumPages() OptInt
- func (s *SearchResponse) GetPerPage() OptInt
- func (s *SearchResponse) GetResult() []Book
- func (s *SearchResponse) MarshalJSON() ([]byte, error)
- func (s *SearchResponse) SetFake()
- func (s *SearchResponse) SetNumPages(val OptInt)
- func (s *SearchResponse) SetPerPage(val OptInt)
- func (s *SearchResponse) SetResult(val []Book)
- func (s *SearchResponse) UnmarshalJSON(data []byte) error
- func (s *SearchResponse) Validate() error
- type Server
- type ServerOption
- func WithErrorHandler(h ErrorHandler) ServerOption
- func WithMaxMultipartMemory(max int64) ServerOption
- func WithMethodNotAllowed(methodNotAllowed func(w http.ResponseWriter, r *http.Request, allowed string)) ServerOption
- func WithMiddleware(m ...Middleware) ServerOption
- func WithNotFound(notFound http.HandlerFunc) ServerOption
- func WithPathPrefix(prefix string) ServerOption
- type Tag
- func (s *Tag) Decode(d *jx.Decoder) error
- func (s *Tag) Encode(e *jx.Encoder)
- func (s *Tag) GetCount() OptInt
- func (s *Tag) GetID() OptInt
- func (s *Tag) GetName() OptString
- func (s *Tag) GetType() OptTagType
- func (s *Tag) GetURL() OptString
- func (s *Tag) MarshalJSON() ([]byte, error)
- func (s *Tag) SetCount(val OptInt)
- func (s *Tag) SetFake()
- func (s *Tag) SetID(val OptInt)
- func (s *Tag) SetName(val OptString)
- func (s *Tag) SetType(val OptTagType)
- func (s *Tag) SetURL(val OptString)
- func (s *Tag) UnmarshalJSON(data []byte) error
- func (s *Tag) Validate() error
- type TagType
- func (TagType) AllValues() []TagType
- func (s *TagType) Decode(d *jx.Decoder) error
- func (s TagType) Encode(e *jx.Encoder)
- func (s TagType) MarshalJSON() ([]byte, error)
- func (s TagType) MarshalText() ([]byte, error)
- func (s *TagType) SetFake()
- func (s *TagType) UnmarshalJSON(data []byte) error
- func (s *TagType) UnmarshalText(data []byte) error
- func (s TagType) Validate() error
- type Title
- func (s *Title) Decode(d *jx.Decoder) error
- func (s *Title) Encode(e *jx.Encoder)
- func (s *Title) GetEnglish() OptString
- func (s *Title) GetJapanese() OptString
- func (s *Title) GetPretty() OptString
- func (s *Title) MarshalJSON() ([]byte, error)
- func (s *Title) SetEnglish(val OptString)
- func (s *Title) SetFake()
- func (s *Title) SetJapanese(val OptString)
- func (s *Title) SetPretty(val OptString)
- func (s *Title) UnmarshalJSON(data []byte) error
- type UnimplementedHandler
- func (UnimplementedHandler) GetBook(ctx context.Context, params GetBookParams) (r GetBookRes, _ error)
- func (UnimplementedHandler) GetPageCoverImage(ctx context.Context, params GetPageCoverImageParams) (r GetPageCoverImageRes, _ error)
- func (UnimplementedHandler) GetPageImage(ctx context.Context, params GetPageImageParams) (r GetPageImageRes, _ error)
- func (UnimplementedHandler) GetPageThumbnailImage(ctx context.Context, params GetPageThumbnailImageParams) (r GetPageThumbnailImageRes, _ error)
- func (UnimplementedHandler) Search(ctx context.Context, params SearchParams) (r SearchRes, _ error)
- func (UnimplementedHandler) SearchByTagID(ctx context.Context, params SearchByTagIDParams) (r SearchByTagIDRes, _ error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Book ¶
type Book struct { ID OptInt `json:"id"` MediaID OptInt `json:"media_id"` Images OptImages `json:"images"` Title OptTitle `json:"title"` Tags []Tag `json:"tags"` Scanlator OptString `json:"scanlator"` UploadDate OptInt `json:"upload_date"` NumPages OptInt `json:"num_pages"` NumFavorites OptInt `json:"num_favorites"` }
Ref: #/components/schemas/Book
func (*Book) GetMediaID ¶
GetMediaID returns the value of MediaID.
func (*Book) GetNumFavorites ¶
GetNumFavorites returns the value of NumFavorites.
func (*Book) GetNumPages ¶
GetNumPages returns the value of NumPages.
func (*Book) GetScanlator ¶
GetScanlator returns the value of Scanlator.
func (*Book) GetUploadDate ¶
GetUploadDate returns the value of UploadDate.
func (*Book) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*Book) SetMediaID ¶
SetMediaID sets the value of MediaID.
func (*Book) SetNumFavorites ¶
SetNumFavorites sets the value of NumFavorites.
func (*Book) SetNumPages ¶
SetNumPages sets the value of NumPages.
func (*Book) SetScanlator ¶
SetScanlator sets the value of Scanlator.
func (*Book) SetUploadDate ¶
SetUploadDate sets the value of UploadDate.
func (*Book) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client implements OAS client.
func NewClient ¶
func NewClient(serverURL string, opts ...ClientOption) (*Client, error)
NewClient initializes new Client defined by OAS.
func (*Client) GetBook ¶
func (c *Client) GetBook(ctx context.Context, params GetBookParams) (GetBookRes, error)
GetBook invokes getBook operation.
Gets metadata of book.
GET /api/gallery/{book_id}
func (*Client) GetPageCoverImage ¶
func (c *Client) GetPageCoverImage(ctx context.Context, params GetPageCoverImageParams) (GetPageCoverImageRes, error)
GetPageCoverImage invokes getPageCoverImage operation.
Gets page cover.
GET /galleries/{media_id}/cover.{format}
func (*Client) GetPageImage ¶
func (c *Client) GetPageImage(ctx context.Context, params GetPageImageParams) (GetPageImageRes, error)
GetPageImage invokes getPageImage operation.
Gets page.
GET /galleries/{media_id}/{page}.{format}
func (*Client) GetPageThumbnailImage ¶
func (c *Client) GetPageThumbnailImage(ctx context.Context, params GetPageThumbnailImageParams) (GetPageThumbnailImageRes, error)
GetPageThumbnailImage invokes getPageThumbnailImage operation.
Gets page thumbnail.
GET /galleries/{media_id}/{page}t.{format}
func (*Client) Search ¶
Search invokes search operation.
Search for comics.
GET /api/galleries/search
func (*Client) SearchByTagID ¶
func (c *Client) SearchByTagID(ctx context.Context, params SearchByTagIDParams) (SearchByTagIDRes, error)
SearchByTagID invokes searchByTagID operation.
Search for comics by tag ID.
GET /api/galleries/tagged
type ClientOption ¶
type ClientOption interface {
// contains filtered or unexported methods
}
ClientOption is client config option.
func WithClient ¶
func WithClient(client ht.Client) ClientOption
WithClient specifies http client to use.
type GetBookForbidden ¶
type GetBookForbidden struct{}
GetBookForbidden is response for GetBook operation.
type GetBookParams ¶
type GetBookParams struct { // ID of book. BookID int }
GetBookParams is parameters of getBook operation.
type GetBookRes ¶
type GetBookRes interface {
// contains filtered or unexported methods
}
type GetPageCoverImageForbidden ¶
type GetPageCoverImageForbidden struct{}
GetPageCoverImageForbidden is response for GetPageCoverImage operation.
type GetPageCoverImageOK ¶
type GetPageCoverImageOKHeaders ¶
type GetPageCoverImageOKHeaders struct { ContentType string Response GetPageCoverImageOK }
GetPageCoverImageOKHeaders wraps GetPageCoverImageOK with response headers.
func (*GetPageCoverImageOKHeaders) GetContentType ¶
func (s *GetPageCoverImageOKHeaders) GetContentType() string
GetContentType returns the value of ContentType.
func (*GetPageCoverImageOKHeaders) GetResponse ¶
func (s *GetPageCoverImageOKHeaders) GetResponse() GetPageCoverImageOK
GetResponse returns the value of Response.
func (*GetPageCoverImageOKHeaders) SetContentType ¶
func (s *GetPageCoverImageOKHeaders) SetContentType(val string)
SetContentType sets the value of ContentType.
func (*GetPageCoverImageOKHeaders) SetResponse ¶
func (s *GetPageCoverImageOKHeaders) SetResponse(val GetPageCoverImageOK)
SetResponse sets the value of Response.
type GetPageCoverImageParams ¶
GetPageCoverImageParams is parameters of getPageCoverImage operation.
type GetPageCoverImageRes ¶
type GetPageCoverImageRes interface {
// contains filtered or unexported methods
}
type GetPageImageForbidden ¶
type GetPageImageForbidden struct{}
GetPageImageForbidden is response for GetPageImage operation.
type GetPageImageOK ¶
type GetPageImageOKHeaders ¶
type GetPageImageOKHeaders struct { ContentType string Response GetPageImageOK }
GetPageImageOKHeaders wraps GetPageImageOK with response headers.
func (*GetPageImageOKHeaders) GetContentType ¶
func (s *GetPageImageOKHeaders) GetContentType() string
GetContentType returns the value of ContentType.
func (*GetPageImageOKHeaders) GetResponse ¶
func (s *GetPageImageOKHeaders) GetResponse() GetPageImageOK
GetResponse returns the value of Response.
func (*GetPageImageOKHeaders) SetContentType ¶
func (s *GetPageImageOKHeaders) SetContentType(val string)
SetContentType sets the value of ContentType.
func (*GetPageImageOKHeaders) SetResponse ¶
func (s *GetPageImageOKHeaders) SetResponse(val GetPageImageOK)
SetResponse sets the value of Response.
type GetPageImageParams ¶
type GetPageImageParams struct { // ID of book. MediaID int // Number of page. Page int // Image format. Format string }
GetPageImageParams is parameters of getPageImage operation.
type GetPageImageRes ¶
type GetPageImageRes interface {
// contains filtered or unexported methods
}
type GetPageThumbnailImageForbidden ¶
type GetPageThumbnailImageForbidden struct{}
GetPageThumbnailImageForbidden is response for GetPageThumbnailImage operation.
type GetPageThumbnailImageOK ¶
type GetPageThumbnailImageOKHeaders ¶
type GetPageThumbnailImageOKHeaders struct { ContentType string Response GetPageThumbnailImageOK }
GetPageThumbnailImageOKHeaders wraps GetPageThumbnailImageOK with response headers.
func (*GetPageThumbnailImageOKHeaders) GetContentType ¶
func (s *GetPageThumbnailImageOKHeaders) GetContentType() string
GetContentType returns the value of ContentType.
func (*GetPageThumbnailImageOKHeaders) GetResponse ¶
func (s *GetPageThumbnailImageOKHeaders) GetResponse() GetPageThumbnailImageOK
GetResponse returns the value of Response.
func (*GetPageThumbnailImageOKHeaders) SetContentType ¶
func (s *GetPageThumbnailImageOKHeaders) SetContentType(val string)
SetContentType sets the value of ContentType.
func (*GetPageThumbnailImageOKHeaders) SetResponse ¶
func (s *GetPageThumbnailImageOKHeaders) SetResponse(val GetPageThumbnailImageOK)
SetResponse sets the value of Response.
type GetPageThumbnailImageParams ¶
type GetPageThumbnailImageParams struct { // ID of book. MediaID int // Number of page. Page int // Image format. Format string }
GetPageThumbnailImageParams is parameters of getPageThumbnailImage operation.
type GetPageThumbnailImageRes ¶
type GetPageThumbnailImageRes interface {
// contains filtered or unexported methods
}
type Handler ¶
type Handler interface { // GetBook implements getBook operation. // // Gets metadata of book. // // GET /api/gallery/{book_id} GetBook(ctx context.Context, params GetBookParams) (GetBookRes, error) // GetPageCoverImage implements getPageCoverImage operation. // // Gets page cover. // // GET /galleries/{media_id}/cover.{format} GetPageCoverImage(ctx context.Context, params GetPageCoverImageParams) (GetPageCoverImageRes, error) // GetPageImage implements getPageImage operation. // // Gets page. // // GET /galleries/{media_id}/{page}.{format} GetPageImage(ctx context.Context, params GetPageImageParams) (GetPageImageRes, error) // GetPageThumbnailImage implements getPageThumbnailImage operation. // // Gets page thumbnail. // // GET /galleries/{media_id}/{page}t.{format} GetPageThumbnailImage(ctx context.Context, params GetPageThumbnailImageParams) (GetPageThumbnailImageRes, error) // Search implements search operation. // // Search for comics. // // GET /api/galleries/search Search(ctx context.Context, params SearchParams) (SearchRes, error) // SearchByTagID implements searchByTagID operation. // // Search for comics by tag ID. // // GET /api/galleries/tagged SearchByTagID(ctx context.Context, params SearchByTagIDParams) (SearchByTagIDRes, error) }
Handler handles operations described by OpenAPI v3 specification.
type Image ¶
type Image struct { T OptString `json:"t"` // Width of image. W OptInt `json:"w"` // Height of image. H OptInt `json:"h"` }
Ref: #/components/schemas/Image
func (*Image) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*Image) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type Images ¶
type Images struct { Pages []Image `json:"pages"` Cover OptImage `json:"cover"` Thumbnail OptImage `json:"thumbnail"` }
Ref: #/components/schemas/Images
func (*Images) GetThumbnail ¶
GetThumbnail returns the value of Thumbnail.
func (*Images) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*Images) SetThumbnail ¶
SetThumbnail sets the value of Thumbnail.
func (*Images) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type Invoker ¶
type Invoker interface { // GetBook invokes getBook operation. // // Gets metadata of book. // // GET /api/gallery/{book_id} GetBook(ctx context.Context, params GetBookParams) (GetBookRes, error) // GetPageCoverImage invokes getPageCoverImage operation. // // Gets page cover. // // GET /galleries/{media_id}/cover.{format} GetPageCoverImage(ctx context.Context, params GetPageCoverImageParams) (GetPageCoverImageRes, error) // GetPageImage invokes getPageImage operation. // // Gets page. // // GET /galleries/{media_id}/{page}.{format} GetPageImage(ctx context.Context, params GetPageImageParams) (GetPageImageRes, error) // GetPageThumbnailImage invokes getPageThumbnailImage operation. // // Gets page thumbnail. // // GET /galleries/{media_id}/{page}t.{format} GetPageThumbnailImage(ctx context.Context, params GetPageThumbnailImageParams) (GetPageThumbnailImageRes, error) // Search invokes search operation. // // Search for comics. // // GET /api/galleries/search Search(ctx context.Context, params SearchParams) (SearchRes, error) // SearchByTagID invokes searchByTagID operation. // // Search for comics by tag ID. // // GET /api/galleries/tagged SearchByTagID(ctx context.Context, params SearchByTagIDParams) (SearchByTagIDRes, error) }
Invoker invokes operations described by OpenAPI v3 specification.
type OptImage ¶
OptImage is optional Image.
func NewOptImage ¶
NewOptImage returns new OptImage with value set to v.
func (OptImage) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*OptImage) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type OptImages ¶
OptImages is optional Images.
func NewOptImages ¶
NewOptImages returns new OptImages with value set to v.
func (OptImages) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*OptImages) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type OptInt ¶
OptInt is optional int.
func (OptInt) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*OptInt) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type OptString ¶
OptString is optional string.
func NewOptString ¶
NewOptString returns new OptString with value set to v.
func (OptString) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*OptString) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type OptTagType ¶
OptTagType is optional TagType.
func NewOptTagType ¶
func NewOptTagType(v TagType) OptTagType
NewOptTagType returns new OptTagType with value set to v.
func (*OptTagType) Decode ¶
func (o *OptTagType) Decode(d *jx.Decoder) error
Decode decodes TagType from json.
func (OptTagType) Encode ¶
func (o OptTagType) Encode(e *jx.Encoder)
Encode encodes TagType as json.
func (OptTagType) Get ¶
func (o OptTagType) Get() (v TagType, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptTagType) IsSet ¶
func (o OptTagType) IsSet() bool
IsSet returns true if OptTagType was set.
func (OptTagType) MarshalJSON ¶
func (s OptTagType) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (OptTagType) Or ¶
func (o OptTagType) Or(d TagType) TagType
Or returns value if set, or given parameter if does not.
func (*OptTagType) UnmarshalJSON ¶
func (s *OptTagType) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type OptTitle ¶
OptTitle is optional Title.
func NewOptTitle ¶
NewOptTitle returns new OptTitle with value set to v.
func (OptTitle) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*OptTitle) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type Option ¶
type Option interface { ServerOption ClientOption }
Option is config option.
func WithMeterProvider ¶
func WithMeterProvider(provider metric.MeterProvider) Option
WithMeterProvider specifies a meter provider to use for creating a meter.
If none is specified, the otel.GetMeterProvider() is used.
func WithTracerProvider ¶
func WithTracerProvider(provider trace.TracerProvider) Option
WithTracerProvider specifies a tracer provider to use for creating a tracer.
If none is specified, the global provider is used.
type Route ¶
type Route struct {
// contains filtered or unexported fields
}
Route is route object.
func (Route) OperationID ¶
OperationID returns OpenAPI operationId.
type SearchByTagIDForbidden ¶
type SearchByTagIDForbidden struct{}
SearchByTagIDForbidden is response for SearchByTagID operation.
type SearchByTagIDOKApplicationJSON ¶
type SearchByTagIDOKApplicationJSON []SearchResponse
func (*SearchByTagIDOKApplicationJSON) Decode ¶
func (s *SearchByTagIDOKApplicationJSON) Decode(d *jx.Decoder) error
Decode decodes SearchByTagIDOKApplicationJSON from json.
func (SearchByTagIDOKApplicationJSON) Encode ¶
func (s SearchByTagIDOKApplicationJSON) Encode(e *jx.Encoder)
Encode encodes SearchByTagIDOKApplicationJSON as json.
func (SearchByTagIDOKApplicationJSON) MarshalJSON ¶
func (s SearchByTagIDOKApplicationJSON) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*SearchByTagIDOKApplicationJSON) SetFake ¶
func (s *SearchByTagIDOKApplicationJSON) SetFake()
SetFake set fake values.
func (*SearchByTagIDOKApplicationJSON) UnmarshalJSON ¶
func (s *SearchByTagIDOKApplicationJSON) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (SearchByTagIDOKApplicationJSON) Validate ¶
func (s SearchByTagIDOKApplicationJSON) Validate() error
type SearchByTagIDParams ¶
SearchByTagIDParams is parameters of searchByTagID operation.
type SearchByTagIDRes ¶
type SearchByTagIDRes interface {
// contains filtered or unexported methods
}
type SearchForbidden ¶
type SearchForbidden struct{}
SearchForbidden is response for Search operation.
type SearchOKApplicationJSON ¶
type SearchOKApplicationJSON []SearchResponse
func (*SearchOKApplicationJSON) Decode ¶
func (s *SearchOKApplicationJSON) Decode(d *jx.Decoder) error
Decode decodes SearchOKApplicationJSON from json.
func (SearchOKApplicationJSON) Encode ¶
func (s SearchOKApplicationJSON) Encode(e *jx.Encoder)
Encode encodes SearchOKApplicationJSON as json.
func (SearchOKApplicationJSON) MarshalJSON ¶
func (s SearchOKApplicationJSON) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*SearchOKApplicationJSON) SetFake ¶
func (s *SearchOKApplicationJSON) SetFake()
SetFake set fake values.
func (*SearchOKApplicationJSON) UnmarshalJSON ¶
func (s *SearchOKApplicationJSON) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (SearchOKApplicationJSON) Validate ¶
func (s SearchOKApplicationJSON) Validate() error
type SearchParams ¶
type SearchParams struct { // Search query. // * You can search for multiple terms at the same time, and this will return only galleries that // contain both terms. For example, rust cox finds all galleries that contain both rust and cox. // * You can exclude terms by prefixing them with -. For example, rust cox -tokio matches all // galleries matching rust and cox but not tokio. // * Exact searches can be performed by wrapping terms in double quotes. For example, "big dogs" only // matches galleries with "big dogs" somewhere in the title or in tags. // * These can be combined with tag namespaces for finer control over the query: parodies:railgun // -tag:"big dogs". Query string // Number of result page. Page OptInt }
SearchParams is parameters of search operation.
type SearchResponse ¶
type SearchResponse struct { Result []Book `json:"result"` // Total number of pages. NumPages OptInt `json:"num_pages"` // Elements on one page. PerPage OptInt `json:"per_page"` }
Ref: #/components/schemas/SearchResponse
func (*SearchResponse) Decode ¶
func (s *SearchResponse) Decode(d *jx.Decoder) error
Decode decodes SearchResponse from json.
func (*SearchResponse) Encode ¶
func (s *SearchResponse) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*SearchResponse) GetNumPages ¶
func (s *SearchResponse) GetNumPages() OptInt
GetNumPages returns the value of NumPages.
func (*SearchResponse) GetPerPage ¶
func (s *SearchResponse) GetPerPage() OptInt
GetPerPage returns the value of PerPage.
func (*SearchResponse) GetResult ¶
func (s *SearchResponse) GetResult() []Book
GetResult returns the value of Result.
func (*SearchResponse) MarshalJSON ¶
func (s *SearchResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*SearchResponse) SetNumPages ¶
func (s *SearchResponse) SetNumPages(val OptInt)
SetNumPages sets the value of NumPages.
func (*SearchResponse) SetPerPage ¶
func (s *SearchResponse) SetPerPage(val OptInt)
SetPerPage sets the value of PerPage.
func (*SearchResponse) SetResult ¶
func (s *SearchResponse) SetResult(val []Book)
SetResult sets the value of Result.
func (*SearchResponse) UnmarshalJSON ¶
func (s *SearchResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*SearchResponse) Validate ¶
func (s *SearchResponse) Validate() error
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server implements http server based on OpenAPI v3 specification and calls Handler to handle requests.
func NewServer ¶
func NewServer(h Handler, opts ...ServerOption) (*Server, error)
NewServer creates new Server.
type ServerOption ¶
type ServerOption interface {
// contains filtered or unexported methods
}
ServerOption is server config option.
func WithErrorHandler ¶
func WithErrorHandler(h ErrorHandler) ServerOption
WithErrorHandler specifies error handler to use.
func WithMaxMultipartMemory ¶
func WithMaxMultipartMemory(max int64) ServerOption
WithMaxMultipartMemory specifies limit of memory for storing file parts. File parts which can't be stored in memory will be stored on disk in temporary files.
func WithMethodNotAllowed ¶
func WithMethodNotAllowed(methodNotAllowed func(w http.ResponseWriter, r *http.Request, allowed string)) ServerOption
WithMethodNotAllowed specifies Method Not Allowed handler to use.
func WithMiddleware ¶
func WithMiddleware(m ...Middleware) ServerOption
WithMiddleware specifies middlewares to use.
func WithNotFound ¶
func WithNotFound(notFound http.HandlerFunc) ServerOption
WithNotFound specifies Not Found handler to use.
func WithPathPrefix ¶
func WithPathPrefix(prefix string) ServerOption
WithPathPrefix specifies server path prefix.
type Tag ¶
type Tag struct { ID OptInt `json:"id"` Type OptTagType `json:"type"` Name OptString `json:"name"` URL OptString `json:"url"` Count OptInt `json:"count"` }
Ref: #/components/schemas/Tag
func (*Tag) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*Tag) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type TagType ¶
type TagType string
func (TagType) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (TagType) MarshalText ¶
MarshalText implements encoding.TextMarshaler.
func (*TagType) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
func (*TagType) UnmarshalText ¶
UnmarshalText implements encoding.TextUnmarshaler.
type Title ¶
type Title struct { English OptString `json:"english"` Japanese OptString `json:"japanese"` Pretty OptString `json:"pretty"` }
Ref: #/components/schemas/Title
func (*Title) GetEnglish ¶
GetEnglish returns the value of English.
func (*Title) GetJapanese ¶
GetJapanese returns the value of Japanese.
func (*Title) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*Title) SetEnglish ¶
SetEnglish sets the value of English.
func (*Title) SetJapanese ¶
SetJapanese sets the value of Japanese.
func (*Title) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type UnimplementedHandler ¶
type UnimplementedHandler struct{}
UnimplementedHandler is no-op Handler which returns http.ErrNotImplemented.
func (UnimplementedHandler) GetBook ¶
func (UnimplementedHandler) GetBook(ctx context.Context, params GetBookParams) (r GetBookRes, _ error)
GetBook implements getBook operation.
Gets metadata of book.
GET /api/gallery/{book_id}
func (UnimplementedHandler) GetPageCoverImage ¶
func (UnimplementedHandler) GetPageCoverImage(ctx context.Context, params GetPageCoverImageParams) (r GetPageCoverImageRes, _ error)
GetPageCoverImage implements getPageCoverImage operation.
Gets page cover.
GET /galleries/{media_id}/cover.{format}
func (UnimplementedHandler) GetPageImage ¶
func (UnimplementedHandler) GetPageImage(ctx context.Context, params GetPageImageParams) (r GetPageImageRes, _ error)
GetPageImage implements getPageImage operation.
Gets page.
GET /galleries/{media_id}/{page}.{format}
func (UnimplementedHandler) GetPageThumbnailImage ¶
func (UnimplementedHandler) GetPageThumbnailImage(ctx context.Context, params GetPageThumbnailImageParams) (r GetPageThumbnailImageRes, _ error)
GetPageThumbnailImage implements getPageThumbnailImage operation.
Gets page thumbnail.
GET /galleries/{media_id}/{page}t.{format}
func (UnimplementedHandler) Search ¶
func (UnimplementedHandler) Search(ctx context.Context, params SearchParams) (r SearchRes, _ error)
Search implements search operation.
Search for comics.
GET /api/galleries/search
func (UnimplementedHandler) SearchByTagID ¶
func (UnimplementedHandler) SearchByTagID(ctx context.Context, params SearchByTagIDParams) (r SearchByTagIDRes, _ error)
SearchByTagID implements searchByTagID operation.
Search for comics by tag ID.
GET /api/galleries/tagged
Source Files ¶
- oas_cfg_gen.go
- oas_client_gen.go
- oas_faker_gen.go
- oas_handlers_gen.go
- oas_interfaces_gen.go
- oas_json_gen.go
- oas_middleware_gen.go
- oas_parameters_gen.go
- oas_request_decoders_gen.go
- oas_request_encoders_gen.go
- oas_response_decoders_gen.go
- oas_response_encoders_gen.go
- oas_router_gen.go
- oas_schemas_gen.go
- oas_server_gen.go
- oas_unimplemented_gen.go
- oas_validators_gen.go