api

package
v0.0.0-...-55964f1 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2024 License: MIT Imports: 25 Imported by: 0

Documentation

Overview

Code generated by ogen, DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithServerURL

func WithServerURL(ctx context.Context, u *url.URL) context.Context

WithServerURL sets context key to override server URL.

Types

type ApiKeyAuth

type ApiKeyAuth struct {
	APIKey string
}

func (*ApiKeyAuth) GetAPIKey

func (s *ApiKeyAuth) GetAPIKey() string

GetAPIKey returns the value of APIKey.

func (*ApiKeyAuth) SetAPIKey

func (s *ApiKeyAuth) SetAPIKey(val string)

SetAPIKey sets the value of APIKey.

type ChannelResponse

type ChannelResponse struct {
	ID         OptString                    `json:"id"`
	Snippet    OptChannelSnippetResponse    `json:"snippet"`
	Statistics OptChannelStatisticsResponse `json:"statistics"`
}

Ref: #/components/schemas/ChannelResponse

func (*ChannelResponse) Decode

func (s *ChannelResponse) Decode(d *jx.Decoder) error

Decode decodes ChannelResponse from json.

func (*ChannelResponse) Encode

func (s *ChannelResponse) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*ChannelResponse) GetID

func (s *ChannelResponse) GetID() OptString

GetID returns the value of ID.

func (*ChannelResponse) GetSnippet

GetSnippet returns the value of Snippet.

func (*ChannelResponse) GetStatistics

func (s *ChannelResponse) GetStatistics() OptChannelStatisticsResponse

GetStatistics returns the value of Statistics.

func (*ChannelResponse) MarshalJSON

func (s *ChannelResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ChannelResponse) SetID

func (s *ChannelResponse) SetID(val OptString)

SetID sets the value of ID.

func (*ChannelResponse) SetSnippet

func (s *ChannelResponse) SetSnippet(val OptChannelSnippetResponse)

SetSnippet sets the value of Snippet.

func (*ChannelResponse) SetStatistics

func (s *ChannelResponse) SetStatistics(val OptChannelStatisticsResponse)

SetStatistics sets the value of Statistics.

func (*ChannelResponse) UnmarshalJSON

func (s *ChannelResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type ChannelSnippetResponse

type ChannelSnippetResponse struct {
	Youtube     OptPlatformSnippet `json:"Youtube"`
	Twitch      OptPlatformSnippet `json:"Twitch"`
	TwitCasting OptPlatformSnippet `json:"TwitCasting"`
	Niconico    OptPlatformSnippet `json:"Niconico"`
}

Ref: #/components/schemas/ChannelSnippetResponse

func (*ChannelSnippetResponse) Decode

func (s *ChannelSnippetResponse) Decode(d *jx.Decoder) error

Decode decodes ChannelSnippetResponse from json.

func (*ChannelSnippetResponse) Encode

func (s *ChannelSnippetResponse) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*ChannelSnippetResponse) GetNiconico

func (s *ChannelSnippetResponse) GetNiconico() OptPlatformSnippet

GetNiconico returns the value of Niconico.

func (*ChannelSnippetResponse) GetTwitCasting

func (s *ChannelSnippetResponse) GetTwitCasting() OptPlatformSnippet

GetTwitCasting returns the value of TwitCasting.

func (*ChannelSnippetResponse) GetTwitch

GetTwitch returns the value of Twitch.

func (*ChannelSnippetResponse) GetYoutube

GetYoutube returns the value of Youtube.

func (*ChannelSnippetResponse) MarshalJSON

func (s *ChannelSnippetResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ChannelSnippetResponse) SetNiconico

func (s *ChannelSnippetResponse) SetNiconico(val OptPlatformSnippet)

SetNiconico sets the value of Niconico.

func (*ChannelSnippetResponse) SetTwitCasting

func (s *ChannelSnippetResponse) SetTwitCasting(val OptPlatformSnippet)

SetTwitCasting sets the value of TwitCasting.

func (*ChannelSnippetResponse) SetTwitch

func (s *ChannelSnippetResponse) SetTwitch(val OptPlatformSnippet)

SetTwitch sets the value of Twitch.

func (*ChannelSnippetResponse) SetYoutube

func (s *ChannelSnippetResponse) SetYoutube(val OptPlatformSnippet)

SetYoutube sets the value of Youtube.

func (*ChannelSnippetResponse) UnmarshalJSON

func (s *ChannelSnippetResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type ChannelStatisticsResponse

type ChannelStatisticsResponse struct {
	Youtube     OptPlatformStatistics `json:"Youtube"`
	Twitch      OptPlatformStatistics `json:"Twitch"`
	TwitCasting OptPlatformStatistics `json:"TwitCasting"`
	Niconico    OptPlatformStatistics `json:"Niconico"`
}

Ref: #/components/schemas/ChannelStatisticsResponse

func (*ChannelStatisticsResponse) Decode

func (s *ChannelStatisticsResponse) Decode(d *jx.Decoder) error

Decode decodes ChannelStatisticsResponse from json.

func (*ChannelStatisticsResponse) Encode

func (s *ChannelStatisticsResponse) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*ChannelStatisticsResponse) GetNiconico

GetNiconico returns the value of Niconico.

func (*ChannelStatisticsResponse) GetTwitCasting

GetTwitCasting returns the value of TwitCasting.

func (*ChannelStatisticsResponse) GetTwitch

GetTwitch returns the value of Twitch.

func (*ChannelStatisticsResponse) GetYoutube

GetYoutube returns the value of Youtube.

func (*ChannelStatisticsResponse) MarshalJSON

func (s *ChannelStatisticsResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ChannelStatisticsResponse) SetNiconico

SetNiconico sets the value of Niconico.

func (*ChannelStatisticsResponse) SetTwitCasting

func (s *ChannelStatisticsResponse) SetTwitCasting(val OptPlatformStatistics)

SetTwitCasting sets the value of TwitCasting.

func (*ChannelStatisticsResponse) SetTwitch

SetTwitch sets the value of Twitch.

func (*ChannelStatisticsResponse) SetYoutube

SetYoutube sets the value of Youtube.

func (*ChannelStatisticsResponse) UnmarshalJSON

func (s *ChannelStatisticsResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type ChannelsChannelIDVideosGetBadRequest

type ChannelsChannelIDVideosGetBadRequest struct{}

ChannelsChannelIDVideosGetBadRequest is response for ChannelsChannelIDVideosGet operation.

type ChannelsChannelIDVideosGetForbidden

type ChannelsChannelIDVideosGetForbidden struct{}

ChannelsChannelIDVideosGetForbidden is response for ChannelsChannelIDVideosGet operation.

type ChannelsChannelIDVideosGetInternalServerError

type ChannelsChannelIDVideosGetInternalServerError struct{}

ChannelsChannelIDVideosGetInternalServerError is response for ChannelsChannelIDVideosGet operation.

type ChannelsChannelIDVideosGetNotFound

type ChannelsChannelIDVideosGetNotFound struct{}

ChannelsChannelIDVideosGetNotFound is response for ChannelsChannelIDVideosGet operation.

type ChannelsChannelIDVideosGetOK

type ChannelsChannelIDVideosGetOK struct {
	Data       OptVideosResponse `json:"data"`
	Pagination OptPagination     `json:"pagination"`
}

func (*ChannelsChannelIDVideosGetOK) Decode

Decode decodes ChannelsChannelIDVideosGetOK from json.

func (*ChannelsChannelIDVideosGetOK) Encode

func (s *ChannelsChannelIDVideosGetOK) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*ChannelsChannelIDVideosGetOK) GetData

GetData returns the value of Data.

func (*ChannelsChannelIDVideosGetOK) GetPagination

func (s *ChannelsChannelIDVideosGetOK) GetPagination() OptPagination

GetPagination returns the value of Pagination.

func (*ChannelsChannelIDVideosGetOK) MarshalJSON

func (s *ChannelsChannelIDVideosGetOK) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ChannelsChannelIDVideosGetOK) SetData

SetData sets the value of Data.

func (*ChannelsChannelIDVideosGetOK) SetPagination

func (s *ChannelsChannelIDVideosGetOK) SetPagination(val OptPagination)

SetPagination sets the value of Pagination.

func (*ChannelsChannelIDVideosGetOK) UnmarshalJSON

func (s *ChannelsChannelIDVideosGetOK) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type ChannelsChannelIDVideosGetParams

type ChannelsChannelIDVideosGetParams struct {
	// Unique identifier of the channel.
	ChannelID string
	// Comma-separated list of videos IDs.
	Ids OptString
	// Start Date.
	StartDate string
	// End Date.
	EndDate string
	// Page.
	Page OptInt
	// Page limit.
	Limit OptInt
}

ChannelsChannelIDVideosGetParams is parameters of GET /channels/{channel_id}/videos operation.

type ChannelsChannelIDVideosGetRes

type ChannelsChannelIDVideosGetRes interface {
	// contains filtered or unexported methods
}

type ChannelsChannelIDVideosGetUnauthorized

type ChannelsChannelIDVideosGetUnauthorized struct{}

ChannelsChannelIDVideosGetUnauthorized is response for ChannelsChannelIDVideosGet operation.

type ChannelsChannelIDVideosPostBadRequest

type ChannelsChannelIDVideosPostBadRequest struct{}

ChannelsChannelIDVideosPostBadRequest is response for ChannelsChannelIDVideosPost operation.

type ChannelsChannelIDVideosPostForbidden

type ChannelsChannelIDVideosPostForbidden struct{}

ChannelsChannelIDVideosPostForbidden is response for ChannelsChannelIDVideosPost operation.

type ChannelsChannelIDVideosPostInternalServerError

type ChannelsChannelIDVideosPostInternalServerError struct{}

ChannelsChannelIDVideosPostInternalServerError is response for ChannelsChannelIDVideosPost operation.

type ChannelsChannelIDVideosPostNotFound

type ChannelsChannelIDVideosPostNotFound struct{}

ChannelsChannelIDVideosPostNotFound is response for ChannelsChannelIDVideosPost operation.

type ChannelsChannelIDVideosPostParams

type ChannelsChannelIDVideosPostParams struct {
	// Unique identifier of the channel.
	ChannelID string
}

ChannelsChannelIDVideosPostParams is parameters of POST /channels/{channel_id}/videos operation.

type ChannelsChannelIDVideosPostReq

type ChannelsChannelIDVideosPostReq struct {
	// Array of YouTube Video IDs.
	Ids []string `json:"ids"`
}

func (*ChannelsChannelIDVideosPostReq) Decode

Decode decodes ChannelsChannelIDVideosPostReq from json.

func (*ChannelsChannelIDVideosPostReq) Encode

Encode implements json.Marshaler.

func (*ChannelsChannelIDVideosPostReq) GetIds

func (s *ChannelsChannelIDVideosPostReq) GetIds() []string

GetIds returns the value of Ids.

func (*ChannelsChannelIDVideosPostReq) MarshalJSON

func (s *ChannelsChannelIDVideosPostReq) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ChannelsChannelIDVideosPostReq) SetIds

func (s *ChannelsChannelIDVideosPostReq) SetIds(val []string)

SetIds sets the value of Ids.

func (*ChannelsChannelIDVideosPostReq) UnmarshalJSON

func (s *ChannelsChannelIDVideosPostReq) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type ChannelsChannelIDVideosPostRes

type ChannelsChannelIDVideosPostRes interface {
	// contains filtered or unexported methods
}

type ChannelsChannelIDVideosPostUnauthorized

type ChannelsChannelIDVideosPostUnauthorized struct{}

ChannelsChannelIDVideosPostUnauthorized is response for ChannelsChannelIDVideosPost operation.

type ChannelsChannelIDVideosPutBadRequest

type ChannelsChannelIDVideosPutBadRequest struct{}

ChannelsChannelIDVideosPutBadRequest is response for ChannelsChannelIDVideosPut operation.

type ChannelsChannelIDVideosPutForbidden

type ChannelsChannelIDVideosPutForbidden struct{}

ChannelsChannelIDVideosPutForbidden is response for ChannelsChannelIDVideosPut operation.

type ChannelsChannelIDVideosPutInternalServerError

type ChannelsChannelIDVideosPutInternalServerError struct{}

ChannelsChannelIDVideosPutInternalServerError is response for ChannelsChannelIDVideosPut operation.

type ChannelsChannelIDVideosPutNotFound

type ChannelsChannelIDVideosPutNotFound struct{}

ChannelsChannelIDVideosPutNotFound is response for ChannelsChannelIDVideosPut operation.

type ChannelsChannelIDVideosPutParams

type ChannelsChannelIDVideosPutParams struct {
	// Unique identifier of the channel.
	ChannelID string
}

ChannelsChannelIDVideosPutParams is parameters of PUT /channels/{channel_id}/videos operation.

type ChannelsChannelIDVideosPutReq

type ChannelsChannelIDVideosPutReq struct {
	// Array of YouTube Video IDs.
	Ids []string `json:"ids"`
}

func (*ChannelsChannelIDVideosPutReq) Decode

Decode decodes ChannelsChannelIDVideosPutReq from json.

func (*ChannelsChannelIDVideosPutReq) Encode

Encode implements json.Marshaler.

func (*ChannelsChannelIDVideosPutReq) GetIds

func (s *ChannelsChannelIDVideosPutReq) GetIds() []string

GetIds returns the value of Ids.

func (*ChannelsChannelIDVideosPutReq) MarshalJSON

func (s *ChannelsChannelIDVideosPutReq) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ChannelsChannelIDVideosPutReq) SetIds

func (s *ChannelsChannelIDVideosPutReq) SetIds(val []string)

SetIds sets the value of Ids.

func (*ChannelsChannelIDVideosPutReq) UnmarshalJSON

func (s *ChannelsChannelIDVideosPutReq) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type ChannelsChannelIDVideosPutRes

type ChannelsChannelIDVideosPutRes interface {
	// contains filtered or unexported methods
}

type ChannelsChannelIDVideosPutUnauthorized

type ChannelsChannelIDVideosPutUnauthorized struct{}

ChannelsChannelIDVideosPutUnauthorized is response for ChannelsChannelIDVideosPut operation.

type ChannelsGetBadRequest

type ChannelsGetBadRequest struct{}

ChannelsGetBadRequest is response for ChannelsGet operation.

type ChannelsGetForbidden

type ChannelsGetForbidden struct{}

ChannelsGetForbidden is response for ChannelsGet operation.

type ChannelsGetInternalServerError

type ChannelsGetInternalServerError struct{}

ChannelsGetInternalServerError is response for ChannelsGet operation.

type ChannelsGetNotFound

type ChannelsGetNotFound struct{}

ChannelsGetNotFound is response for ChannelsGet operation.

type ChannelsGetOK

type ChannelsGetOK struct {
	Data       OptChannelsResponse `json:"data"`
	Pagination OptPagination       `json:"pagination"`
}

func (*ChannelsGetOK) Decode

func (s *ChannelsGetOK) Decode(d *jx.Decoder) error

Decode decodes ChannelsGetOK from json.

func (*ChannelsGetOK) Encode

func (s *ChannelsGetOK) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*ChannelsGetOK) GetData

func (s *ChannelsGetOK) GetData() OptChannelsResponse

GetData returns the value of Data.

func (*ChannelsGetOK) GetPagination

func (s *ChannelsGetOK) GetPagination() OptPagination

GetPagination returns the value of Pagination.

func (*ChannelsGetOK) MarshalJSON

func (s *ChannelsGetOK) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ChannelsGetOK) SetData

func (s *ChannelsGetOK) SetData(val OptChannelsResponse)

SetData sets the value of Data.

func (*ChannelsGetOK) SetPagination

func (s *ChannelsGetOK) SetPagination(val OptPagination)

SetPagination sets the value of Pagination.

func (*ChannelsGetOK) UnmarshalJSON

func (s *ChannelsGetOK) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type ChannelsGetParams

type ChannelsGetParams struct {
	// Comma-separated list of channel IDs.
	Ids OptString
	// Page.
	Page OptInt
	// Page limit.
	Limit OptInt
}

ChannelsGetParams is parameters of GET /channels operation.

type ChannelsGetRes

type ChannelsGetRes interface {
	// contains filtered or unexported methods
}

type ChannelsGetUnauthorized

type ChannelsGetUnauthorized struct{}

ChannelsGetUnauthorized is response for ChannelsGet operation.

type ChannelsPostBadRequest

type ChannelsPostBadRequest struct{}

ChannelsPostBadRequest is response for ChannelsPost operation.

type ChannelsPostForbidden

type ChannelsPostForbidden struct{}

ChannelsPostForbidden is response for ChannelsPost operation.

type ChannelsPostInternalServerError

type ChannelsPostInternalServerError struct{}

ChannelsPostInternalServerError is response for ChannelsPost operation.

type ChannelsPostNotFound

type ChannelsPostNotFound struct{}

ChannelsPostNotFound is response for ChannelsPost operation.

type ChannelsPostReq

type ChannelsPostReq struct {
	// Array of YouTube channel IDs.
	Ids []string `json:"ids"`
}

func (*ChannelsPostReq) Decode

func (s *ChannelsPostReq) Decode(d *jx.Decoder) error

Decode decodes ChannelsPostReq from json.

func (*ChannelsPostReq) Encode

func (s *ChannelsPostReq) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*ChannelsPostReq) GetIds

func (s *ChannelsPostReq) GetIds() []string

GetIds returns the value of Ids.

func (*ChannelsPostReq) MarshalJSON

func (s *ChannelsPostReq) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ChannelsPostReq) SetIds

func (s *ChannelsPostReq) SetIds(val []string)

SetIds sets the value of Ids.

func (*ChannelsPostReq) UnmarshalJSON

func (s *ChannelsPostReq) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type ChannelsPostRes

type ChannelsPostRes interface {
	// contains filtered or unexported methods
}

type ChannelsPostUnauthorized

type ChannelsPostUnauthorized struct{}

ChannelsPostUnauthorized is response for ChannelsPost operation.

type ChannelsPutBadRequest

type ChannelsPutBadRequest struct{}

ChannelsPutBadRequest is response for ChannelsPut operation.

type ChannelsPutForbidden

type ChannelsPutForbidden struct{}

ChannelsPutForbidden is response for ChannelsPut operation.

type ChannelsPutInternalServerError

type ChannelsPutInternalServerError struct{}

ChannelsPutInternalServerError is response for ChannelsPut operation.

type ChannelsPutNotFound

type ChannelsPutNotFound struct{}

ChannelsPutNotFound is response for ChannelsPut operation.

type ChannelsPutReq

type ChannelsPutReq struct {
	// Array of YouTube channel IDs.
	Ids []string `json:"ids"`
}

func (*ChannelsPutReq) Decode

func (s *ChannelsPutReq) Decode(d *jx.Decoder) error

Decode decodes ChannelsPutReq from json.

func (*ChannelsPutReq) Encode

func (s *ChannelsPutReq) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*ChannelsPutReq) GetIds

func (s *ChannelsPutReq) GetIds() []string

GetIds returns the value of Ids.

func (*ChannelsPutReq) MarshalJSON

func (s *ChannelsPutReq) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ChannelsPutReq) SetIds

func (s *ChannelsPutReq) SetIds(val []string)

SetIds sets the value of Ids.

func (*ChannelsPutReq) UnmarshalJSON

func (s *ChannelsPutReq) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type ChannelsPutRes

type ChannelsPutRes interface {
	// contains filtered or unexported methods
}

type ChannelsPutUnauthorized

type ChannelsPutUnauthorized struct{}

ChannelsPutUnauthorized is response for ChannelsPut operation.

type ChannelsResponse

type ChannelsResponse struct {
	Channels []ChannelResponse `json:"channels"`
}

Ref: #/components/schemas/ChannelsResponse

func (*ChannelsResponse) Decode

func (s *ChannelsResponse) Decode(d *jx.Decoder) error

Decode decodes ChannelsResponse from json.

func (*ChannelsResponse) Encode

func (s *ChannelsResponse) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*ChannelsResponse) GetChannels

func (s *ChannelsResponse) GetChannels() []ChannelResponse

GetChannels returns the value of Channels.

func (*ChannelsResponse) MarshalJSON

func (s *ChannelsResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ChannelsResponse) SetChannels

func (s *ChannelsResponse) SetChannels(val []ChannelResponse)

SetChannels sets the value of Channels.

func (*ChannelsResponse) UnmarshalJSON

func (s *ChannelsResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client implements OAS client.

func NewClient

func NewClient(serverURL string, sec SecuritySource, opts ...ClientOption) (*Client, error)

NewClient initializes new Client defined by OAS.

func (*Client) ChannelsChannelIDVideosGet

func (c *Client) ChannelsChannelIDVideosGet(ctx context.Context, params ChannelsChannelIDVideosGetParams) (ChannelsChannelIDVideosGetRes, error)

ChannelsChannelIDVideosGet invokes GET /channels/{channel_id}/videos operation.

Retrieve all videos related to a specific channel.

GET /channels/{channel_id}/videos

func (*Client) ChannelsChannelIDVideosPost

ChannelsChannelIDVideosPost invokes POST /channels/{channel_id}/videos operation.

Update videos related to a specific channel based on provided cronType.

POST /channels/{channel_id}/videos

func (*Client) ChannelsChannelIDVideosPut

ChannelsChannelIDVideosPut invokes PUT /channels/{channel_id}/videos operation.

Update videos related to a specific channel based on provided cronType.

PUT /channels/{channel_id}/videos

func (*Client) ChannelsGet

func (c *Client) ChannelsGet(ctx context.Context, params ChannelsGetParams) (ChannelsGetRes, error)

ChannelsGet invokes GET /channels operation.

Retrieves all channels based on provided IDs.

GET /channels

func (*Client) ChannelsPost

func (c *Client) ChannelsPost(ctx context.Context, request *ChannelsPostReq) (ChannelsPostRes, error)

ChannelsPost invokes POST /channels operation.

Creates channels by fetching from Youtube using provided Channel IDs.

POST /channels

func (*Client) ChannelsPut

func (c *Client) ChannelsPut(ctx context.Context, request *ChannelsPutReq) (ChannelsPutRes, error)

ChannelsPut invokes PUT /channels operation.

Updates channels by fetching from Youtube using provided Channel IDs.

PUT /channels

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 ErrorHandler

type ErrorHandler = ogenerrors.ErrorHandler

ErrorHandler is error handler.

type Handler

type Handler interface {
	// ChannelsChannelIDVideosGet implements GET /channels/{channel_id}/videos operation.
	//
	// Retrieve all videos related to a specific channel.
	//
	// GET /channels/{channel_id}/videos
	ChannelsChannelIDVideosGet(ctx context.Context, params ChannelsChannelIDVideosGetParams) (ChannelsChannelIDVideosGetRes, error)
	// ChannelsChannelIDVideosPost implements POST /channels/{channel_id}/videos operation.
	//
	// Update videos related to a specific channel based on provided cronType.
	//
	// POST /channels/{channel_id}/videos
	ChannelsChannelIDVideosPost(ctx context.Context, req *ChannelsChannelIDVideosPostReq, params ChannelsChannelIDVideosPostParams) (ChannelsChannelIDVideosPostRes, error)
	// ChannelsChannelIDVideosPut implements PUT /channels/{channel_id}/videos operation.
	//
	// Update videos related to a specific channel based on provided cronType.
	//
	// PUT /channels/{channel_id}/videos
	ChannelsChannelIDVideosPut(ctx context.Context, req *ChannelsChannelIDVideosPutReq, params ChannelsChannelIDVideosPutParams) (ChannelsChannelIDVideosPutRes, error)
	// ChannelsGet implements GET /channels operation.
	//
	// Retrieves all channels based on provided IDs.
	//
	// GET /channels
	ChannelsGet(ctx context.Context, params ChannelsGetParams) (ChannelsGetRes, error)
	// ChannelsPost implements POST /channels operation.
	//
	// Creates channels by fetching from Youtube using provided Channel IDs.
	//
	// POST /channels
	ChannelsPost(ctx context.Context, req *ChannelsPostReq) (ChannelsPostRes, error)
	// ChannelsPut implements PUT /channels operation.
	//
	// Updates channels by fetching from Youtube using provided Channel IDs.
	//
	// PUT /channels
	ChannelsPut(ctx context.Context, req *ChannelsPutReq) (ChannelsPutRes, error)
}

Handler handles operations described by OpenAPI v3 specification.

type Invoker

type Invoker interface {
	// ChannelsChannelIDVideosGet invokes GET /channels/{channel_id}/videos operation.
	//
	// Retrieve all videos related to a specific channel.
	//
	// GET /channels/{channel_id}/videos
	ChannelsChannelIDVideosGet(ctx context.Context, params ChannelsChannelIDVideosGetParams) (ChannelsChannelIDVideosGetRes, error)
	// ChannelsChannelIDVideosPost invokes POST /channels/{channel_id}/videos operation.
	//
	// Update videos related to a specific channel based on provided cronType.
	//
	// POST /channels/{channel_id}/videos
	ChannelsChannelIDVideosPost(ctx context.Context, request *ChannelsChannelIDVideosPostReq, params ChannelsChannelIDVideosPostParams) (ChannelsChannelIDVideosPostRes, error)
	// ChannelsChannelIDVideosPut invokes PUT /channels/{channel_id}/videos operation.
	//
	// Update videos related to a specific channel based on provided cronType.
	//
	// PUT /channels/{channel_id}/videos
	ChannelsChannelIDVideosPut(ctx context.Context, request *ChannelsChannelIDVideosPutReq, params ChannelsChannelIDVideosPutParams) (ChannelsChannelIDVideosPutRes, error)
	// ChannelsGet invokes GET /channels operation.
	//
	// Retrieves all channels based on provided IDs.
	//
	// GET /channels
	ChannelsGet(ctx context.Context, params ChannelsGetParams) (ChannelsGetRes, error)
	// ChannelsPost invokes POST /channels operation.
	//
	// Creates channels by fetching from Youtube using provided Channel IDs.
	//
	// POST /channels
	ChannelsPost(ctx context.Context, request *ChannelsPostReq) (ChannelsPostRes, error)
	// ChannelsPut invokes PUT /channels operation.
	//
	// Updates channels by fetching from Youtube using provided Channel IDs.
	//
	// PUT /channels
	ChannelsPut(ctx context.Context, request *ChannelsPutReq) (ChannelsPutRes, error)
}

Invoker invokes operations described by OpenAPI v3 specification.

type Middleware

type Middleware = middleware.Middleware

Middleware is middleware type.

type OptBool

type OptBool struct {
	Value bool
	Set   bool
}

OptBool is optional bool.

func NewOptBool

func NewOptBool(v bool) OptBool

NewOptBool returns new OptBool with value set to v.

func (*OptBool) Decode

func (o *OptBool) Decode(d *jx.Decoder) error

Decode decodes bool from json.

func (OptBool) Encode

func (o OptBool) Encode(e *jx.Encoder)

Encode encodes bool as json.

func (OptBool) Get

func (o OptBool) Get() (v bool, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptBool) IsSet

func (o OptBool) IsSet() bool

IsSet returns true if OptBool was set.

func (OptBool) MarshalJSON

func (s OptBool) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptBool) Or

func (o OptBool) Or(d bool) bool

Or returns value if set, or given parameter if does not.

func (*OptBool) Reset

func (o *OptBool) Reset()

Reset unsets value.

func (*OptBool) SetTo

func (o *OptBool) SetTo(v bool)

SetTo sets value to v.

func (*OptBool) UnmarshalJSON

func (s *OptBool) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptChannelSnippetResponse

type OptChannelSnippetResponse struct {
	Value ChannelSnippetResponse
	Set   bool
}

OptChannelSnippetResponse is optional ChannelSnippetResponse.

func NewOptChannelSnippetResponse

func NewOptChannelSnippetResponse(v ChannelSnippetResponse) OptChannelSnippetResponse

NewOptChannelSnippetResponse returns new OptChannelSnippetResponse with value set to v.

func (*OptChannelSnippetResponse) Decode

func (o *OptChannelSnippetResponse) Decode(d *jx.Decoder) error

Decode decodes ChannelSnippetResponse from json.

func (OptChannelSnippetResponse) Encode

func (o OptChannelSnippetResponse) Encode(e *jx.Encoder)

Encode encodes ChannelSnippetResponse as json.

func (OptChannelSnippetResponse) Get

Get returns value and boolean that denotes whether value was set.

func (OptChannelSnippetResponse) IsSet

func (o OptChannelSnippetResponse) IsSet() bool

IsSet returns true if OptChannelSnippetResponse was set.

func (OptChannelSnippetResponse) MarshalJSON

func (s OptChannelSnippetResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptChannelSnippetResponse) Or

Or returns value if set, or given parameter if does not.

func (*OptChannelSnippetResponse) Reset

func (o *OptChannelSnippetResponse) Reset()

Reset unsets value.

func (*OptChannelSnippetResponse) SetTo

SetTo sets value to v.

func (*OptChannelSnippetResponse) UnmarshalJSON

func (s *OptChannelSnippetResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptChannelStatisticsResponse

type OptChannelStatisticsResponse struct {
	Value ChannelStatisticsResponse
	Set   bool
}

OptChannelStatisticsResponse is optional ChannelStatisticsResponse.

func NewOptChannelStatisticsResponse

func NewOptChannelStatisticsResponse(v ChannelStatisticsResponse) OptChannelStatisticsResponse

NewOptChannelStatisticsResponse returns new OptChannelStatisticsResponse with value set to v.

func (*OptChannelStatisticsResponse) Decode

Decode decodes ChannelStatisticsResponse from json.

func (OptChannelStatisticsResponse) Encode

Encode encodes ChannelStatisticsResponse as json.

func (OptChannelStatisticsResponse) Get

Get returns value and boolean that denotes whether value was set.

func (OptChannelStatisticsResponse) IsSet

IsSet returns true if OptChannelStatisticsResponse was set.

func (OptChannelStatisticsResponse) MarshalJSON

func (s OptChannelStatisticsResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptChannelStatisticsResponse) Or

Or returns value if set, or given parameter if does not.

func (*OptChannelStatisticsResponse) Reset

func (o *OptChannelStatisticsResponse) Reset()

Reset unsets value.

func (*OptChannelStatisticsResponse) SetTo

SetTo sets value to v.

func (*OptChannelStatisticsResponse) UnmarshalJSON

func (s *OptChannelStatisticsResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptChannelsResponse

type OptChannelsResponse struct {
	Value ChannelsResponse
	Set   bool
}

OptChannelsResponse is optional ChannelsResponse.

func NewOptChannelsResponse

func NewOptChannelsResponse(v ChannelsResponse) OptChannelsResponse

NewOptChannelsResponse returns new OptChannelsResponse with value set to v.

func (*OptChannelsResponse) Decode

func (o *OptChannelsResponse) Decode(d *jx.Decoder) error

Decode decodes ChannelsResponse from json.

func (OptChannelsResponse) Encode

func (o OptChannelsResponse) Encode(e *jx.Encoder)

Encode encodes ChannelsResponse as json.

func (OptChannelsResponse) Get

func (o OptChannelsResponse) Get() (v ChannelsResponse, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptChannelsResponse) IsSet

func (o OptChannelsResponse) IsSet() bool

IsSet returns true if OptChannelsResponse was set.

func (OptChannelsResponse) MarshalJSON

func (s OptChannelsResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptChannelsResponse) Or

Or returns value if set, or given parameter if does not.

func (*OptChannelsResponse) Reset

func (o *OptChannelsResponse) Reset()

Reset unsets value.

func (*OptChannelsResponse) SetTo

SetTo sets value to v.

func (*OptChannelsResponse) UnmarshalJSON

func (s *OptChannelsResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptDateTime

type OptDateTime struct {
	Value time.Time
	Set   bool
}

OptDateTime is optional time.Time.

func NewOptDateTime

func NewOptDateTime(v time.Time) OptDateTime

NewOptDateTime returns new OptDateTime with value set to v.

func (*OptDateTime) Decode

func (o *OptDateTime) Decode(d *jx.Decoder, format func(*jx.Decoder) (time.Time, error)) error

Decode decodes time.Time from json.

func (OptDateTime) Encode

func (o OptDateTime) Encode(e *jx.Encoder, format func(*jx.Encoder, time.Time))

Encode encodes time.Time as json.

func (OptDateTime) Get

func (o OptDateTime) Get() (v time.Time, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptDateTime) IsSet

func (o OptDateTime) IsSet() bool

IsSet returns true if OptDateTime was set.

func (OptDateTime) MarshalJSON

func (s OptDateTime) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptDateTime) Or

func (o OptDateTime) Or(d time.Time) time.Time

Or returns value if set, or given parameter if does not.

func (*OptDateTime) Reset

func (o *OptDateTime) Reset()

Reset unsets value.

func (*OptDateTime) SetTo

func (o *OptDateTime) SetTo(v time.Time)

SetTo sets value to v.

func (*OptDateTime) UnmarshalJSON

func (s *OptDateTime) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptInt

type OptInt struct {
	Value int
	Set   bool
}

OptInt is optional int.

func NewOptInt

func NewOptInt(v int) OptInt

NewOptInt returns new OptInt with value set to v.

func (*OptInt) Decode

func (o *OptInt) Decode(d *jx.Decoder) error

Decode decodes int from json.

func (OptInt) Encode

func (o OptInt) Encode(e *jx.Encoder)

Encode encodes int as json.

func (OptInt) Get

func (o OptInt) Get() (v int, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptInt) IsSet

func (o OptInt) IsSet() bool

IsSet returns true if OptInt was set.

func (OptInt) MarshalJSON

func (s OptInt) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptInt) Or

func (o OptInt) Or(d int) int

Or returns value if set, or given parameter if does not.

func (*OptInt) Reset

func (o *OptInt) Reset()

Reset unsets value.

func (*OptInt) SetTo

func (o *OptInt) SetTo(v int)

SetTo sets value to v.

func (*OptInt) UnmarshalJSON

func (s *OptInt) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptInt64

type OptInt64 struct {
	Value int64
	Set   bool
}

OptInt64 is optional int64.

func NewOptInt64

func NewOptInt64(v int64) OptInt64

NewOptInt64 returns new OptInt64 with value set to v.

func (*OptInt64) Decode

func (o *OptInt64) Decode(d *jx.Decoder) error

Decode decodes int64 from json.

func (OptInt64) Encode

func (o OptInt64) Encode(e *jx.Encoder)

Encode encodes int64 as json.

func (OptInt64) Get

func (o OptInt64) Get() (v int64, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptInt64) IsSet

func (o OptInt64) IsSet() bool

IsSet returns true if OptInt64 was set.

func (OptInt64) MarshalJSON

func (s OptInt64) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptInt64) Or

func (o OptInt64) Or(d int64) int64

Or returns value if set, or given parameter if does not.

func (*OptInt64) Reset

func (o *OptInt64) Reset()

Reset unsets value.

func (*OptInt64) SetTo

func (o *OptInt64) SetTo(v int64)

SetTo sets value to v.

func (*OptInt64) UnmarshalJSON

func (s *OptInt64) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptPagination

type OptPagination struct {
	Value Pagination
	Set   bool
}

OptPagination is optional Pagination.

func NewOptPagination

func NewOptPagination(v Pagination) OptPagination

NewOptPagination returns new OptPagination with value set to v.

func (*OptPagination) Decode

func (o *OptPagination) Decode(d *jx.Decoder) error

Decode decodes Pagination from json.

func (OptPagination) Encode

func (o OptPagination) Encode(e *jx.Encoder)

Encode encodes Pagination as json.

func (OptPagination) Get

func (o OptPagination) Get() (v Pagination, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptPagination) IsSet

func (o OptPagination) IsSet() bool

IsSet returns true if OptPagination was set.

func (OptPagination) MarshalJSON

func (s OptPagination) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptPagination) Or

Or returns value if set, or given parameter if does not.

func (*OptPagination) Reset

func (o *OptPagination) Reset()

Reset unsets value.

func (*OptPagination) SetTo

func (o *OptPagination) SetTo(v Pagination)

SetTo sets value to v.

func (*OptPagination) UnmarshalJSON

func (s *OptPagination) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptPlatformSnippet

type OptPlatformSnippet struct {
	Value PlatformSnippet
	Set   bool
}

OptPlatformSnippet is optional PlatformSnippet.

func NewOptPlatformSnippet

func NewOptPlatformSnippet(v PlatformSnippet) OptPlatformSnippet

NewOptPlatformSnippet returns new OptPlatformSnippet with value set to v.

func (*OptPlatformSnippet) Decode

func (o *OptPlatformSnippet) Decode(d *jx.Decoder) error

Decode decodes PlatformSnippet from json.

func (OptPlatformSnippet) Encode

func (o OptPlatformSnippet) Encode(e *jx.Encoder)

Encode encodes PlatformSnippet as json.

func (OptPlatformSnippet) Get

func (o OptPlatformSnippet) Get() (v PlatformSnippet, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptPlatformSnippet) IsSet

func (o OptPlatformSnippet) IsSet() bool

IsSet returns true if OptPlatformSnippet was set.

func (OptPlatformSnippet) MarshalJSON

func (s OptPlatformSnippet) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptPlatformSnippet) Or

Or returns value if set, or given parameter if does not.

func (*OptPlatformSnippet) Reset

func (o *OptPlatformSnippet) Reset()

Reset unsets value.

func (*OptPlatformSnippet) SetTo

func (o *OptPlatformSnippet) SetTo(v PlatformSnippet)

SetTo sets value to v.

func (*OptPlatformSnippet) UnmarshalJSON

func (s *OptPlatformSnippet) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptPlatformStatistics

type OptPlatformStatistics struct {
	Value PlatformStatistics
	Set   bool
}

OptPlatformStatistics is optional PlatformStatistics.

func NewOptPlatformStatistics

func NewOptPlatformStatistics(v PlatformStatistics) OptPlatformStatistics

NewOptPlatformStatistics returns new OptPlatformStatistics with value set to v.

func (*OptPlatformStatistics) Decode

func (o *OptPlatformStatistics) Decode(d *jx.Decoder) error

Decode decodes PlatformStatistics from json.

func (OptPlatformStatistics) Encode

func (o OptPlatformStatistics) Encode(e *jx.Encoder)

Encode encodes PlatformStatistics as json.

func (OptPlatformStatistics) Get

Get returns value and boolean that denotes whether value was set.

func (OptPlatformStatistics) IsSet

func (o OptPlatformStatistics) IsSet() bool

IsSet returns true if OptPlatformStatistics was set.

func (OptPlatformStatistics) MarshalJSON

func (s OptPlatformStatistics) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptPlatformStatistics) Or

Or returns value if set, or given parameter if does not.

func (*OptPlatformStatistics) Reset

func (o *OptPlatformStatistics) Reset()

Reset unsets value.

func (*OptPlatformStatistics) SetTo

SetTo sets value to v.

func (*OptPlatformStatistics) UnmarshalJSON

func (s *OptPlatformStatistics) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptString

type OptString struct {
	Value string
	Set   bool
}

OptString is optional string.

func NewOptString

func NewOptString(v string) OptString

NewOptString returns new OptString with value set to v.

func (*OptString) Decode

func (o *OptString) Decode(d *jx.Decoder) error

Decode decodes string from json.

func (OptString) Encode

func (o OptString) Encode(e *jx.Encoder)

Encode encodes string as json.

func (OptString) Get

func (o OptString) Get() (v string, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptString) IsSet

func (o OptString) IsSet() bool

IsSet returns true if OptString was set.

func (OptString) MarshalJSON

func (s OptString) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptString) Or

func (o OptString) Or(d string) string

Or returns value if set, or given parameter if does not.

func (*OptString) Reset

func (o *OptString) Reset()

Reset unsets value.

func (*OptString) SetTo

func (o *OptString) SetTo(v string)

SetTo sets value to v.

func (*OptString) UnmarshalJSON

func (s *OptString) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptThumbnailResponse

type OptThumbnailResponse struct {
	Value ThumbnailResponse
	Set   bool
}

OptThumbnailResponse is optional ThumbnailResponse.

func NewOptThumbnailResponse

func NewOptThumbnailResponse(v ThumbnailResponse) OptThumbnailResponse

NewOptThumbnailResponse returns new OptThumbnailResponse with value set to v.

func (*OptThumbnailResponse) Decode

func (o *OptThumbnailResponse) Decode(d *jx.Decoder) error

Decode decodes ThumbnailResponse from json.

func (OptThumbnailResponse) Encode

func (o OptThumbnailResponse) Encode(e *jx.Encoder)

Encode encodes ThumbnailResponse as json.

func (OptThumbnailResponse) Get

Get returns value and boolean that denotes whether value was set.

func (OptThumbnailResponse) IsSet

func (o OptThumbnailResponse) IsSet() bool

IsSet returns true if OptThumbnailResponse was set.

func (OptThumbnailResponse) MarshalJSON

func (s OptThumbnailResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptThumbnailResponse) Or

Or returns value if set, or given parameter if does not.

func (*OptThumbnailResponse) Reset

func (o *OptThumbnailResponse) Reset()

Reset unsets value.

func (*OptThumbnailResponse) SetTo

SetTo sets value to v.

func (*OptThumbnailResponse) UnmarshalJSON

func (s *OptThumbnailResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptThumbnailsResponse

type OptThumbnailsResponse struct {
	Value ThumbnailsResponse
	Set   bool
}

OptThumbnailsResponse is optional ThumbnailsResponse.

func NewOptThumbnailsResponse

func NewOptThumbnailsResponse(v ThumbnailsResponse) OptThumbnailsResponse

NewOptThumbnailsResponse returns new OptThumbnailsResponse with value set to v.

func (*OptThumbnailsResponse) Decode

func (o *OptThumbnailsResponse) Decode(d *jx.Decoder) error

Decode decodes ThumbnailsResponse from json.

func (OptThumbnailsResponse) Encode

func (o OptThumbnailsResponse) Encode(e *jx.Encoder)

Encode encodes ThumbnailsResponse as json.

func (OptThumbnailsResponse) Get

Get returns value and boolean that denotes whether value was set.

func (OptThumbnailsResponse) IsSet

func (o OptThumbnailsResponse) IsSet() bool

IsSet returns true if OptThumbnailsResponse was set.

func (OptThumbnailsResponse) MarshalJSON

func (s OptThumbnailsResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptThumbnailsResponse) Or

Or returns value if set, or given parameter if does not.

func (*OptThumbnailsResponse) Reset

func (o *OptThumbnailsResponse) Reset()

Reset unsets value.

func (*OptThumbnailsResponse) SetTo

SetTo sets value to v.

func (*OptThumbnailsResponse) UnmarshalJSON

func (s *OptThumbnailsResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptVideosResponse

type OptVideosResponse struct {
	Value VideosResponse
	Set   bool
}

OptVideosResponse is optional VideosResponse.

func NewOptVideosResponse

func NewOptVideosResponse(v VideosResponse) OptVideosResponse

NewOptVideosResponse returns new OptVideosResponse with value set to v.

func (*OptVideosResponse) Decode

func (o *OptVideosResponse) Decode(d *jx.Decoder) error

Decode decodes VideosResponse from json.

func (OptVideosResponse) Encode

func (o OptVideosResponse) Encode(e *jx.Encoder)

Encode encodes VideosResponse as json.

func (OptVideosResponse) Get

func (o OptVideosResponse) Get() (v VideosResponse, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptVideosResponse) IsSet

func (o OptVideosResponse) IsSet() bool

IsSet returns true if OptVideosResponse was set.

func (OptVideosResponse) MarshalJSON

func (s OptVideosResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptVideosResponse) Or

Or returns value if set, or given parameter if does not.

func (*OptVideosResponse) Reset

func (o *OptVideosResponse) Reset()

Reset unsets value.

func (*OptVideosResponse) SetTo

func (o *OptVideosResponse) SetTo(v VideosResponse)

SetTo sets value to v.

func (*OptVideosResponse) UnmarshalJSON

func (s *OptVideosResponse) UnmarshalJSON(data []byte) error

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 Pagination

type Pagination struct {
	CurrentPage OptInt64 `json:"CurrentPage"`
	PrevPage    OptInt64 `json:"PrevPage"`
	NextPage    OptInt64 `json:"NextPage"`
	TotalPage   OptInt64 `json:"TotalPage"`
	TotalCount  OptInt64 `json:"TotalCount"`
	HasNext     OptBool  `json:"HasNext"`
}

Ref: #/components/schemas/Pagination

func (*Pagination) Decode

func (s *Pagination) Decode(d *jx.Decoder) error

Decode decodes Pagination from json.

func (*Pagination) Encode

func (s *Pagination) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*Pagination) GetCurrentPage

func (s *Pagination) GetCurrentPage() OptInt64

GetCurrentPage returns the value of CurrentPage.

func (*Pagination) GetHasNext

func (s *Pagination) GetHasNext() OptBool

GetHasNext returns the value of HasNext.

func (*Pagination) GetNextPage

func (s *Pagination) GetNextPage() OptInt64

GetNextPage returns the value of NextPage.

func (*Pagination) GetPrevPage

func (s *Pagination) GetPrevPage() OptInt64

GetPrevPage returns the value of PrevPage.

func (*Pagination) GetTotalCount

func (s *Pagination) GetTotalCount() OptInt64

GetTotalCount returns the value of TotalCount.

func (*Pagination) GetTotalPage

func (s *Pagination) GetTotalPage() OptInt64

GetTotalPage returns the value of TotalPage.

func (*Pagination) MarshalJSON

func (s *Pagination) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*Pagination) SetCurrentPage

func (s *Pagination) SetCurrentPage(val OptInt64)

SetCurrentPage sets the value of CurrentPage.

func (*Pagination) SetHasNext

func (s *Pagination) SetHasNext(val OptBool)

SetHasNext sets the value of HasNext.

func (*Pagination) SetNextPage

func (s *Pagination) SetNextPage(val OptInt64)

SetNextPage sets the value of NextPage.

func (*Pagination) SetPrevPage

func (s *Pagination) SetPrevPage(val OptInt64)

SetPrevPage sets the value of PrevPage.

func (*Pagination) SetTotalCount

func (s *Pagination) SetTotalCount(val OptInt64)

SetTotalCount sets the value of TotalCount.

func (*Pagination) SetTotalPage

func (s *Pagination) SetTotalPage(val OptInt64)

SetTotalPage sets the value of TotalPage.

func (*Pagination) UnmarshalJSON

func (s *Pagination) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type PlatformSnippet

type PlatformSnippet struct {
	Title       OptString             `json:"Title"`
	Description OptString             `json:"Description"`
	CustomURL   OptString             `json:"CustomURL"`
	PublishedAt OptDateTime           `json:"PublishedAt"`
	Thumbnails  OptThumbnailsResponse `json:"Thumbnails"`
}

Ref: #/components/schemas/PlatformSnippet

func (*PlatformSnippet) Decode

func (s *PlatformSnippet) Decode(d *jx.Decoder) error

Decode decodes PlatformSnippet from json.

func (*PlatformSnippet) Encode

func (s *PlatformSnippet) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*PlatformSnippet) GetCustomURL

func (s *PlatformSnippet) GetCustomURL() OptString

GetCustomURL returns the value of CustomURL.

func (*PlatformSnippet) GetDescription

func (s *PlatformSnippet) GetDescription() OptString

GetDescription returns the value of Description.

func (*PlatformSnippet) GetPublishedAt

func (s *PlatformSnippet) GetPublishedAt() OptDateTime

GetPublishedAt returns the value of PublishedAt.

func (*PlatformSnippet) GetThumbnails

func (s *PlatformSnippet) GetThumbnails() OptThumbnailsResponse

GetThumbnails returns the value of Thumbnails.

func (*PlatformSnippet) GetTitle

func (s *PlatformSnippet) GetTitle() OptString

GetTitle returns the value of Title.

func (*PlatformSnippet) MarshalJSON

func (s *PlatformSnippet) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*PlatformSnippet) SetCustomURL

func (s *PlatformSnippet) SetCustomURL(val OptString)

SetCustomURL sets the value of CustomURL.

func (*PlatformSnippet) SetDescription

func (s *PlatformSnippet) SetDescription(val OptString)

SetDescription sets the value of Description.

func (*PlatformSnippet) SetPublishedAt

func (s *PlatformSnippet) SetPublishedAt(val OptDateTime)

SetPublishedAt sets the value of PublishedAt.

func (*PlatformSnippet) SetThumbnails

func (s *PlatformSnippet) SetThumbnails(val OptThumbnailsResponse)

SetThumbnails sets the value of Thumbnails.

func (*PlatformSnippet) SetTitle

func (s *PlatformSnippet) SetTitle(val OptString)

SetTitle sets the value of Title.

func (*PlatformSnippet) UnmarshalJSON

func (s *PlatformSnippet) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type PlatformStatistics

type PlatformStatistics struct {
	ViewCount             OptString `json:"ViewCount"`
	SubscriberCount       OptString `json:"SubscriberCount"`
	HiddenSubscriberCount OptBool   `json:"HiddenSubscriberCount"`
	VideoCount            OptString `json:"VideoCount"`
}

Ref: #/components/schemas/PlatformStatistics

func (*PlatformStatistics) Decode

func (s *PlatformStatistics) Decode(d *jx.Decoder) error

Decode decodes PlatformStatistics from json.

func (*PlatformStatistics) Encode

func (s *PlatformStatistics) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*PlatformStatistics) GetHiddenSubscriberCount

func (s *PlatformStatistics) GetHiddenSubscriberCount() OptBool

GetHiddenSubscriberCount returns the value of HiddenSubscriberCount.

func (*PlatformStatistics) GetSubscriberCount

func (s *PlatformStatistics) GetSubscriberCount() OptString

GetSubscriberCount returns the value of SubscriberCount.

func (*PlatformStatistics) GetVideoCount

func (s *PlatformStatistics) GetVideoCount() OptString

GetVideoCount returns the value of VideoCount.

func (*PlatformStatistics) GetViewCount

func (s *PlatformStatistics) GetViewCount() OptString

GetViewCount returns the value of ViewCount.

func (*PlatformStatistics) MarshalJSON

func (s *PlatformStatistics) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*PlatformStatistics) SetHiddenSubscriberCount

func (s *PlatformStatistics) SetHiddenSubscriberCount(val OptBool)

SetHiddenSubscriberCount sets the value of HiddenSubscriberCount.

func (*PlatformStatistics) SetSubscriberCount

func (s *PlatformStatistics) SetSubscriberCount(val OptString)

SetSubscriberCount sets the value of SubscriberCount.

func (*PlatformStatistics) SetVideoCount

func (s *PlatformStatistics) SetVideoCount(val OptString)

SetVideoCount sets the value of VideoCount.

func (*PlatformStatistics) SetViewCount

func (s *PlatformStatistics) SetViewCount(val OptString)

SetViewCount sets the value of ViewCount.

func (*PlatformStatistics) UnmarshalJSON

func (s *PlatformStatistics) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type Route

type Route struct {
	// contains filtered or unexported fields
}

Route is route object.

func (Route) Args

func (r Route) Args() []string

Args returns parsed arguments.

func (Route) Name

func (r Route) Name() string

Name returns ogen operation name.

It is guaranteed to be unique and not empty.

func (Route) OperationID

func (r Route) OperationID() string

OperationID returns OpenAPI operationId.

func (Route) PathPattern

func (r Route) PathPattern() string

PathPattern returns OpenAPI path.

func (Route) Summary

func (r Route) Summary() string

Summary returns OpenAPI summary.

type SecurityHandler

type SecurityHandler interface {
	// HandleApiKeyAuth handles ApiKeyAuth security.
	HandleApiKeyAuth(ctx context.Context, operationName string, t ApiKeyAuth) (context.Context, error)
}

SecurityHandler is handler for security parameters.

type SecuritySource

type SecuritySource interface {
	// ApiKeyAuth provides ApiKeyAuth security value.
	ApiKeyAuth(ctx context.Context, operationName string) (ApiKeyAuth, error)
}

SecuritySource is provider of security values (tokens, passwords, etc.).

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, sec SecurityHandler, opts ...ServerOption) (*Server, error)

NewServer creates new Server.

func (*Server) FindPath

func (s *Server) FindPath(method string, u *url.URL) (r Route, _ bool)

FindPath finds Route for given method and URL.

func (*Server) FindRoute

func (s *Server) FindRoute(method, path string) (Route, bool)

FindRoute finds Route for given method and path.

Note: this method does not unescape path or handle reserved characters in path properly. Use FindPath instead.

func (*Server) ServeHTTP

func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP serves http request as defined by OpenAPI v3 specification, calling handler that matches the path or returning not found error.

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 ThumbnailResponse

type ThumbnailResponse struct {
	Height OptInt    `json:"height"`
	URL    OptString `json:"url"`
	Width  OptInt    `json:"width"`
}

Ref: #/components/schemas/ThumbnailResponse

func (*ThumbnailResponse) Decode

func (s *ThumbnailResponse) Decode(d *jx.Decoder) error

Decode decodes ThumbnailResponse from json.

func (*ThumbnailResponse) Encode

func (s *ThumbnailResponse) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*ThumbnailResponse) GetHeight

func (s *ThumbnailResponse) GetHeight() OptInt

GetHeight returns the value of Height.

func (*ThumbnailResponse) GetURL

func (s *ThumbnailResponse) GetURL() OptString

GetURL returns the value of URL.

func (*ThumbnailResponse) GetWidth

func (s *ThumbnailResponse) GetWidth() OptInt

GetWidth returns the value of Width.

func (*ThumbnailResponse) MarshalJSON

func (s *ThumbnailResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ThumbnailResponse) SetHeight

func (s *ThumbnailResponse) SetHeight(val OptInt)

SetHeight sets the value of Height.

func (*ThumbnailResponse) SetURL

func (s *ThumbnailResponse) SetURL(val OptString)

SetURL sets the value of URL.

func (*ThumbnailResponse) SetWidth

func (s *ThumbnailResponse) SetWidth(val OptInt)

SetWidth sets the value of Width.

func (*ThumbnailResponse) UnmarshalJSON

func (s *ThumbnailResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type ThumbnailsResponse

type ThumbnailsResponse struct {
	Default  OptThumbnailResponse `json:"default"`
	High     OptThumbnailResponse `json:"high"`
	Maxres   OptThumbnailResponse `json:"maxres"`
	Medium   OptThumbnailResponse `json:"medium"`
	Standard OptThumbnailResponse `json:"standard"`
}

Ref: #/components/schemas/ThumbnailsResponse

func (*ThumbnailsResponse) Decode

func (s *ThumbnailsResponse) Decode(d *jx.Decoder) error

Decode decodes ThumbnailsResponse from json.

func (*ThumbnailsResponse) Encode

func (s *ThumbnailsResponse) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*ThumbnailsResponse) GetDefault

func (s *ThumbnailsResponse) GetDefault() OptThumbnailResponse

GetDefault returns the value of Default.

func (*ThumbnailsResponse) GetHigh

GetHigh returns the value of High.

func (*ThumbnailsResponse) GetMaxres

GetMaxres returns the value of Maxres.

func (*ThumbnailsResponse) GetMedium

GetMedium returns the value of Medium.

func (*ThumbnailsResponse) GetStandard

func (s *ThumbnailsResponse) GetStandard() OptThumbnailResponse

GetStandard returns the value of Standard.

func (*ThumbnailsResponse) MarshalJSON

func (s *ThumbnailsResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ThumbnailsResponse) SetDefault

func (s *ThumbnailsResponse) SetDefault(val OptThumbnailResponse)

SetDefault sets the value of Default.

func (*ThumbnailsResponse) SetHigh

func (s *ThumbnailsResponse) SetHigh(val OptThumbnailResponse)

SetHigh sets the value of High.

func (*ThumbnailsResponse) SetMaxres

func (s *ThumbnailsResponse) SetMaxres(val OptThumbnailResponse)

SetMaxres sets the value of Maxres.

func (*ThumbnailsResponse) SetMedium

func (s *ThumbnailsResponse) SetMedium(val OptThumbnailResponse)

SetMedium sets the value of Medium.

func (*ThumbnailsResponse) SetStandard

func (s *ThumbnailsResponse) SetStandard(val OptThumbnailResponse)

SetStandard sets the value of Standard.

func (*ThumbnailsResponse) UnmarshalJSON

func (s *ThumbnailsResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type UnimplementedHandler

type UnimplementedHandler struct{}

UnimplementedHandler is no-op Handler which returns http.ErrNotImplemented.

func (UnimplementedHandler) ChannelsChannelIDVideosGet

ChannelsChannelIDVideosGet implements GET /channels/{channel_id}/videos operation.

Retrieve all videos related to a specific channel.

GET /channels/{channel_id}/videos

func (UnimplementedHandler) ChannelsChannelIDVideosPost

ChannelsChannelIDVideosPost implements POST /channels/{channel_id}/videos operation.

Update videos related to a specific channel based on provided cronType.

POST /channels/{channel_id}/videos

func (UnimplementedHandler) ChannelsChannelIDVideosPut

ChannelsChannelIDVideosPut implements PUT /channels/{channel_id}/videos operation.

Update videos related to a specific channel based on provided cronType.

PUT /channels/{channel_id}/videos

func (UnimplementedHandler) ChannelsGet

ChannelsGet implements GET /channels operation.

Retrieves all channels based on provided IDs.

GET /channels

func (UnimplementedHandler) ChannelsPost

ChannelsPost implements POST /channels operation.

Creates channels by fetching from Youtube using provided Channel IDs.

POST /channels

func (UnimplementedHandler) ChannelsPut

ChannelsPut implements PUT /channels operation.

Updates channels by fetching from Youtube using provided Channel IDs.

PUT /channels

type VideoResponse

type VideoResponse struct {
	ChannelId    OptString             `json:"channelId"`
	ChannelTitle OptString             `json:"channelTitle"`
	Description  OptString             `json:"description"`
	ID           OptString             `json:"id"`
	PublishedAt  OptString             `json:"publishedAt"`
	Tags         []string              `json:"tags"`
	Thumbnails   OptThumbnailsResponse `json:"thumbnails"`
	Title        OptString             `json:"title"`
}

Ref: #/components/schemas/VideoResponse

func (*VideoResponse) Decode

func (s *VideoResponse) Decode(d *jx.Decoder) error

Decode decodes VideoResponse from json.

func (*VideoResponse) Encode

func (s *VideoResponse) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*VideoResponse) GetChannelId

func (s *VideoResponse) GetChannelId() OptString

GetChannelId returns the value of ChannelId.

func (*VideoResponse) GetChannelTitle

func (s *VideoResponse) GetChannelTitle() OptString

GetChannelTitle returns the value of ChannelTitle.

func (*VideoResponse) GetDescription

func (s *VideoResponse) GetDescription() OptString

GetDescription returns the value of Description.

func (*VideoResponse) GetID

func (s *VideoResponse) GetID() OptString

GetID returns the value of ID.

func (*VideoResponse) GetPublishedAt

func (s *VideoResponse) GetPublishedAt() OptString

GetPublishedAt returns the value of PublishedAt.

func (*VideoResponse) GetTags

func (s *VideoResponse) GetTags() []string

GetTags returns the value of Tags.

func (*VideoResponse) GetThumbnails

func (s *VideoResponse) GetThumbnails() OptThumbnailsResponse

GetThumbnails returns the value of Thumbnails.

func (*VideoResponse) GetTitle

func (s *VideoResponse) GetTitle() OptString

GetTitle returns the value of Title.

func (*VideoResponse) MarshalJSON

func (s *VideoResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*VideoResponse) SetChannelId

func (s *VideoResponse) SetChannelId(val OptString)

SetChannelId sets the value of ChannelId.

func (*VideoResponse) SetChannelTitle

func (s *VideoResponse) SetChannelTitle(val OptString)

SetChannelTitle sets the value of ChannelTitle.

func (*VideoResponse) SetDescription

func (s *VideoResponse) SetDescription(val OptString)

SetDescription sets the value of Description.

func (*VideoResponse) SetID

func (s *VideoResponse) SetID(val OptString)

SetID sets the value of ID.

func (*VideoResponse) SetPublishedAt

func (s *VideoResponse) SetPublishedAt(val OptString)

SetPublishedAt sets the value of PublishedAt.

func (*VideoResponse) SetTags

func (s *VideoResponse) SetTags(val []string)

SetTags sets the value of Tags.

func (*VideoResponse) SetThumbnails

func (s *VideoResponse) SetThumbnails(val OptThumbnailsResponse)

SetThumbnails sets the value of Thumbnails.

func (*VideoResponse) SetTitle

func (s *VideoResponse) SetTitle(val OptString)

SetTitle sets the value of Title.

func (*VideoResponse) UnmarshalJSON

func (s *VideoResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type VideosResponse

type VideosResponse struct {
	Videos []VideoResponse `json:"videos"`
}

Ref: #/components/schemas/VideosResponse

func (*VideosResponse) Decode

func (s *VideosResponse) Decode(d *jx.Decoder) error

Decode decodes VideosResponse from json.

func (*VideosResponse) Encode

func (s *VideosResponse) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*VideosResponse) GetVideos

func (s *VideosResponse) GetVideos() []VideoResponse

GetVideos returns the value of Videos.

func (*VideosResponse) MarshalJSON

func (s *VideosResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*VideosResponse) SetVideos

func (s *VideosResponse) SetVideos(val []VideoResponse)

SetVideos sets the value of Videos.

func (*VideosResponse) UnmarshalJSON

func (s *VideosResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

Jump to

Keyboard shortcuts

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