Documentation ¶
Overview ¶
Code generated by ogen, DO NOT EDIT.
Index ¶
- func WithServerURL(ctx context.Context, u *url.URL) context.Context
- type APICaptcha2chcaptchaIDGetParams
- type APICaptcha2chcaptchaShowGetNotFound
- type APICaptcha2chcaptchaShowGetOK
- type APICaptcha2chcaptchaShowGetParams
- type APICaptcha2chcaptchaShowGetRes
- type APICaptchaAppIDPublicKeyGetParams
- type APICaptchaInvisibleRecaptchaIDGetParams
- type APICaptchaInvisibleRecaptchaMobileGetOK
- type APICaptchaRecaptchaIDGetParams
- type APICaptchaRecaptchaMobileGetOK
- type APIDislikeGetParams
- type APILikeGetParams
- type APIMobileV2AfterBoardThreadNumGetParams
- type APIMobileV2InfoBoardThreadGetParams
- type APIMobileV2PostBoardNumGetParams
- type Board
- func (s *Board) Decode(d *jx.Decoder) error
- func (s *Board) Encode(e *jx.Encoder)
- func (s *Board) GetBumpLimit() int
- func (s *Board) GetCategory() string
- func (s *Board) GetDefaultName() string
- func (s *Board) GetEnableDices() bool
- func (s *Board) GetEnableFlags() bool
- func (s *Board) GetEnableIcons() bool
- func (s *Board) GetEnableLikes() bool
- func (s *Board) GetEnableNames() bool
- func (s *Board) GetEnableOekaki() bool
- func (s *Board) GetEnablePosting() bool
- func (s *Board) GetEnableSage() bool
- func (s *Board) GetEnableShield() bool
- func (s *Board) GetEnableSubject() bool
- func (s *Board) GetEnableThreadTags() bool
- func (s *Board) GetEnableTrips() bool
- func (s *Board) GetFileTypes() []string
- func (s *Board) GetID() string
- func (s *Board) GetIcons() []BoardIconsItem
- func (s *Board) GetInfo() string
- func (s *Board) GetInfoOuter() string
- func (s *Board) GetMaxComment() int
- func (s *Board) GetMaxFilesSize() int
- func (s *Board) GetMaxPages() int
- func (s *Board) GetName() string
- func (s *Board) GetTags() []string
- func (s *Board) GetThreadsPerPage() int
- func (s *Board) MarshalJSON() ([]byte, error)
- func (s *Board) SetBumpLimit(val int)
- func (s *Board) SetCategory(val string)
- func (s *Board) SetDefaultName(val string)
- func (s *Board) SetEnableDices(val bool)
- func (s *Board) SetEnableFlags(val bool)
- func (s *Board) SetEnableIcons(val bool)
- func (s *Board) SetEnableLikes(val bool)
- func (s *Board) SetEnableNames(val bool)
- func (s *Board) SetEnableOekaki(val bool)
- func (s *Board) SetEnablePosting(val bool)
- func (s *Board) SetEnableSage(val bool)
- func (s *Board) SetEnableShield(val bool)
- func (s *Board) SetEnableSubject(val bool)
- func (s *Board) SetEnableThreadTags(val bool)
- func (s *Board) SetEnableTrips(val bool)
- func (s *Board) SetFake()
- func (s *Board) SetFileTypes(val []string)
- func (s *Board) SetID(val string)
- func (s *Board) SetIcons(val []BoardIconsItem)
- func (s *Board) SetInfo(val string)
- func (s *Board) SetInfoOuter(val string)
- func (s *Board) SetMaxComment(val int)
- func (s *Board) SetMaxFilesSize(val int)
- func (s *Board) SetMaxPages(val int)
- func (s *Board) SetName(val string)
- func (s *Board) SetTags(val []string)
- func (s *Board) SetThreadsPerPage(val int)
- func (s *Board) UnmarshalJSON(data []byte) error
- func (s *Board) Validate() error
- type BoardIconsItem
- func (s *BoardIconsItem) Decode(d *jx.Decoder) error
- func (s *BoardIconsItem) Encode(e *jx.Encoder)
- func (s *BoardIconsItem) GetName() OptString
- func (s *BoardIconsItem) GetNum() OptInt
- func (s *BoardIconsItem) GetURL() OptString
- func (s *BoardIconsItem) MarshalJSON() ([]byte, error)
- func (s *BoardIconsItem) SetFake()
- func (s *BoardIconsItem) SetName(val OptString)
- func (s *BoardIconsItem) SetNum(val OptInt)
- func (s *BoardIconsItem) SetURL(val OptString)
- func (s *BoardIconsItem) UnmarshalJSON(data []byte) error
- type Boards
- type Captcha
- func (s *Captcha) Decode(d *jx.Decoder) error
- func (s *Captcha) Encode(e *jx.Encoder)
- func (s *Captcha) GetError() OptError
- func (s *Captcha) GetExpires() OptInt
- func (s *Captcha) GetID() string
- func (s *Captcha) GetInput() OptString
- func (s *Captcha) GetResult() int
- func (s *Captcha) GetType() CaptchaType
- func (s *Captcha) MarshalJSON() ([]byte, error)
- func (s *Captcha) SetError(val OptError)
- func (s *Captcha) SetExpires(val OptInt)
- func (s *Captcha) SetFake()
- func (s *Captcha) SetID(val string)
- func (s *Captcha) SetInput(val OptString)
- func (s *Captcha) SetResult(val int)
- func (s *Captcha) SetType(val CaptchaType)
- func (s *Captcha) UnmarshalJSON(data []byte) error
- func (s *Captcha) Validate() error
- type CaptchaType
- func (CaptchaType) AllValues() []CaptchaType
- func (s *CaptchaType) Decode(d *jx.Decoder) error
- func (s CaptchaType) Encode(e *jx.Encoder)
- func (s CaptchaType) MarshalJSON() ([]byte, error)
- func (s CaptchaType) MarshalText() ([]byte, error)
- func (s *CaptchaType) SetFake()
- func (s *CaptchaType) UnmarshalJSON(data []byte) error
- func (s *CaptchaType) UnmarshalText(data []byte) error
- func (s CaptchaType) Validate() error
- type Client
- func (c *Client) APICaptcha2chcaptchaIDGet(ctx context.Context, params APICaptcha2chcaptchaIDGetParams) (*Captcha, error)
- func (c *Client) APICaptcha2chcaptchaShowGet(ctx context.Context, params APICaptcha2chcaptchaShowGetParams) (APICaptcha2chcaptchaShowGetRes, error)
- func (c *Client) APICaptchaAppIDPublicKeyGet(ctx context.Context, params APICaptchaAppIDPublicKeyGetParams) (*Captcha, error)
- func (c *Client) APICaptchaInvisibleRecaptchaIDGet(ctx context.Context, params APICaptchaInvisibleRecaptchaIDGetParams) (*Captcha, error)
- func (c *Client) APICaptchaInvisibleRecaptchaMobileGet(ctx context.Context) error
- func (c *Client) APICaptchaRecaptchaIDGet(ctx context.Context, params APICaptchaRecaptchaIDGetParams) (*Captcha, error)
- func (c *Client) APICaptchaRecaptchaMobileGet(ctx context.Context) error
- func (c *Client) APIDislikeGet(ctx context.Context, params APIDislikeGetParams) (*Like, error)
- func (c *Client) APILikeGet(ctx context.Context, params APILikeGetParams) (*Like, error)
- func (c *Client) APIMobileV2AfterBoardThreadNumGet(ctx context.Context, params APIMobileV2AfterBoardThreadNumGetParams) (*MobileThreadPostsAfter, error)
- func (c *Client) APIMobileV2BoardsGet(ctx context.Context) (Boards, error)
- func (c *Client) APIMobileV2InfoBoardThreadGet(ctx context.Context, params APIMobileV2InfoBoardThreadGetParams) (*MobileThreadLastInfo, error)
- func (c *Client) APIMobileV2PostBoardNumGet(ctx context.Context, params APIMobileV2PostBoardNumGetParams) (*MobilePost, error)
- func (c *Client) UserPassloginPost(ctx context.Context, request OptUserPassloginPostReq, ...) (*Passcode, error)
- func (c *Client) UserPostingPost(ctx context.Context, request OptUserPostingPostReq) (UserPostingPostOK, error)
- func (c *Client) UserReportPost(ctx context.Context, request OptUserReportPostReq) (*Report, error)
- type ClientOption
- type Error
- func (s *Error) Decode(d *jx.Decoder) error
- func (s *Error) Encode(e *jx.Encoder)
- func (s *Error) GetCode() OptErrorCode
- func (s *Error) GetMessage() OptString
- func (s *Error) MarshalJSON() ([]byte, error)
- func (s *Error) SetCode(val OptErrorCode)
- func (s *Error) SetFake()
- func (s *Error) SetMessage(val OptString)
- func (s *Error) UnmarshalJSON(data []byte) error
- func (s *Error) Validate() error
- type ErrorCode
- type ErrorHandler
- type File
- func (s *File) Decode(d *jx.Decoder) error
- func (s *File) Encode(e *jx.Encoder)
- func (s *File) GetDisplayname() string
- func (s *File) GetDuration() OptString
- func (s *File) GetDurationSecs() OptInt
- func (s *File) GetFullname() string
- func (s *File) GetHeight() int
- func (s *File) GetInstall() OptString
- func (s *File) GetMD5() OptString
- func (s *File) GetName() string
- func (s *File) GetNsfw() OptInt
- func (s *File) GetPack() OptString
- func (s *File) GetPath() string
- func (s *File) GetSize() int
- func (s *File) GetSticker() OptString
- func (s *File) GetThumbnail() string
- func (s *File) GetTnHeight() int
- func (s *File) GetTnWidth() int
- func (s *File) GetType() FileType
- func (s *File) GetWidth() int
- func (s *File) MarshalJSON() ([]byte, error)
- func (s *File) SetDisplayname(val string)
- func (s *File) SetDuration(val OptString)
- func (s *File) SetDurationSecs(val OptInt)
- func (s *File) SetFake()
- func (s *File) SetFullname(val string)
- func (s *File) SetHeight(val int)
- func (s *File) SetInstall(val OptString)
- func (s *File) SetMD5(val OptString)
- func (s *File) SetName(val string)
- func (s *File) SetNsfw(val OptInt)
- func (s *File) SetPack(val OptString)
- func (s *File) SetPath(val string)
- func (s *File) SetSize(val int)
- func (s *File) SetSticker(val OptString)
- func (s *File) SetThumbnail(val string)
- func (s *File) SetTnHeight(val int)
- func (s *File) SetTnWidth(val int)
- func (s *File) SetType(val FileType)
- func (s *File) SetWidth(val int)
- func (s *File) UnmarshalJSON(data []byte) error
- func (s *File) Validate() error
- type FileType
- type Handler
- type Invoker
- type Labeler
- type Like
- func (s *Like) Decode(d *jx.Decoder) error
- func (s *Like) Encode(e *jx.Encoder)
- func (s *Like) GetError() OptError
- func (s *Like) GetResult() OptInt
- func (s *Like) MarshalJSON() ([]byte, error)
- func (s *Like) SetError(val OptError)
- func (s *Like) SetFake()
- func (s *Like) SetResult(val OptInt)
- func (s *Like) UnmarshalJSON(data []byte) error
- func (s *Like) Validate() error
- type Middleware
- type MobilePost
- func (s *MobilePost) Decode(d *jx.Decoder) error
- func (s *MobilePost) Encode(e *jx.Encoder)
- func (s *MobilePost) GetError() OptError
- func (s *MobilePost) GetPost() OptPost
- func (s *MobilePost) GetResult() OptInt
- func (s *MobilePost) MarshalJSON() ([]byte, error)
- func (s *MobilePost) SetError(val OptError)
- func (s *MobilePost) SetFake()
- func (s *MobilePost) SetPost(val OptPost)
- func (s *MobilePost) SetResult(val OptInt)
- func (s *MobilePost) UnmarshalJSON(data []byte) error
- func (s *MobilePost) Validate() error
- type MobileThreadLastInfo
- func (s *MobileThreadLastInfo) Decode(d *jx.Decoder) error
- func (s *MobileThreadLastInfo) Encode(e *jx.Encoder)
- func (s *MobileThreadLastInfo) GetError() OptError
- func (s *MobileThreadLastInfo) GetResult() OptInt
- func (s *MobileThreadLastInfo) GetThread() OptMobileThreadLastInfoThread
- func (s *MobileThreadLastInfo) MarshalJSON() ([]byte, error)
- func (s *MobileThreadLastInfo) SetError(val OptError)
- func (s *MobileThreadLastInfo) SetFake()
- func (s *MobileThreadLastInfo) SetResult(val OptInt)
- func (s *MobileThreadLastInfo) SetThread(val OptMobileThreadLastInfoThread)
- func (s *MobileThreadLastInfo) UnmarshalJSON(data []byte) error
- func (s *MobileThreadLastInfo) Validate() error
- type MobileThreadLastInfoThread
- func (s *MobileThreadLastInfoThread) Decode(d *jx.Decoder) error
- func (s *MobileThreadLastInfoThread) Encode(e *jx.Encoder)
- func (s *MobileThreadLastInfoThread) GetNum() OptInt
- func (s *MobileThreadLastInfoThread) GetPosts() OptInt
- func (s *MobileThreadLastInfoThread) GetTimestamp() OptInt
- func (s *MobileThreadLastInfoThread) MarshalJSON() ([]byte, error)
- func (s *MobileThreadLastInfoThread) SetFake()
- func (s *MobileThreadLastInfoThread) SetNum(val OptInt)
- func (s *MobileThreadLastInfoThread) SetPosts(val OptInt)
- func (s *MobileThreadLastInfoThread) SetTimestamp(val OptInt)
- func (s *MobileThreadLastInfoThread) UnmarshalJSON(data []byte) error
- type MobileThreadPostsAfter
- func (s *MobileThreadPostsAfter) Decode(d *jx.Decoder) error
- func (s *MobileThreadPostsAfter) Encode(e *jx.Encoder)
- func (s *MobileThreadPostsAfter) GetError() OptError
- func (s *MobileThreadPostsAfter) GetPosts() []Post
- func (s *MobileThreadPostsAfter) GetResult() OptInt
- func (s *MobileThreadPostsAfter) GetUniquePosters() OptInt
- func (s *MobileThreadPostsAfter) MarshalJSON() ([]byte, error)
- func (s *MobileThreadPostsAfter) SetError(val OptError)
- func (s *MobileThreadPostsAfter) SetFake()
- func (s *MobileThreadPostsAfter) SetPosts(val []Post)
- func (s *MobileThreadPostsAfter) SetResult(val OptInt)
- func (s *MobileThreadPostsAfter) SetUniquePosters(val OptInt)
- func (s *MobileThreadPostsAfter) UnmarshalJSON(data []byte) error
- func (s *MobileThreadPostsAfter) Validate() error
- type OperationName
- type OptError
- func (o *OptError) Decode(d *jx.Decoder) error
- func (o OptError) Encode(e *jx.Encoder)
- func (o OptError) Get() (v Error, ok bool)
- func (o OptError) IsSet() bool
- func (s OptError) MarshalJSON() ([]byte, error)
- func (o OptError) Or(d Error) Error
- func (o *OptError) Reset()
- func (s *OptError) SetFake()
- func (o *OptError) SetTo(v Error)
- func (s *OptError) UnmarshalJSON(data []byte) error
- type OptErrorCode
- func (o *OptErrorCode) Decode(d *jx.Decoder) error
- func (o OptErrorCode) Encode(e *jx.Encoder)
- func (o OptErrorCode) Get() (v ErrorCode, ok bool)
- func (o OptErrorCode) IsSet() bool
- func (s OptErrorCode) MarshalJSON() ([]byte, error)
- func (o OptErrorCode) Or(d ErrorCode) ErrorCode
- func (o *OptErrorCode) Reset()
- func (s *OptErrorCode) SetFake()
- func (o *OptErrorCode) SetTo(v ErrorCode)
- func (s *OptErrorCode) 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 OptMobileThreadLastInfoThread
- func (o *OptMobileThreadLastInfoThread) Decode(d *jx.Decoder) error
- func (o OptMobileThreadLastInfoThread) Encode(e *jx.Encoder)
- func (o OptMobileThreadLastInfoThread) Get() (v MobileThreadLastInfoThread, ok bool)
- func (o OptMobileThreadLastInfoThread) IsSet() bool
- func (s OptMobileThreadLastInfoThread) MarshalJSON() ([]byte, error)
- func (o OptMobileThreadLastInfoThread) Or(d MobileThreadLastInfoThread) MobileThreadLastInfoThread
- func (o *OptMobileThreadLastInfoThread) Reset()
- func (s *OptMobileThreadLastInfoThread) SetFake()
- func (o *OptMobileThreadLastInfoThread) SetTo(v MobileThreadLastInfoThread)
- func (s *OptMobileThreadLastInfoThread) UnmarshalJSON(data []byte) error
- type OptPasscodePasscode
- func (o *OptPasscodePasscode) Decode(d *jx.Decoder) error
- func (o OptPasscodePasscode) Encode(e *jx.Encoder)
- func (o OptPasscodePasscode) Get() (v PasscodePasscode, ok bool)
- func (o OptPasscodePasscode) IsSet() bool
- func (s OptPasscodePasscode) MarshalJSON() ([]byte, error)
- func (o OptPasscodePasscode) Or(d PasscodePasscode) PasscodePasscode
- func (o *OptPasscodePasscode) Reset()
- func (s *OptPasscodePasscode) SetFake()
- func (o *OptPasscodePasscode) SetTo(v PasscodePasscode)
- func (s *OptPasscodePasscode) UnmarshalJSON(data []byte) error
- type OptPost
- func (o *OptPost) Decode(d *jx.Decoder) error
- func (o OptPost) Encode(e *jx.Encoder)
- func (o OptPost) Get() (v Post, ok bool)
- func (o OptPost) IsSet() bool
- func (s OptPost) MarshalJSON() ([]byte, error)
- func (o OptPost) Or(d Post) Post
- func (o *OptPost) Reset()
- func (s *OptPost) SetFake()
- func (o *OptPost) SetTo(v Post)
- func (s *OptPost) 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 OptUserPassloginPostReq
- func (o OptUserPassloginPostReq) Get() (v UserPassloginPostReq, ok bool)
- func (o OptUserPassloginPostReq) IsSet() bool
- func (o OptUserPassloginPostReq) Or(d UserPassloginPostReq) UserPassloginPostReq
- func (o *OptUserPassloginPostReq) Reset()
- func (o *OptUserPassloginPostReq) SetTo(v UserPassloginPostReq)
- type OptUserPostingPostReq
- type OptUserReportPostReq
- type Option
- type Passcode
- func (s *Passcode) Decode(d *jx.Decoder) error
- func (s *Passcode) Encode(e *jx.Encoder)
- func (s *Passcode) GetError() OptError
- func (s *Passcode) GetPasscode() OptPasscodePasscode
- func (s *Passcode) GetResult() OptInt
- func (s *Passcode) MarshalJSON() ([]byte, error)
- func (s *Passcode) SetError(val OptError)
- func (s *Passcode) SetFake()
- func (s *Passcode) SetPasscode(val OptPasscodePasscode)
- func (s *Passcode) SetResult(val OptInt)
- func (s *Passcode) UnmarshalJSON(data []byte) error
- func (s *Passcode) Validate() error
- type PasscodePasscode
- func (s *PasscodePasscode) Decode(d *jx.Decoder) error
- func (s *PasscodePasscode) Encode(e *jx.Encoder)
- func (s *PasscodePasscode) GetExpires() OptInt
- func (s *PasscodePasscode) GetType() OptString
- func (s *PasscodePasscode) MarshalJSON() ([]byte, error)
- func (s *PasscodePasscode) SetExpires(val OptInt)
- func (s *PasscodePasscode) SetFake()
- func (s *PasscodePasscode) SetType(val OptString)
- func (s *PasscodePasscode) UnmarshalJSON(data []byte) error
- type Post
- func (s *Post) Decode(d *jx.Decoder) error
- func (s *Post) Encode(e *jx.Encoder)
- func (s *Post) GetBanned() int
- func (s *Post) GetBoard() string
- func (s *Post) GetClosed() int
- func (s *Post) GetComment() string
- func (s *Post) GetDate() string
- func (s *Post) GetDislikes() OptInt
- func (s *Post) GetEmail() OptString
- func (s *Post) GetEndless() int
- func (s *Post) GetFiles() []File
- func (s *Post) GetIcon() OptString
- func (s *Post) GetLasthit() int
- func (s *Post) GetLikes() OptInt
- func (s *Post) GetName() OptString
- func (s *Post) GetNum() int
- func (s *Post) GetOp() int
- func (s *Post) GetParent() int
- func (s *Post) GetSticky() int
- func (s *Post) GetSubject() OptString
- func (s *Post) GetTags() OptString
- func (s *Post) GetTimestamp() int
- func (s *Post) GetTrip() OptString
- func (s *Post) GetTripStyle() OptString
- func (s *Post) GetViews() int
- func (s *Post) MarshalJSON() ([]byte, error)
- func (s *Post) SetBanned(val int)
- func (s *Post) SetBoard(val string)
- func (s *Post) SetClosed(val int)
- func (s *Post) SetComment(val string)
- func (s *Post) SetDate(val string)
- func (s *Post) SetDislikes(val OptInt)
- func (s *Post) SetEmail(val OptString)
- func (s *Post) SetEndless(val int)
- func (s *Post) SetFake()
- func (s *Post) SetFiles(val []File)
- func (s *Post) SetIcon(val OptString)
- func (s *Post) SetLasthit(val int)
- func (s *Post) SetLikes(val OptInt)
- func (s *Post) SetName(val OptString)
- func (s *Post) SetNum(val int)
- func (s *Post) SetOp(val int)
- func (s *Post) SetParent(val int)
- func (s *Post) SetSticky(val int)
- func (s *Post) SetSubject(val OptString)
- func (s *Post) SetTags(val OptString)
- func (s *Post) SetTimestamp(val int)
- func (s *Post) SetTrip(val OptString)
- func (s *Post) SetTripStyle(val OptString)
- func (s *Post) SetViews(val int)
- func (s *Post) UnmarshalJSON(data []byte) error
- func (s *Post) Validate() error
- type PostingNewPost
- func (s *PostingNewPost) Decode(d *jx.Decoder) error
- func (s *PostingNewPost) Encode(e *jx.Encoder)
- func (s *PostingNewPost) GetError() OptError
- func (s *PostingNewPost) GetNum() OptInt
- func (s *PostingNewPost) GetResult() OptInt
- func (s *PostingNewPost) MarshalJSON() ([]byte, error)
- func (s *PostingNewPost) SetError(val OptError)
- func (s *PostingNewPost) SetFake()
- func (s *PostingNewPost) SetNum(val OptInt)
- func (s *PostingNewPost) SetResult(val OptInt)
- func (s *PostingNewPost) UnmarshalJSON(data []byte) error
- func (s *PostingNewPost) Validate() error
- type PostingNewThread
- func (s *PostingNewThread) Decode(d *jx.Decoder) error
- func (s *PostingNewThread) Encode(e *jx.Encoder)
- func (s *PostingNewThread) GetError() OptError
- func (s *PostingNewThread) GetResult() OptInt
- func (s *PostingNewThread) GetThread() OptInt
- func (s *PostingNewThread) MarshalJSON() ([]byte, error)
- func (s *PostingNewThread) SetError(val OptError)
- func (s *PostingNewThread) SetFake()
- func (s *PostingNewThread) SetResult(val OptInt)
- func (s *PostingNewThread) SetThread(val OptInt)
- func (s *PostingNewThread) UnmarshalJSON(data []byte) error
- func (s *PostingNewThread) Validate() error
- type Report
- func (s *Report) Decode(d *jx.Decoder) error
- func (s *Report) Encode(e *jx.Encoder)
- func (s *Report) GetError() OptError
- func (s *Report) GetResult() OptInt
- func (s *Report) MarshalJSON() ([]byte, error)
- func (s *Report) SetError(val OptError)
- func (s *Report) SetFake()
- func (s *Report) SetResult(val OptInt)
- func (s *Report) UnmarshalJSON(data []byte) error
- func (s *Report) Validate() error
- type Route
- 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 UnimplementedHandler
- func (UnimplementedHandler) APICaptcha2chcaptchaIDGet(ctx context.Context, params APICaptcha2chcaptchaIDGetParams) (r *Captcha, _ error)
- func (UnimplementedHandler) APICaptcha2chcaptchaShowGet(ctx context.Context, params APICaptcha2chcaptchaShowGetParams) (r APICaptcha2chcaptchaShowGetRes, _ error)
- func (UnimplementedHandler) APICaptchaAppIDPublicKeyGet(ctx context.Context, params APICaptchaAppIDPublicKeyGetParams) (r *Captcha, _ error)
- func (UnimplementedHandler) APICaptchaInvisibleRecaptchaIDGet(ctx context.Context, params APICaptchaInvisibleRecaptchaIDGetParams) (r *Captcha, _ error)
- func (UnimplementedHandler) APICaptchaInvisibleRecaptchaMobileGet(ctx context.Context) error
- func (UnimplementedHandler) APICaptchaRecaptchaIDGet(ctx context.Context, params APICaptchaRecaptchaIDGetParams) (r *Captcha, _ error)
- func (UnimplementedHandler) APICaptchaRecaptchaMobileGet(ctx context.Context) error
- func (UnimplementedHandler) APIDislikeGet(ctx context.Context, params APIDislikeGetParams) (r *Like, _ error)
- func (UnimplementedHandler) APILikeGet(ctx context.Context, params APILikeGetParams) (r *Like, _ error)
- func (UnimplementedHandler) APIMobileV2AfterBoardThreadNumGet(ctx context.Context, params APIMobileV2AfterBoardThreadNumGetParams) (r *MobileThreadPostsAfter, _ error)
- func (UnimplementedHandler) APIMobileV2BoardsGet(ctx context.Context) (r Boards, _ error)
- func (UnimplementedHandler) APIMobileV2InfoBoardThreadGet(ctx context.Context, params APIMobileV2InfoBoardThreadGetParams) (r *MobileThreadLastInfo, _ error)
- func (UnimplementedHandler) APIMobileV2PostBoardNumGet(ctx context.Context, params APIMobileV2PostBoardNumGetParams) (r *MobilePost, _ error)
- func (UnimplementedHandler) UserPassloginPost(ctx context.Context, req OptUserPassloginPostReq, ...) (r *Passcode, _ error)
- func (UnimplementedHandler) UserPostingPost(ctx context.Context, req OptUserPostingPostReq) (r UserPostingPostOK, _ error)
- func (UnimplementedHandler) UserReportPost(ctx context.Context, req OptUserReportPostReq) (r *Report, _ error)
- type UserPassloginPostParams
- type UserPassloginPostReq
- type UserPostingPostOK
- func (s *UserPostingPostOK) Decode(d *jx.Decoder) error
- func (s UserPostingPostOK) Encode(e *jx.Encoder)
- func (s UserPostingPostOK) GetPostingNewPost() (v PostingNewPost, ok bool)
- func (s UserPostingPostOK) GetPostingNewThread() (v PostingNewThread, ok bool)
- func (s UserPostingPostOK) IsPostingNewPost() bool
- func (s UserPostingPostOK) IsPostingNewThread() bool
- func (s UserPostingPostOK) MarshalJSON() ([]byte, error)
- func (s *UserPostingPostOK) SetFake()
- func (s *UserPostingPostOK) SetPostingNewPost(v PostingNewPost)
- func (s *UserPostingPostOK) SetPostingNewThread(v PostingNewThread)
- func (s *UserPostingPostOK) UnmarshalJSON(data []byte) error
- func (s UserPostingPostOK) Validate() error
- type UserPostingPostOKType
- type UserPostingPostReq
- func (s *UserPostingPostReq) GetBoard() string
- func (s *UserPostingPostReq) GetCaptchaType() CaptchaType
- func (s *UserPostingPostReq) GetComment() OptString
- func (s *UserPostingPostReq) GetEmail() OptString
- func (s *UserPostingPostReq) GetFile() []ht.MultipartFile
- func (s *UserPostingPostReq) GetIcon() OptInt
- func (s *UserPostingPostReq) GetName() OptString
- func (s *UserPostingPostReq) GetOpMark() OptInt
- func (s *UserPostingPostReq) GetSubject() OptString
- func (s *UserPostingPostReq) GetTags() OptString
- func (s *UserPostingPostReq) GetThread() OptInt
- func (s *UserPostingPostReq) SetBoard(val string)
- func (s *UserPostingPostReq) SetCaptchaType(val CaptchaType)
- func (s *UserPostingPostReq) SetComment(val OptString)
- func (s *UserPostingPostReq) SetEmail(val OptString)
- func (s *UserPostingPostReq) SetFile(val []ht.MultipartFile)
- func (s *UserPostingPostReq) SetIcon(val OptInt)
- func (s *UserPostingPostReq) SetName(val OptString)
- func (s *UserPostingPostReq) SetOpMark(val OptInt)
- func (s *UserPostingPostReq) SetSubject(val OptString)
- func (s *UserPostingPostReq) SetTags(val OptString)
- func (s *UserPostingPostReq) SetThread(val OptInt)
- func (s *UserPostingPostReq) Validate() error
- type UserReportPostReq
- func (s *UserReportPostReq) GetBoard() string
- func (s *UserReportPostReq) GetComment() string
- func (s *UserReportPostReq) GetPost() []int
- func (s *UserReportPostReq) GetThread() int
- func (s *UserReportPostReq) SetBoard(val string)
- func (s *UserReportPostReq) SetComment(val string)
- func (s *UserReportPostReq) SetPost(val []int)
- func (s *UserReportPostReq) SetThread(val int)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type APICaptcha2chcaptchaIDGetParams ¶
type APICaptcha2chcaptchaIDGetParams struct { // ID доски, например, b. Board OptString // Номер треда. Thread OptInt }
APICaptcha2chcaptchaIDGetParams is parameters of GET /api/captcha/2chcaptcha/id operation.
type APICaptcha2chcaptchaShowGetNotFound ¶
type APICaptcha2chcaptchaShowGetNotFound struct{}
APICaptcha2chcaptchaShowGetNotFound is response for APICaptcha2chcaptchaShowGet operation.
type APICaptcha2chcaptchaShowGetOK ¶
type APICaptcha2chcaptchaShowGetOK struct{}
APICaptcha2chcaptchaShowGetOK is response for APICaptcha2chcaptchaShowGet operation.
type APICaptcha2chcaptchaShowGetParams ¶
type APICaptcha2chcaptchaShowGetParams struct { // ID капчи. ID string }
APICaptcha2chcaptchaShowGetParams is parameters of GET /api/captcha/2chcaptcha/show operation.
type APICaptcha2chcaptchaShowGetRes ¶
type APICaptcha2chcaptchaShowGetRes interface {
// contains filtered or unexported methods
}
type APICaptchaAppIDPublicKeyGetParams ¶
type APICaptchaAppIDPublicKeyGetParams struct { // Публичный ключ, для получения напишите admin@2ch.hk с темой // письма "Получение ключа для приложения" и ссылкой на // ваш клиент. PublicKey string // ID доски, например, b. Board OptString // Номер треда. Thread OptInt }
APICaptchaAppIDPublicKeyGetParams is parameters of GET /api/captcha/app/id/{public_key} operation.
type APICaptchaInvisibleRecaptchaIDGetParams ¶
type APICaptchaInvisibleRecaptchaIDGetParams struct { // ID доски, например, b. Board OptString // Номер треда. Thread OptInt }
APICaptchaInvisibleRecaptchaIDGetParams is parameters of GET /api/captcha/invisible_recaptcha/id operation.
type APICaptchaInvisibleRecaptchaMobileGetOK ¶
type APICaptchaInvisibleRecaptchaMobileGetOK struct{}
APICaptchaInvisibleRecaptchaMobileGetOK is response for APICaptchaInvisibleRecaptchaMobileGet operation.
type APICaptchaRecaptchaIDGetParams ¶
type APICaptchaRecaptchaIDGetParams struct { // ID доски, например, b. Board OptString // Номер треда. Thread OptInt }
APICaptchaRecaptchaIDGetParams is parameters of GET /api/captcha/recaptcha/id operation.
type APICaptchaRecaptchaMobileGetOK ¶
type APICaptchaRecaptchaMobileGetOK struct{}
APICaptchaRecaptchaMobileGetOK is response for APICaptchaRecaptchaMobileGet operation.
type APIDislikeGetParams ¶
APIDislikeGetParams is parameters of GET /api/dislike operation.
type APILikeGetParams ¶
APILikeGetParams is parameters of GET /api/like operation.
type APIMobileV2AfterBoardThreadNumGetParams ¶
type APIMobileV2AfterBoardThreadNumGetParams struct { // ID доски, например, b. Board string // Номер треда. Thread int // Номер поста. Num int }
APIMobileV2AfterBoardThreadNumGetParams is parameters of GET /api/mobile/v2/after/{board}/{thread}/{num} operation.
type APIMobileV2InfoBoardThreadGetParams ¶
type APIMobileV2InfoBoardThreadGetParams struct { // ID доски, например, b. Board string // Номер треда. Thread int }
APIMobileV2InfoBoardThreadGetParams is parameters of GET /api/mobile/v2/info/{board}/{thread} operation.
type APIMobileV2PostBoardNumGetParams ¶
type APIMobileV2PostBoardNumGetParams struct { // ID доски, например, b. Board string // Номер поста. Num int }
APIMobileV2PostBoardNumGetParams is parameters of GET /api/mobile/v2/post/{board}/{num} operation.
type Board ¶
type Board struct { ID string `json:"id"` Name string `json:"name"` Category string `json:"category"` // Информация о доске. Info string `json:"info"` // Информация о доске для главной. InfoOuter string `json:"info_outer"` ThreadsPerPage int `json:"threads_per_page"` BumpLimit int `json:"bump_limit"` MaxPages int `json:"max_pages"` DefaultName string `json:"default_name"` EnableNames bool `json:"enable_names"` EnableTrips bool `json:"enable_trips"` EnableSubject bool `json:"enable_subject"` EnableSage bool `json:"enable_sage"` EnableIcons bool `json:"enable_icons"` EnableFlags bool `json:"enable_flags"` EnableDices bool `json:"enable_dices"` EnableShield bool `json:"enable_shield"` EnableThreadTags bool `json:"enable_thread_tags"` EnablePosting bool `json:"enable_posting"` EnableLikes bool `json:"enable_likes"` EnableOekaki bool `json:"enable_oekaki"` FileTypes []string `json:"file_types"` MaxComment int `json:"max_comment"` MaxFilesSize int `json:"max_files_size"` // Массив тегов, которые доступны на этой доске, если они // включены. Tags []string `json:"tags"` // Массив иконок, которые доступны на этой доске, если // они включены. Icons []BoardIconsItem `json:"icons"` }
Модель доски. Ref: #/components/schemas/Board
func (*Board) GetBumpLimit ¶
GetBumpLimit returns the value of BumpLimit.
func (*Board) GetCategory ¶
GetCategory returns the value of Category.
func (*Board) GetDefaultName ¶
GetDefaultName returns the value of DefaultName.
func (*Board) GetEnableDices ¶
GetEnableDices returns the value of EnableDices.
func (*Board) GetEnableFlags ¶
GetEnableFlags returns the value of EnableFlags.
func (*Board) GetEnableIcons ¶
GetEnableIcons returns the value of EnableIcons.
func (*Board) GetEnableLikes ¶
GetEnableLikes returns the value of EnableLikes.
func (*Board) GetEnableNames ¶
GetEnableNames returns the value of EnableNames.
func (*Board) GetEnableOekaki ¶
GetEnableOekaki returns the value of EnableOekaki.
func (*Board) GetEnablePosting ¶
GetEnablePosting returns the value of EnablePosting.
func (*Board) GetEnableSage ¶
GetEnableSage returns the value of EnableSage.
func (*Board) GetEnableShield ¶
GetEnableShield returns the value of EnableShield.
func (*Board) GetEnableSubject ¶
GetEnableSubject returns the value of EnableSubject.
func (*Board) GetEnableThreadTags ¶
GetEnableThreadTags returns the value of EnableThreadTags.
func (*Board) GetEnableTrips ¶
GetEnableTrips returns the value of EnableTrips.
func (*Board) GetFileTypes ¶
GetFileTypes returns the value of FileTypes.
func (*Board) GetIcons ¶
func (s *Board) GetIcons() []BoardIconsItem
GetIcons returns the value of Icons.
func (*Board) GetInfoOuter ¶
GetInfoOuter returns the value of InfoOuter.
func (*Board) GetMaxComment ¶
GetMaxComment returns the value of MaxComment.
func (*Board) GetMaxFilesSize ¶
GetMaxFilesSize returns the value of MaxFilesSize.
func (*Board) GetMaxPages ¶
GetMaxPages returns the value of MaxPages.
func (*Board) GetThreadsPerPage ¶
GetThreadsPerPage returns the value of ThreadsPerPage.
func (*Board) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*Board) SetBumpLimit ¶
SetBumpLimit sets the value of BumpLimit.
func (*Board) SetCategory ¶
SetCategory sets the value of Category.
func (*Board) SetDefaultName ¶
SetDefaultName sets the value of DefaultName.
func (*Board) SetEnableDices ¶
SetEnableDices sets the value of EnableDices.
func (*Board) SetEnableFlags ¶
SetEnableFlags sets the value of EnableFlags.
func (*Board) SetEnableIcons ¶
SetEnableIcons sets the value of EnableIcons.
func (*Board) SetEnableLikes ¶
SetEnableLikes sets the value of EnableLikes.
func (*Board) SetEnableNames ¶
SetEnableNames sets the value of EnableNames.
func (*Board) SetEnableOekaki ¶
SetEnableOekaki sets the value of EnableOekaki.
func (*Board) SetEnablePosting ¶
SetEnablePosting sets the value of EnablePosting.
func (*Board) SetEnableSage ¶
SetEnableSage sets the value of EnableSage.
func (*Board) SetEnableShield ¶
SetEnableShield sets the value of EnableShield.
func (*Board) SetEnableSubject ¶
SetEnableSubject sets the value of EnableSubject.
func (*Board) SetEnableThreadTags ¶
SetEnableThreadTags sets the value of EnableThreadTags.
func (*Board) SetEnableTrips ¶
SetEnableTrips sets the value of EnableTrips.
func (*Board) SetFileTypes ¶
SetFileTypes sets the value of FileTypes.
func (*Board) SetIcons ¶
func (s *Board) SetIcons(val []BoardIconsItem)
SetIcons sets the value of Icons.
func (*Board) SetInfoOuter ¶
SetInfoOuter sets the value of InfoOuter.
func (*Board) SetMaxComment ¶
SetMaxComment sets the value of MaxComment.
func (*Board) SetMaxFilesSize ¶
SetMaxFilesSize sets the value of MaxFilesSize.
func (*Board) SetMaxPages ¶
SetMaxPages sets the value of MaxPages.
func (*Board) SetThreadsPerPage ¶
SetThreadsPerPage sets the value of ThreadsPerPage.
func (*Board) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type BoardIconsItem ¶
type BoardIconsItem struct { Num OptInt `json:"num"` Name OptString `json:"name"` URL OptString `json:"url"` }
func (*BoardIconsItem) Decode ¶
func (s *BoardIconsItem) Decode(d *jx.Decoder) error
Decode decodes BoardIconsItem from json.
func (*BoardIconsItem) Encode ¶
func (s *BoardIconsItem) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*BoardIconsItem) GetName ¶
func (s *BoardIconsItem) GetName() OptString
GetName returns the value of Name.
func (*BoardIconsItem) GetNum ¶
func (s *BoardIconsItem) GetNum() OptInt
GetNum returns the value of Num.
func (*BoardIconsItem) GetURL ¶
func (s *BoardIconsItem) GetURL() OptString
GetURL returns the value of URL.
func (*BoardIconsItem) MarshalJSON ¶
func (s *BoardIconsItem) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*BoardIconsItem) SetName ¶
func (s *BoardIconsItem) SetName(val OptString)
SetName sets the value of Name.
func (*BoardIconsItem) SetNum ¶
func (s *BoardIconsItem) SetNum(val OptInt)
SetNum sets the value of Num.
func (*BoardIconsItem) SetURL ¶
func (s *BoardIconsItem) SetURL(val OptString)
SetURL sets the value of URL.
func (*BoardIconsItem) UnmarshalJSON ¶
func (s *BoardIconsItem) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type Boards ¶
type Boards []Board
func (Boards) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*Boards) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type Captcha ¶
type Captcha struct { Result int `json:"result"` Error OptError `json:"error"` Type CaptchaType `json:"type"` ID string `json:"id"` // Время в секундах после которого id перестанет // действовать. Expires OptInt `json:"expires"` // Тип текста, изображённого на картинке капчи. // Возможные варианты: // * numeric - только цифры. (0123456789) // * english - цифры и английские буквы. (0123456789abcdefghijklmnopqrstuvwxyz) // * russian - цифры и русские буквы. // (0123456789абвгдеёжзийклмнопрстуфхцчшщъыьэюя) // * all - цифры, русские и английские буквы. // (0123456789abcdefghijklmnopqrstuvwxyzабвгдеёжзийклмнопрстуфхцчшщъыьэюя). Input OptString `json:"input"` }
Ref: #/components/schemas/Captcha
func (*Captcha) GetExpires ¶
GetExpires returns the value of Expires.
func (*Captcha) GetType ¶
func (s *Captcha) GetType() CaptchaType
GetType returns the value of Type.
func (*Captcha) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*Captcha) SetExpires ¶
SetExpires sets the value of Expires.
func (*Captcha) SetType ¶
func (s *Captcha) SetType(val CaptchaType)
SetType sets the value of Type.
func (*Captcha) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type CaptchaType ¶
type CaptchaType string
Каждый тип капчи так же требует дополнительные параметры для её валидации: * recaptcha: g-recaptcha-response * invisible_recaptcha: g-recaptcha-response * recaptcha3: g-recaptcha-response * 2chcaptcha: Два.ч капча 2chcaptcha_id - идентификатор Два.ч капчи. 2chcaptcha_value - строка, которую пользователь увидел на картинке. * appid: app_response_id и app_response app_response_id - результат запроса к этому методу с публичным ключём приложения: /api/captcha/app/id/{public_key} app_response - sha256(app_response_id + '|' + private_key) * passcode: cookie passcode_auth * nocaptcha: капча не требуется, никакие дополнительные параметры тоже. Ref: #/components/schemas/CaptchaType
const ( CaptchaTypeRecaptcha CaptchaType = "recaptcha" CaptchaTypeInvisibleRecaptcha CaptchaType = "invisible_recaptcha" CaptchaTypeRecaptcha3 CaptchaType = "recaptcha3" CaptchaType2chcaptcha CaptchaType = "2chcaptcha" CaptchaTypeAppid CaptchaType = "appid" CaptchaTypePasscode CaptchaType = "passcode" CaptchaTypeNocaptcha CaptchaType = "nocaptcha" )
func (CaptchaType) AllValues ¶
func (CaptchaType) AllValues() []CaptchaType
AllValues returns all CaptchaType values.
func (*CaptchaType) Decode ¶
func (s *CaptchaType) Decode(d *jx.Decoder) error
Decode decodes CaptchaType from json.
func (CaptchaType) Encode ¶
func (s CaptchaType) Encode(e *jx.Encoder)
Encode encodes CaptchaType as json.
func (CaptchaType) MarshalJSON ¶
func (s CaptchaType) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (CaptchaType) MarshalText ¶
func (s CaptchaType) MarshalText() ([]byte, error)
MarshalText implements encoding.TextMarshaler.
func (*CaptchaType) UnmarshalJSON ¶
func (s *CaptchaType) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*CaptchaType) UnmarshalText ¶
func (s *CaptchaType) UnmarshalText(data []byte) error
UnmarshalText implements encoding.TextUnmarshaler.
func (CaptchaType) Validate ¶
func (s CaptchaType) Validate() error
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) APICaptcha2chcaptchaIDGet ¶
func (c *Client) APICaptcha2chcaptchaIDGet(ctx context.Context, params APICaptcha2chcaptchaIDGetParams) (*Captcha, error)
APICaptcha2chcaptchaIDGet invokes GET /api/captcha/2chcaptcha/id operation.
Получение ид для использования 2chcaptcha.
GET /api/captcha/2chcaptcha/id
func (*Client) APICaptcha2chcaptchaShowGet ¶
func (c *Client) APICaptcha2chcaptchaShowGet(ctx context.Context, params APICaptcha2chcaptchaShowGetParams) (APICaptcha2chcaptchaShowGetRes, error)
APICaptcha2chcaptchaShowGet invokes GET /api/captcha/2chcaptcha/show operation.
Отображение 2chcaptcha по id.
GET /api/captcha/2chcaptcha/show
func (*Client) APICaptchaAppIDPublicKeyGet ¶
func (c *Client) APICaptchaAppIDPublicKeyGet(ctx context.Context, params APICaptchaAppIDPublicKeyGetParams) (*Captcha, error)
APICaptchaAppIDPublicKeyGet invokes GET /api/captcha/app/id/{public_key} operation.
Полученный id вам нужно отправить вместе с постом как app_response_id. При этом нужно отправить app_response = sha256(app_response_id + '|' + private key). Срок жизни id: 180 секунд.
GET /api/captcha/app/id/{public_key}
func (*Client) APICaptchaInvisibleRecaptchaIDGet ¶
func (c *Client) APICaptchaInvisibleRecaptchaIDGet(ctx context.Context, params APICaptchaInvisibleRecaptchaIDGetParams) (*Captcha, error)
APICaptchaInvisibleRecaptchaIDGet invokes GET /api/captcha/invisible_recaptcha/id operation.
Получение публичного ключа invisible recaptcha.
GET /api/captcha/invisible_recaptcha/id
func (*Client) APICaptchaInvisibleRecaptchaMobileGet ¶
APICaptchaInvisibleRecaptchaMobileGet invokes GET /api/captcha/invisible_recaptcha/mobile operation.
Получение html страницы для решения капчи, CORS отключён.
GET /api/captcha/invisible_recaptcha/mobile
func (*Client) APICaptchaRecaptchaIDGet ¶
func (c *Client) APICaptchaRecaptchaIDGet(ctx context.Context, params APICaptchaRecaptchaIDGetParams) (*Captcha, error)
APICaptchaRecaptchaIDGet invokes GET /api/captcha/recaptcha/id operation.
Получение публичного ключа recaptcha v2.
GET /api/captcha/recaptcha/id
func (*Client) APICaptchaRecaptchaMobileGet ¶
APICaptchaRecaptchaMobileGet invokes GET /api/captcha/recaptcha/mobile operation.
Получение html страницы для решения капчи, CORS отключён.
GET /api/captcha/recaptcha/mobile
func (*Client) APIDislikeGet ¶
APIDislikeGet invokes GET /api/dislike operation.
Добавление дизлайка на пост.
GET /api/dislike
func (*Client) APILikeGet ¶
APILikeGet invokes GET /api/like operation.
Добавление лайка на пост.
GET /api/like
func (*Client) APIMobileV2AfterBoardThreadNumGet ¶
func (c *Client) APIMobileV2AfterBoardThreadNumGet(ctx context.Context, params APIMobileV2AfterBoardThreadNumGetParams) (*MobileThreadPostsAfter, error)
APIMobileV2AfterBoardThreadNumGet invokes GET /api/mobile/v2/after/{board}/{thread}/{num} operation.
Получение постов в треде >= указанного. Не рекомендуется использовать для получения треда целиком, только для проверки новых постов.
GET /api/mobile/v2/after/{board}/{thread}/{num}
func (*Client) APIMobileV2BoardsGet ¶
APIMobileV2BoardsGet invokes GET /api/mobile/v2/boards operation.
Получение списка досок и их настроек.
GET /api/mobile/v2/boards
func (*Client) APIMobileV2InfoBoardThreadGet ¶
func (c *Client) APIMobileV2InfoBoardThreadGet(ctx context.Context, params APIMobileV2InfoBoardThreadGetParams) (*MobileThreadLastInfo, error)
APIMobileV2InfoBoardThreadGet invokes GET /api/mobile/v2/info/{board}/{thread} operation.
Получение информации о треде.
GET /api/mobile/v2/info/{board}/{thread}
func (*Client) APIMobileV2PostBoardNumGet ¶
func (c *Client) APIMobileV2PostBoardNumGet(ctx context.Context, params APIMobileV2PostBoardNumGetParams) (*MobilePost, error)
APIMobileV2PostBoardNumGet invokes GET /api/mobile/v2/post/{board}/{num} operation.
Получение информации о посте.
GET /api/mobile/v2/post/{board}/{num}
func (*Client) UserPassloginPost ¶
func (c *Client) UserPassloginPost(ctx context.Context, request OptUserPassloginPostReq, params UserPassloginPostParams) (*Passcode, error)
UserPassloginPost invokes POST /user/passlogin operation.
Авторизация пасскода.
POST /user/passlogin
func (*Client) UserPostingPost ¶
func (c *Client) UserPostingPost(ctx context.Context, request OptUserPostingPostReq) (UserPostingPostOK, error)
UserPostingPost invokes POST /user/posting operation.
Создание нового поста или треда.
POST /user/posting
func (*Client) UserReportPost ¶
UserReportPost invokes POST /user/report operation.
Отправка жалобы.
POST /user/report
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 Error ¶
type Error struct { Code OptErrorCode `json:"code"` // Описание ошибки на русском языке. Message OptString `json:"message"` }
Ошибка запроса. Ref: #/components/schemas/Error
func (*Error) GetMessage ¶
GetMessage returns the value of Message.
func (*Error) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*Error) SetMessage ¶
SetMessage sets the value of Message.
func (*Error) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type ErrorCode ¶
type ErrorCode int
* 0 NoError, ошибки нет. * 403 ErrorForbidden, ошибка доступа. * 666 ErrorInternal, внутренняя ошибка. * 667 ErrorNotFound, используется для совместимости, если запрос не существует. * -2 ErrorNoBoard, доска не существует. * -3 ErrorNoParent, тред не существует. * -31 ErrorNoPost, пост не существует. * -4 ErrorNoAccess, контент существует, но у вас нет доступа. * -41 ErrorBoardClosed, доска закрыта. * -42 ErrorBoardOnlyVIP, доступ к доске возможен только с пасскодом. * -5 ErrorCaptchaNotValid, капча не валидна. * -6 ErrorBanned, вы были забанены. Сообщение содержит причину и номер бана. * -7 ErrorThreadClosed, тред закрыт. * -8 ErrorPostingToFast, вы постите слишком быстро ИЛИ установлен лимит на создание тредов на доске. * -9 ErrorFieldTooBig, поле слишком большое. Например, комментарий превысил лимит. * -10 ErrorFileSimilar, похожий файл уже был загружен. * -11 ErrorFileNotSupported, файл не поддерживается. * -12 ErrorFileTooBig, слишком большой файл. * -13 ErrorFilesTooMuch, вы загрузили больше файлов, чем разрешено на доске. * -14 ErrorTripBanned, трипкод был забанен. * -15 ErrorWordBanned, в комментарии недопустимое выражение. * -16 ErrorSpamList, в комментарии выражение из спамлиста. * -19 ErrorEmptyOp, при создании треда необходимо загрузить файл. * -20 ErrorEmptyPost, пост не может быть пустым, необходим комментарий/файл/etc. * -21 ErrorPasscodeNotExist, пасскод не существует. * -22 ErrorLimitReached, достигнут лимит запросов, попробуйте позже. * -23 ErrorFieldTooSmall, слишком короткое сообщение. (используется в поиске). * -50 ErrorReportTooManyPostsm, слишком много постов для жалобы. * -51 ErrorReportEmpty, вы ничего не написали в жалобе. * -52 ErrorReportExist, вы уже отправляли жалобу. * -300 ErrorAppNotExist, приложение не существует или было отключено. * -301 ErrorAppIDWrong, некорректный идентификатор приложения. * -302 ErrorAppIDExpired, идентификатор приложения истёк. * -303 ErrorAppIDSignature, неверная подпись поста с помощью идентификатора. * -304 ErrorAppIDUsed, указанный идентификатор уже был использован. * -24 ErrorWrongStickerID, некорректный идентификатор стикера. * -25 ErrorStickerNotFound, стикер не найден. Ref: #/components/schemas/ErrorCode
const ( ErrorCode0 ErrorCode = 0 ErrorCode403 ErrorCode = 403 ErrorCode666 ErrorCode = 666 ErrorCode667 ErrorCode = 667 ErrorCodeMinus2 ErrorCode = -2 ErrorCodeMinus3 ErrorCode = -3 ErrorCodeMinus31 ErrorCode = -31 ErrorCodeMinus4 ErrorCode = -4 ErrorCodeMinus41 ErrorCode = -41 ErrorCodeMinus42 ErrorCode = -42 ErrorCodeMinus5 ErrorCode = -5 ErrorCodeMinus6 ErrorCode = -6 ErrorCodeMinus7 ErrorCode = -7 ErrorCodeMinus8 ErrorCode = -8 ErrorCodeMinus9 ErrorCode = -9 ErrorCodeMinus10 ErrorCode = -10 ErrorCodeMinus11 ErrorCode = -11 ErrorCodeMinus12 ErrorCode = -12 ErrorCodeMinus13 ErrorCode = -13 ErrorCodeMinus14 ErrorCode = -14 ErrorCodeMinus15 ErrorCode = -15 ErrorCodeMinus16 ErrorCode = -16 ErrorCodeMinus19 ErrorCode = -19 ErrorCodeMinus20 ErrorCode = -20 ErrorCodeMinus21 ErrorCode = -21 ErrorCodeMinus22 ErrorCode = -22 ErrorCodeMinus23 ErrorCode = -23 ErrorCodeMinus300 ErrorCode = -300 ErrorCodeMinus301 ErrorCode = -301 ErrorCodeMinus302 ErrorCode = -302 ErrorCodeMinus303 ErrorCode = -303 ErrorCodeMinus304 ErrorCode = -304 ErrorCodeMinus24 ErrorCode = -24 ErrorCodeMinus25 ErrorCode = -25 )
func (ErrorCode) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*ErrorCode) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type File ¶
type File struct { Name string `json:"name"` Fullname string `json:"fullname"` Displayname string `json:"displayname"` Path string `json:"path"` Thumbnail string `json:"thumbnail"` MD5 OptString `json:"md5"` Type FileType `json:"type"` // Размер файла, в КБ. Size int `json:"size"` Width int `json:"width"` Height int `json:"height"` TnWidth int `json:"tn_width"` TnHeight int `json:"tn_height"` // Если >= 0, файл содержит NSFW контент, в данный момент // реализовано не на всех досках. Nsfw OptInt `json:"nsfw"` // В случае видео/аудио файла, содержит // продолжительность в формате XX:XX:XX. Duration OptString `json:"duration"` // В случае видео/аудио файла, содержит // продолжительность в секундах. DurationSecs OptInt `json:"duration_secs"` // В случае стикера, содержит ID стикер пака. Pack OptString `json:"pack"` // В случае стикера, содержит ID стикера. Sticker OptString `json:"sticker"` // В случае стикера, содержит ссылку на установку. Install OptString `json:"install"` }
Модель файла. Ref: #/components/schemas/File
func (*File) GetDisplayname ¶
GetDisplayname returns the value of Displayname.
func (*File) GetDuration ¶
GetDuration returns the value of Duration.
func (*File) GetDurationSecs ¶
GetDurationSecs returns the value of DurationSecs.
func (*File) GetFullname ¶
GetFullname returns the value of Fullname.
func (*File) GetInstall ¶
GetInstall returns the value of Install.
func (*File) GetSticker ¶
GetSticker returns the value of Sticker.
func (*File) GetThumbnail ¶
GetThumbnail returns the value of Thumbnail.
func (*File) GetTnHeight ¶
GetTnHeight returns the value of TnHeight.
func (*File) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*File) SetDisplayname ¶
SetDisplayname sets the value of Displayname.
func (*File) SetDuration ¶
SetDuration sets the value of Duration.
func (*File) SetDurationSecs ¶
SetDurationSecs sets the value of DurationSecs.
func (*File) SetFullname ¶
SetFullname sets the value of Fullname.
func (*File) SetInstall ¶
SetInstall sets the value of Install.
func (*File) SetSticker ¶
SetSticker sets the value of Sticker.
func (*File) SetThumbnail ¶
SetThumbnail sets the value of Thumbnail.
func (*File) SetTnHeight ¶
SetTnHeight sets the value of TnHeight.
func (*File) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type FileType ¶
type FileType int
* 0 FileTypeNone * 1 FileTypeJpg * 2 FileTypePng * 3 FileTypeAPng * 4 FileTypeGif * 5 FileTypeBmp * 6 FileTypeWebm * 7 FileTypeMp3, не используется в данный момент. * 8 FileTypeOgg, не используется в данный момент. * 10 FileTypeMp4 * 100 FileTypeSticker. Ref: #/components/schemas/FileType
func (FileType) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*FileType) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type Handler ¶
type Handler interface { // APICaptcha2chcaptchaIDGet implements GET /api/captcha/2chcaptcha/id operation. // // Получение ид для использования 2chcaptcha. // // GET /api/captcha/2chcaptcha/id APICaptcha2chcaptchaIDGet(ctx context.Context, params APICaptcha2chcaptchaIDGetParams) (*Captcha, error) // APICaptcha2chcaptchaShowGet implements GET /api/captcha/2chcaptcha/show operation. // // Отображение 2chcaptcha по id. // // GET /api/captcha/2chcaptcha/show APICaptcha2chcaptchaShowGet(ctx context.Context, params APICaptcha2chcaptchaShowGetParams) (APICaptcha2chcaptchaShowGetRes, error) // APICaptchaAppIDPublicKeyGet implements GET /api/captcha/app/id/{public_key} operation. // // Полученный id вам нужно отправить вместе с постом как // app_response_id. // При этом нужно отправить app_response = sha256(app_response_id + '|' + // private key). // Срок жизни id: 180 секунд. // // GET /api/captcha/app/id/{public_key} APICaptchaAppIDPublicKeyGet(ctx context.Context, params APICaptchaAppIDPublicKeyGetParams) (*Captcha, error) // APICaptchaInvisibleRecaptchaIDGet implements GET /api/captcha/invisible_recaptcha/id operation. // // Получение публичного ключа invisible recaptcha. // // GET /api/captcha/invisible_recaptcha/id APICaptchaInvisibleRecaptchaIDGet(ctx context.Context, params APICaptchaInvisibleRecaptchaIDGetParams) (*Captcha, error) // APICaptchaInvisibleRecaptchaMobileGet implements GET /api/captcha/invisible_recaptcha/mobile operation. // // Получение html страницы для решения капчи, CORS отключён. // // GET /api/captcha/invisible_recaptcha/mobile APICaptchaInvisibleRecaptchaMobileGet(ctx context.Context) error // APICaptchaRecaptchaIDGet implements GET /api/captcha/recaptcha/id operation. // // Получение публичного ключа recaptcha v2. // // GET /api/captcha/recaptcha/id APICaptchaRecaptchaIDGet(ctx context.Context, params APICaptchaRecaptchaIDGetParams) (*Captcha, error) // APICaptchaRecaptchaMobileGet implements GET /api/captcha/recaptcha/mobile operation. // // Получение html страницы для решения капчи, CORS отключён. // // GET /api/captcha/recaptcha/mobile APICaptchaRecaptchaMobileGet(ctx context.Context) error // APIDislikeGet implements GET /api/dislike operation. // // Добавление дизлайка на пост. // // GET /api/dislike APIDislikeGet(ctx context.Context, params APIDislikeGetParams) (*Like, error) // APILikeGet implements GET /api/like operation. // // Добавление лайка на пост. // // GET /api/like APILikeGet(ctx context.Context, params APILikeGetParams) (*Like, error) // APIMobileV2AfterBoardThreadNumGet implements GET /api/mobile/v2/after/{board}/{thread}/{num} operation. // // Получение постов в треде >= указанного. Не // рекомендуется использовать для получения треда // целиком, только для проверки новых постов. // // GET /api/mobile/v2/after/{board}/{thread}/{num} APIMobileV2AfterBoardThreadNumGet(ctx context.Context, params APIMobileV2AfterBoardThreadNumGetParams) (*MobileThreadPostsAfter, error) // APIMobileV2BoardsGet implements GET /api/mobile/v2/boards operation. // // Получение списка досок и их настроек. // // GET /api/mobile/v2/boards APIMobileV2BoardsGet(ctx context.Context) (Boards, error) // APIMobileV2InfoBoardThreadGet implements GET /api/mobile/v2/info/{board}/{thread} operation. // // Получение информации о треде. // // GET /api/mobile/v2/info/{board}/{thread} APIMobileV2InfoBoardThreadGet(ctx context.Context, params APIMobileV2InfoBoardThreadGetParams) (*MobileThreadLastInfo, error) // APIMobileV2PostBoardNumGet implements GET /api/mobile/v2/post/{board}/{num} operation. // // Получение информации о посте. // // GET /api/mobile/v2/post/{board}/{num} APIMobileV2PostBoardNumGet(ctx context.Context, params APIMobileV2PostBoardNumGetParams) (*MobilePost, error) // UserPassloginPost implements POST /user/passlogin operation. // // Авторизация пасскода. // // POST /user/passlogin UserPassloginPost(ctx context.Context, req OptUserPassloginPostReq, params UserPassloginPostParams) (*Passcode, error) // UserPostingPost implements POST /user/posting operation. // // Создание нового поста или треда. // // POST /user/posting UserPostingPost(ctx context.Context, req OptUserPostingPostReq) (UserPostingPostOK, error) // UserReportPost implements POST /user/report operation. // // Отправка жалобы. // // POST /user/report UserReportPost(ctx context.Context, req OptUserReportPostReq) (*Report, error) }
Handler handles operations described by OpenAPI v3 specification.
type Invoker ¶
type Invoker interface { // APICaptcha2chcaptchaIDGet invokes GET /api/captcha/2chcaptcha/id operation. // // Получение ид для использования 2chcaptcha. // // GET /api/captcha/2chcaptcha/id APICaptcha2chcaptchaIDGet(ctx context.Context, params APICaptcha2chcaptchaIDGetParams) (*Captcha, error) // APICaptcha2chcaptchaShowGet invokes GET /api/captcha/2chcaptcha/show operation. // // Отображение 2chcaptcha по id. // // GET /api/captcha/2chcaptcha/show APICaptcha2chcaptchaShowGet(ctx context.Context, params APICaptcha2chcaptchaShowGetParams) (APICaptcha2chcaptchaShowGetRes, error) // APICaptchaAppIDPublicKeyGet invokes GET /api/captcha/app/id/{public_key} operation. // // Полученный id вам нужно отправить вместе с постом как // app_response_id. // При этом нужно отправить app_response = sha256(app_response_id + '|' + // private key). // Срок жизни id: 180 секунд. // // GET /api/captcha/app/id/{public_key} APICaptchaAppIDPublicKeyGet(ctx context.Context, params APICaptchaAppIDPublicKeyGetParams) (*Captcha, error) // APICaptchaInvisibleRecaptchaIDGet invokes GET /api/captcha/invisible_recaptcha/id operation. // // Получение публичного ключа invisible recaptcha. // // GET /api/captcha/invisible_recaptcha/id APICaptchaInvisibleRecaptchaIDGet(ctx context.Context, params APICaptchaInvisibleRecaptchaIDGetParams) (*Captcha, error) // APICaptchaInvisibleRecaptchaMobileGet invokes GET /api/captcha/invisible_recaptcha/mobile operation. // // Получение html страницы для решения капчи, CORS отключён. // // GET /api/captcha/invisible_recaptcha/mobile APICaptchaInvisibleRecaptchaMobileGet(ctx context.Context) error // APICaptchaRecaptchaIDGet invokes GET /api/captcha/recaptcha/id operation. // // Получение публичного ключа recaptcha v2. // // GET /api/captcha/recaptcha/id APICaptchaRecaptchaIDGet(ctx context.Context, params APICaptchaRecaptchaIDGetParams) (*Captcha, error) // APICaptchaRecaptchaMobileGet invokes GET /api/captcha/recaptcha/mobile operation. // // Получение html страницы для решения капчи, CORS отключён. // // GET /api/captcha/recaptcha/mobile APICaptchaRecaptchaMobileGet(ctx context.Context) error // APIDislikeGet invokes GET /api/dislike operation. // // Добавление дизлайка на пост. // // GET /api/dislike APIDislikeGet(ctx context.Context, params APIDislikeGetParams) (*Like, error) // APILikeGet invokes GET /api/like operation. // // Добавление лайка на пост. // // GET /api/like APILikeGet(ctx context.Context, params APILikeGetParams) (*Like, error) // APIMobileV2AfterBoardThreadNumGet invokes GET /api/mobile/v2/after/{board}/{thread}/{num} operation. // // Получение постов в треде >= указанного. Не // рекомендуется использовать для получения треда // целиком, только для проверки новых постов. // // GET /api/mobile/v2/after/{board}/{thread}/{num} APIMobileV2AfterBoardThreadNumGet(ctx context.Context, params APIMobileV2AfterBoardThreadNumGetParams) (*MobileThreadPostsAfter, error) // APIMobileV2BoardsGet invokes GET /api/mobile/v2/boards operation. // // Получение списка досок и их настроек. // // GET /api/mobile/v2/boards APIMobileV2BoardsGet(ctx context.Context) (Boards, error) // APIMobileV2InfoBoardThreadGet invokes GET /api/mobile/v2/info/{board}/{thread} operation. // // Получение информации о треде. // // GET /api/mobile/v2/info/{board}/{thread} APIMobileV2InfoBoardThreadGet(ctx context.Context, params APIMobileV2InfoBoardThreadGetParams) (*MobileThreadLastInfo, error) // APIMobileV2PostBoardNumGet invokes GET /api/mobile/v2/post/{board}/{num} operation. // // Получение информации о посте. // // GET /api/mobile/v2/post/{board}/{num} APIMobileV2PostBoardNumGet(ctx context.Context, params APIMobileV2PostBoardNumGetParams) (*MobilePost, error) // UserPassloginPost invokes POST /user/passlogin operation. // // Авторизация пасскода. // // POST /user/passlogin UserPassloginPost(ctx context.Context, request OptUserPassloginPostReq, params UserPassloginPostParams) (*Passcode, error) // UserPostingPost invokes POST /user/posting operation. // // Создание нового поста или треда. // // POST /user/posting UserPostingPost(ctx context.Context, request OptUserPostingPostReq) (UserPostingPostOK, error) // UserReportPost invokes POST /user/report operation. // // Отправка жалобы. // // POST /user/report UserReportPost(ctx context.Context, request OptUserReportPostReq) (*Report, error) }
Invoker invokes operations described by OpenAPI v3 specification.
type Labeler ¶
type Labeler struct {
// contains filtered or unexported fields
}
Labeler is used to allow adding custom attributes to the server request metrics.
func LabelerFromContext ¶
LabelerFromContext retrieves the Labeler from the provided context, if present.
If no Labeler was found in the provided context a new, empty Labeler is returned and the second return value is false. In this case it is safe to use the Labeler but any attributes added to it will not be used.
func (*Labeler) AttributeSet ¶
AttributeSet returns the attributes added to the Labeler as an attribute.Set.
type Like ¶
Ref: #/components/schemas/Like
func (*Like) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*Like) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type MobilePost ¶
type MobilePost struct { Result OptInt `json:"result"` Error OptError `json:"error"` Post OptPost `json:"post"` }
Ref: #/components/schemas/MobilePost
func (*MobilePost) Decode ¶
func (s *MobilePost) Decode(d *jx.Decoder) error
Decode decodes MobilePost from json.
func (*MobilePost) Encode ¶
func (s *MobilePost) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*MobilePost) GetError ¶
func (s *MobilePost) GetError() OptError
GetError returns the value of Error.
func (*MobilePost) GetPost ¶
func (s *MobilePost) GetPost() OptPost
GetPost returns the value of Post.
func (*MobilePost) GetResult ¶
func (s *MobilePost) GetResult() OptInt
GetResult returns the value of Result.
func (*MobilePost) MarshalJSON ¶
func (s *MobilePost) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*MobilePost) SetError ¶
func (s *MobilePost) SetError(val OptError)
SetError sets the value of Error.
func (*MobilePost) SetPost ¶
func (s *MobilePost) SetPost(val OptPost)
SetPost sets the value of Post.
func (*MobilePost) SetResult ¶
func (s *MobilePost) SetResult(val OptInt)
SetResult sets the value of Result.
func (*MobilePost) UnmarshalJSON ¶
func (s *MobilePost) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*MobilePost) Validate ¶
func (s *MobilePost) Validate() error
type MobileThreadLastInfo ¶
type MobileThreadLastInfo struct { Result OptInt `json:"result"` Error OptError `json:"error"` Thread OptMobileThreadLastInfoThread `json:"thread"` }
Ref: #/components/schemas/MobileThreadLastInfo
func (*MobileThreadLastInfo) Decode ¶
func (s *MobileThreadLastInfo) Decode(d *jx.Decoder) error
Decode decodes MobileThreadLastInfo from json.
func (*MobileThreadLastInfo) Encode ¶
func (s *MobileThreadLastInfo) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*MobileThreadLastInfo) GetError ¶
func (s *MobileThreadLastInfo) GetError() OptError
GetError returns the value of Error.
func (*MobileThreadLastInfo) GetResult ¶
func (s *MobileThreadLastInfo) GetResult() OptInt
GetResult returns the value of Result.
func (*MobileThreadLastInfo) GetThread ¶
func (s *MobileThreadLastInfo) GetThread() OptMobileThreadLastInfoThread
GetThread returns the value of Thread.
func (*MobileThreadLastInfo) MarshalJSON ¶
func (s *MobileThreadLastInfo) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*MobileThreadLastInfo) SetError ¶
func (s *MobileThreadLastInfo) SetError(val OptError)
SetError sets the value of Error.
func (*MobileThreadLastInfo) SetFake ¶
func (s *MobileThreadLastInfo) SetFake()
SetFake set fake values.
func (*MobileThreadLastInfo) SetResult ¶
func (s *MobileThreadLastInfo) SetResult(val OptInt)
SetResult sets the value of Result.
func (*MobileThreadLastInfo) SetThread ¶
func (s *MobileThreadLastInfo) SetThread(val OptMobileThreadLastInfoThread)
SetThread sets the value of Thread.
func (*MobileThreadLastInfo) UnmarshalJSON ¶
func (s *MobileThreadLastInfo) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*MobileThreadLastInfo) Validate ¶
func (s *MobileThreadLastInfo) Validate() error
type MobileThreadLastInfoThread ¶
type MobileThreadLastInfoThread struct { Num OptInt `json:"num"` Timestamp OptInt `json:"timestamp"` Posts OptInt `json:"posts"` }
func (*MobileThreadLastInfoThread) Decode ¶
func (s *MobileThreadLastInfoThread) Decode(d *jx.Decoder) error
Decode decodes MobileThreadLastInfoThread from json.
func (*MobileThreadLastInfoThread) Encode ¶
func (s *MobileThreadLastInfoThread) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*MobileThreadLastInfoThread) GetNum ¶
func (s *MobileThreadLastInfoThread) GetNum() OptInt
GetNum returns the value of Num.
func (*MobileThreadLastInfoThread) GetPosts ¶
func (s *MobileThreadLastInfoThread) GetPosts() OptInt
GetPosts returns the value of Posts.
func (*MobileThreadLastInfoThread) GetTimestamp ¶
func (s *MobileThreadLastInfoThread) GetTimestamp() OptInt
GetTimestamp returns the value of Timestamp.
func (*MobileThreadLastInfoThread) MarshalJSON ¶
func (s *MobileThreadLastInfoThread) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*MobileThreadLastInfoThread) SetFake ¶
func (s *MobileThreadLastInfoThread) SetFake()
SetFake set fake values.
func (*MobileThreadLastInfoThread) SetNum ¶
func (s *MobileThreadLastInfoThread) SetNum(val OptInt)
SetNum sets the value of Num.
func (*MobileThreadLastInfoThread) SetPosts ¶
func (s *MobileThreadLastInfoThread) SetPosts(val OptInt)
SetPosts sets the value of Posts.
func (*MobileThreadLastInfoThread) SetTimestamp ¶
func (s *MobileThreadLastInfoThread) SetTimestamp(val OptInt)
SetTimestamp sets the value of Timestamp.
func (*MobileThreadLastInfoThread) UnmarshalJSON ¶
func (s *MobileThreadLastInfoThread) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type MobileThreadPostsAfter ¶
type MobileThreadPostsAfter struct { Result OptInt `json:"result"` Error OptError `json:"error"` UniquePosters OptInt `json:"unique_posters"` Posts []Post `json:"posts"` }
Ref: #/components/schemas/MobileThreadPostsAfter
func (*MobileThreadPostsAfter) Decode ¶
func (s *MobileThreadPostsAfter) Decode(d *jx.Decoder) error
Decode decodes MobileThreadPostsAfter from json.
func (*MobileThreadPostsAfter) Encode ¶
func (s *MobileThreadPostsAfter) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*MobileThreadPostsAfter) GetError ¶
func (s *MobileThreadPostsAfter) GetError() OptError
GetError returns the value of Error.
func (*MobileThreadPostsAfter) GetPosts ¶
func (s *MobileThreadPostsAfter) GetPosts() []Post
GetPosts returns the value of Posts.
func (*MobileThreadPostsAfter) GetResult ¶
func (s *MobileThreadPostsAfter) GetResult() OptInt
GetResult returns the value of Result.
func (*MobileThreadPostsAfter) GetUniquePosters ¶
func (s *MobileThreadPostsAfter) GetUniquePosters() OptInt
GetUniquePosters returns the value of UniquePosters.
func (*MobileThreadPostsAfter) MarshalJSON ¶
func (s *MobileThreadPostsAfter) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*MobileThreadPostsAfter) SetError ¶
func (s *MobileThreadPostsAfter) SetError(val OptError)
SetError sets the value of Error.
func (*MobileThreadPostsAfter) SetFake ¶
func (s *MobileThreadPostsAfter) SetFake()
SetFake set fake values.
func (*MobileThreadPostsAfter) SetPosts ¶
func (s *MobileThreadPostsAfter) SetPosts(val []Post)
SetPosts sets the value of Posts.
func (*MobileThreadPostsAfter) SetResult ¶
func (s *MobileThreadPostsAfter) SetResult(val OptInt)
SetResult sets the value of Result.
func (*MobileThreadPostsAfter) SetUniquePosters ¶
func (s *MobileThreadPostsAfter) SetUniquePosters(val OptInt)
SetUniquePosters sets the value of UniquePosters.
func (*MobileThreadPostsAfter) UnmarshalJSON ¶
func (s *MobileThreadPostsAfter) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*MobileThreadPostsAfter) Validate ¶
func (s *MobileThreadPostsAfter) Validate() error
type OperationName ¶
type OperationName = string
OperationName is the ogen operation name
const ( APICaptcha2chcaptchaIDGetOperation OperationName = "APICaptcha2chcaptchaIDGet" APICaptcha2chcaptchaShowGetOperation OperationName = "APICaptcha2chcaptchaShowGet" APICaptchaAppIDPublicKeyGetOperation OperationName = "APICaptchaAppIDPublicKeyGet" APICaptchaInvisibleRecaptchaIDGetOperation OperationName = "APICaptchaInvisibleRecaptchaIDGet" APICaptchaInvisibleRecaptchaMobileGetOperation OperationName = "APICaptchaInvisibleRecaptchaMobileGet" APICaptchaRecaptchaIDGetOperation OperationName = "APICaptchaRecaptchaIDGet" APICaptchaRecaptchaMobileGetOperation OperationName = "APICaptchaRecaptchaMobileGet" APIDislikeGetOperation OperationName = "APIDislikeGet" APILikeGetOperation OperationName = "APILikeGet" APIMobileV2AfterBoardThreadNumGetOperation OperationName = "APIMobileV2AfterBoardThreadNumGet" APIMobileV2BoardsGetOperation OperationName = "APIMobileV2BoardsGet" APIMobileV2InfoBoardThreadGetOperation OperationName = "APIMobileV2InfoBoardThreadGet" APIMobileV2PostBoardNumGetOperation OperationName = "APIMobileV2PostBoardNumGet" UserPassloginPostOperation OperationName = "UserPassloginPost" UserPostingPostOperation OperationName = "UserPostingPost" UserReportPostOperation OperationName = "UserReportPost" )
type OptError ¶
OptError is optional Error.
func NewOptError ¶
NewOptError returns new OptError with value set to v.
func (OptError) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*OptError) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type OptErrorCode ¶
OptErrorCode is optional ErrorCode.
func NewOptErrorCode ¶
func NewOptErrorCode(v ErrorCode) OptErrorCode
NewOptErrorCode returns new OptErrorCode with value set to v.
func (*OptErrorCode) Decode ¶
func (o *OptErrorCode) Decode(d *jx.Decoder) error
Decode decodes ErrorCode from json.
func (OptErrorCode) Encode ¶
func (o OptErrorCode) Encode(e *jx.Encoder)
Encode encodes ErrorCode as json.
func (OptErrorCode) Get ¶
func (o OptErrorCode) Get() (v ErrorCode, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptErrorCode) IsSet ¶
func (o OptErrorCode) IsSet() bool
IsSet returns true if OptErrorCode was set.
func (OptErrorCode) MarshalJSON ¶
func (s OptErrorCode) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (OptErrorCode) Or ¶
func (o OptErrorCode) Or(d ErrorCode) ErrorCode
Or returns value if set, or given parameter if does not.
func (*OptErrorCode) UnmarshalJSON ¶
func (s *OptErrorCode) UnmarshalJSON(data []byte) error
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 OptMobileThreadLastInfoThread ¶
type OptMobileThreadLastInfoThread struct { Value MobileThreadLastInfoThread Set bool }
OptMobileThreadLastInfoThread is optional MobileThreadLastInfoThread.
func NewOptMobileThreadLastInfoThread ¶
func NewOptMobileThreadLastInfoThread(v MobileThreadLastInfoThread) OptMobileThreadLastInfoThread
NewOptMobileThreadLastInfoThread returns new OptMobileThreadLastInfoThread with value set to v.
func (*OptMobileThreadLastInfoThread) Decode ¶
func (o *OptMobileThreadLastInfoThread) Decode(d *jx.Decoder) error
Decode decodes MobileThreadLastInfoThread from json.
func (OptMobileThreadLastInfoThread) Encode ¶
func (o OptMobileThreadLastInfoThread) Encode(e *jx.Encoder)
Encode encodes MobileThreadLastInfoThread as json.
func (OptMobileThreadLastInfoThread) Get ¶
func (o OptMobileThreadLastInfoThread) Get() (v MobileThreadLastInfoThread, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptMobileThreadLastInfoThread) IsSet ¶
func (o OptMobileThreadLastInfoThread) IsSet() bool
IsSet returns true if OptMobileThreadLastInfoThread was set.
func (OptMobileThreadLastInfoThread) MarshalJSON ¶
func (s OptMobileThreadLastInfoThread) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*OptMobileThreadLastInfoThread) Reset ¶
func (o *OptMobileThreadLastInfoThread) Reset()
Reset unsets value.
func (*OptMobileThreadLastInfoThread) SetFake ¶
func (s *OptMobileThreadLastInfoThread) SetFake()
SetFake set fake values.
func (*OptMobileThreadLastInfoThread) SetTo ¶
func (o *OptMobileThreadLastInfoThread) SetTo(v MobileThreadLastInfoThread)
SetTo sets value to v.
func (*OptMobileThreadLastInfoThread) UnmarshalJSON ¶
func (s *OptMobileThreadLastInfoThread) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type OptPasscodePasscode ¶
type OptPasscodePasscode struct { Value PasscodePasscode Set bool }
OptPasscodePasscode is optional PasscodePasscode.
func NewOptPasscodePasscode ¶
func NewOptPasscodePasscode(v PasscodePasscode) OptPasscodePasscode
NewOptPasscodePasscode returns new OptPasscodePasscode with value set to v.
func (*OptPasscodePasscode) Decode ¶
func (o *OptPasscodePasscode) Decode(d *jx.Decoder) error
Decode decodes PasscodePasscode from json.
func (OptPasscodePasscode) Encode ¶
func (o OptPasscodePasscode) Encode(e *jx.Encoder)
Encode encodes PasscodePasscode as json.
func (OptPasscodePasscode) Get ¶
func (o OptPasscodePasscode) Get() (v PasscodePasscode, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptPasscodePasscode) IsSet ¶
func (o OptPasscodePasscode) IsSet() bool
IsSet returns true if OptPasscodePasscode was set.
func (OptPasscodePasscode) MarshalJSON ¶
func (s OptPasscodePasscode) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (OptPasscodePasscode) Or ¶
func (o OptPasscodePasscode) Or(d PasscodePasscode) PasscodePasscode
Or returns value if set, or given parameter if does not.
func (*OptPasscodePasscode) SetFake ¶
func (s *OptPasscodePasscode) SetFake()
SetFake set fake values.
func (*OptPasscodePasscode) SetTo ¶
func (o *OptPasscodePasscode) SetTo(v PasscodePasscode)
SetTo sets value to v.
func (*OptPasscodePasscode) UnmarshalJSON ¶
func (s *OptPasscodePasscode) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type OptPost ¶
OptPost is optional Post.
func NewOptPost ¶
NewOptPost returns new OptPost with value set to v.
func (OptPost) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*OptPost) 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 OptUserPassloginPostReq ¶
type OptUserPassloginPostReq struct { Value UserPassloginPostReq Set bool }
OptUserPassloginPostReq is optional UserPassloginPostReq.
func NewOptUserPassloginPostReq ¶
func NewOptUserPassloginPostReq(v UserPassloginPostReq) OptUserPassloginPostReq
NewOptUserPassloginPostReq returns new OptUserPassloginPostReq with value set to v.
func (OptUserPassloginPostReq) Get ¶
func (o OptUserPassloginPostReq) Get() (v UserPassloginPostReq, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptUserPassloginPostReq) IsSet ¶
func (o OptUserPassloginPostReq) IsSet() bool
IsSet returns true if OptUserPassloginPostReq was set.
func (OptUserPassloginPostReq) Or ¶
func (o OptUserPassloginPostReq) Or(d UserPassloginPostReq) UserPassloginPostReq
Or returns value if set, or given parameter if does not.
func (*OptUserPassloginPostReq) Reset ¶
func (o *OptUserPassloginPostReq) Reset()
Reset unsets value.
func (*OptUserPassloginPostReq) SetTo ¶
func (o *OptUserPassloginPostReq) SetTo(v UserPassloginPostReq)
SetTo sets value to v.
type OptUserPostingPostReq ¶
type OptUserPostingPostReq struct { Value UserPostingPostReq Set bool }
OptUserPostingPostReq is optional UserPostingPostReq.
func NewOptUserPostingPostReq ¶
func NewOptUserPostingPostReq(v UserPostingPostReq) OptUserPostingPostReq
NewOptUserPostingPostReq returns new OptUserPostingPostReq with value set to v.
func (OptUserPostingPostReq) Get ¶
func (o OptUserPostingPostReq) Get() (v UserPostingPostReq, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptUserPostingPostReq) IsSet ¶
func (o OptUserPostingPostReq) IsSet() bool
IsSet returns true if OptUserPostingPostReq was set.
func (OptUserPostingPostReq) Or ¶
func (o OptUserPostingPostReq) Or(d UserPostingPostReq) UserPostingPostReq
Or returns value if set, or given parameter if does not.
func (*OptUserPostingPostReq) SetTo ¶
func (o *OptUserPostingPostReq) SetTo(v UserPostingPostReq)
SetTo sets value to v.
type OptUserReportPostReq ¶
type OptUserReportPostReq struct { Value UserReportPostReq Set bool }
OptUserReportPostReq is optional UserReportPostReq.
func NewOptUserReportPostReq ¶
func NewOptUserReportPostReq(v UserReportPostReq) OptUserReportPostReq
NewOptUserReportPostReq returns new OptUserReportPostReq with value set to v.
func (OptUserReportPostReq) Get ¶
func (o OptUserReportPostReq) Get() (v UserReportPostReq, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptUserReportPostReq) IsSet ¶
func (o OptUserReportPostReq) IsSet() bool
IsSet returns true if OptUserReportPostReq was set.
func (OptUserReportPostReq) Or ¶
func (o OptUserReportPostReq) Or(d UserReportPostReq) UserReportPostReq
Or returns value if set, or given parameter if does not.
func (*OptUserReportPostReq) SetTo ¶
func (o *OptUserReportPostReq) SetTo(v UserReportPostReq)
SetTo sets value to v.
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 Passcode ¶
type Passcode struct { Result OptInt `json:"result"` Error OptError `json:"error"` Passcode OptPasscodePasscode `json:"passcode"` }
Ref: #/components/schemas/Passcode
func (*Passcode) GetPasscode ¶
func (s *Passcode) GetPasscode() OptPasscodePasscode
GetPasscode returns the value of Passcode.
func (*Passcode) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*Passcode) SetPasscode ¶
func (s *Passcode) SetPasscode(val OptPasscodePasscode)
SetPasscode sets the value of Passcode.
func (*Passcode) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type PasscodePasscode ¶
func (*PasscodePasscode) Decode ¶
func (s *PasscodePasscode) Decode(d *jx.Decoder) error
Decode decodes PasscodePasscode from json.
func (*PasscodePasscode) Encode ¶
func (s *PasscodePasscode) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*PasscodePasscode) GetExpires ¶
func (s *PasscodePasscode) GetExpires() OptInt
GetExpires returns the value of Expires.
func (*PasscodePasscode) GetType ¶
func (s *PasscodePasscode) GetType() OptString
GetType returns the value of Type.
func (*PasscodePasscode) MarshalJSON ¶
func (s *PasscodePasscode) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*PasscodePasscode) SetExpires ¶
func (s *PasscodePasscode) SetExpires(val OptInt)
SetExpires sets the value of Expires.
func (*PasscodePasscode) SetType ¶
func (s *PasscodePasscode) SetType(val OptString)
SetType sets the value of Type.
func (*PasscodePasscode) UnmarshalJSON ¶
func (s *PasscodePasscode) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type Post ¶
type Post struct { Num int `json:"num"` Parent int `json:"parent"` Board string `json:"board"` Timestamp int `json:"timestamp"` Lasthit int `json:"lasthit"` Date string `json:"date"` Email OptString `json:"email"` Subject OptString `json:"subject"` Comment string `json:"comment"` Files []File `json:"files"` Views int `json:"views"` Sticky int `json:"sticky"` Endless int `json:"endless"` Closed int `json:"closed"` Banned int `json:"banned"` Op int `json:"op"` Name OptString `json:"name"` Icon OptString `json:"icon"` Trip OptString `json:"trip"` TripStyle OptString `json:"trip_style"` Tags OptString `json:"tags"` Likes OptInt `json:"likes"` Dislikes OptInt `json:"dislikes"` }
Модель поста. Ref: #/components/schemas/Post
func (*Post) GetComment ¶
GetComment returns the value of Comment.
func (*Post) GetDislikes ¶
GetDislikes returns the value of Dislikes.
func (*Post) GetSubject ¶
GetSubject returns the value of Subject.
func (*Post) GetTimestamp ¶
GetTimestamp returns the value of Timestamp.
func (*Post) GetTripStyle ¶
GetTripStyle returns the value of TripStyle.
func (*Post) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*Post) SetComment ¶
SetComment sets the value of Comment.
func (*Post) SetDislikes ¶
SetDislikes sets the value of Dislikes.
func (*Post) SetSubject ¶
SetSubject sets the value of Subject.
func (*Post) SetTimestamp ¶
SetTimestamp sets the value of Timestamp.
func (*Post) SetTripStyle ¶
SetTripStyle sets the value of TripStyle.
func (*Post) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type PostingNewPost ¶
type PostingNewPost struct { Result OptInt `json:"result"` Error OptError `json:"error"` // Номер нового поста. Num OptInt `json:"num"` }
Ref: #/components/schemas/PostingNewPost
func (*PostingNewPost) Decode ¶
func (s *PostingNewPost) Decode(d *jx.Decoder) error
Decode decodes PostingNewPost from json.
func (*PostingNewPost) Encode ¶
func (s *PostingNewPost) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*PostingNewPost) GetError ¶
func (s *PostingNewPost) GetError() OptError
GetError returns the value of Error.
func (*PostingNewPost) GetNum ¶
func (s *PostingNewPost) GetNum() OptInt
GetNum returns the value of Num.
func (*PostingNewPost) GetResult ¶
func (s *PostingNewPost) GetResult() OptInt
GetResult returns the value of Result.
func (*PostingNewPost) MarshalJSON ¶
func (s *PostingNewPost) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*PostingNewPost) SetError ¶
func (s *PostingNewPost) SetError(val OptError)
SetError sets the value of Error.
func (*PostingNewPost) SetNum ¶
func (s *PostingNewPost) SetNum(val OptInt)
SetNum sets the value of Num.
func (*PostingNewPost) SetResult ¶
func (s *PostingNewPost) SetResult(val OptInt)
SetResult sets the value of Result.
func (*PostingNewPost) UnmarshalJSON ¶
func (s *PostingNewPost) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*PostingNewPost) Validate ¶
func (s *PostingNewPost) Validate() error
type PostingNewThread ¶
type PostingNewThread struct { Result OptInt `json:"result"` Error OptError `json:"error"` // Номер нового треда. Thread OptInt `json:"thread"` }
Ref: #/components/schemas/PostingNewThread
func (*PostingNewThread) Decode ¶
func (s *PostingNewThread) Decode(d *jx.Decoder) error
Decode decodes PostingNewThread from json.
func (*PostingNewThread) Encode ¶
func (s *PostingNewThread) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*PostingNewThread) GetError ¶
func (s *PostingNewThread) GetError() OptError
GetError returns the value of Error.
func (*PostingNewThread) GetResult ¶
func (s *PostingNewThread) GetResult() OptInt
GetResult returns the value of Result.
func (*PostingNewThread) GetThread ¶
func (s *PostingNewThread) GetThread() OptInt
GetThread returns the value of Thread.
func (*PostingNewThread) MarshalJSON ¶
func (s *PostingNewThread) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*PostingNewThread) SetError ¶
func (s *PostingNewThread) SetError(val OptError)
SetError sets the value of Error.
func (*PostingNewThread) SetResult ¶
func (s *PostingNewThread) SetResult(val OptInt)
SetResult sets the value of Result.
func (*PostingNewThread) SetThread ¶
func (s *PostingNewThread) SetThread(val OptInt)
SetThread sets the value of Thread.
func (*PostingNewThread) UnmarshalJSON ¶
func (s *PostingNewThread) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*PostingNewThread) Validate ¶
func (s *PostingNewThread) Validate() error
type Report ¶
Ref: #/components/schemas/Report
func (*Report) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*Report) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type Route ¶
type Route struct {
// contains filtered or unexported fields
}
Route is route object.
func (Route) OperationID ¶
OperationID returns OpenAPI operationId.
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 UnimplementedHandler ¶
type UnimplementedHandler struct{}
UnimplementedHandler is no-op Handler which returns http.ErrNotImplemented.
func (UnimplementedHandler) APICaptcha2chcaptchaIDGet ¶
func (UnimplementedHandler) APICaptcha2chcaptchaIDGet(ctx context.Context, params APICaptcha2chcaptchaIDGetParams) (r *Captcha, _ error)
APICaptcha2chcaptchaIDGet implements GET /api/captcha/2chcaptcha/id operation.
Получение ид для использования 2chcaptcha.
GET /api/captcha/2chcaptcha/id
func (UnimplementedHandler) APICaptcha2chcaptchaShowGet ¶
func (UnimplementedHandler) APICaptcha2chcaptchaShowGet(ctx context.Context, params APICaptcha2chcaptchaShowGetParams) (r APICaptcha2chcaptchaShowGetRes, _ error)
APICaptcha2chcaptchaShowGet implements GET /api/captcha/2chcaptcha/show operation.
Отображение 2chcaptcha по id.
GET /api/captcha/2chcaptcha/show
func (UnimplementedHandler) APICaptchaAppIDPublicKeyGet ¶
func (UnimplementedHandler) APICaptchaAppIDPublicKeyGet(ctx context.Context, params APICaptchaAppIDPublicKeyGetParams) (r *Captcha, _ error)
APICaptchaAppIDPublicKeyGet implements GET /api/captcha/app/id/{public_key} operation.
Полученный id вам нужно отправить вместе с постом как app_response_id. При этом нужно отправить app_response = sha256(app_response_id + '|' + private key). Срок жизни id: 180 секунд.
GET /api/captcha/app/id/{public_key}
func (UnimplementedHandler) APICaptchaInvisibleRecaptchaIDGet ¶
func (UnimplementedHandler) APICaptchaInvisibleRecaptchaIDGet(ctx context.Context, params APICaptchaInvisibleRecaptchaIDGetParams) (r *Captcha, _ error)
APICaptchaInvisibleRecaptchaIDGet implements GET /api/captcha/invisible_recaptcha/id operation.
Получение публичного ключа invisible recaptcha.
GET /api/captcha/invisible_recaptcha/id
func (UnimplementedHandler) APICaptchaInvisibleRecaptchaMobileGet ¶
func (UnimplementedHandler) APICaptchaInvisibleRecaptchaMobileGet(ctx context.Context) error
APICaptchaInvisibleRecaptchaMobileGet implements GET /api/captcha/invisible_recaptcha/mobile operation.
Получение html страницы для решения капчи, CORS отключён.
GET /api/captcha/invisible_recaptcha/mobile
func (UnimplementedHandler) APICaptchaRecaptchaIDGet ¶
func (UnimplementedHandler) APICaptchaRecaptchaIDGet(ctx context.Context, params APICaptchaRecaptchaIDGetParams) (r *Captcha, _ error)
APICaptchaRecaptchaIDGet implements GET /api/captcha/recaptcha/id operation.
Получение публичного ключа recaptcha v2.
GET /api/captcha/recaptcha/id
func (UnimplementedHandler) APICaptchaRecaptchaMobileGet ¶
func (UnimplementedHandler) APICaptchaRecaptchaMobileGet(ctx context.Context) error
APICaptchaRecaptchaMobileGet implements GET /api/captcha/recaptcha/mobile operation.
Получение html страницы для решения капчи, CORS отключён.
GET /api/captcha/recaptcha/mobile
func (UnimplementedHandler) APIDislikeGet ¶
func (UnimplementedHandler) APIDislikeGet(ctx context.Context, params APIDislikeGetParams) (r *Like, _ error)
APIDislikeGet implements GET /api/dislike operation.
Добавление дизлайка на пост.
GET /api/dislike
func (UnimplementedHandler) APILikeGet ¶
func (UnimplementedHandler) APILikeGet(ctx context.Context, params APILikeGetParams) (r *Like, _ error)
APILikeGet implements GET /api/like operation.
Добавление лайка на пост.
GET /api/like
func (UnimplementedHandler) APIMobileV2AfterBoardThreadNumGet ¶
func (UnimplementedHandler) APIMobileV2AfterBoardThreadNumGet(ctx context.Context, params APIMobileV2AfterBoardThreadNumGetParams) (r *MobileThreadPostsAfter, _ error)
APIMobileV2AfterBoardThreadNumGet implements GET /api/mobile/v2/after/{board}/{thread}/{num} operation.
Получение постов в треде >= указанного. Не рекомендуется использовать для получения треда целиком, только для проверки новых постов.
GET /api/mobile/v2/after/{board}/{thread}/{num}
func (UnimplementedHandler) APIMobileV2BoardsGet ¶
func (UnimplementedHandler) APIMobileV2BoardsGet(ctx context.Context) (r Boards, _ error)
APIMobileV2BoardsGet implements GET /api/mobile/v2/boards operation.
Получение списка досок и их настроек.
GET /api/mobile/v2/boards
func (UnimplementedHandler) APIMobileV2InfoBoardThreadGet ¶
func (UnimplementedHandler) APIMobileV2InfoBoardThreadGet(ctx context.Context, params APIMobileV2InfoBoardThreadGetParams) (r *MobileThreadLastInfo, _ error)
APIMobileV2InfoBoardThreadGet implements GET /api/mobile/v2/info/{board}/{thread} operation.
Получение информации о треде.
GET /api/mobile/v2/info/{board}/{thread}
func (UnimplementedHandler) APIMobileV2PostBoardNumGet ¶
func (UnimplementedHandler) APIMobileV2PostBoardNumGet(ctx context.Context, params APIMobileV2PostBoardNumGetParams) (r *MobilePost, _ error)
APIMobileV2PostBoardNumGet implements GET /api/mobile/v2/post/{board}/{num} operation.
Получение информации о посте.
GET /api/mobile/v2/post/{board}/{num}
func (UnimplementedHandler) UserPassloginPost ¶
func (UnimplementedHandler) UserPassloginPost(ctx context.Context, req OptUserPassloginPostReq, params UserPassloginPostParams) (r *Passcode, _ error)
UserPassloginPost implements POST /user/passlogin operation.
Авторизация пасскода.
POST /user/passlogin
func (UnimplementedHandler) UserPostingPost ¶
func (UnimplementedHandler) UserPostingPost(ctx context.Context, req OptUserPostingPostReq) (r UserPostingPostOK, _ error)
UserPostingPost implements POST /user/posting operation.
Создание нового поста или треда.
POST /user/posting
func (UnimplementedHandler) UserReportPost ¶
func (UnimplementedHandler) UserReportPost(ctx context.Context, req OptUserReportPostReq) (r *Report, _ error)
UserReportPost implements POST /user/report operation.
Отправка жалобы.
POST /user/report
type UserPassloginPostParams ¶
type UserPassloginPostParams struct { // Параметр, указывающий что запрос выполняется не // пользователем и ответ нужен в формате json. JSON int }
UserPassloginPostParams is parameters of POST /user/passlogin operation.
type UserPassloginPostReq ¶
type UserPassloginPostReq struct {
Passcode string `json:"passcode"`
}
func (*UserPassloginPostReq) GetPasscode ¶
func (s *UserPassloginPostReq) GetPasscode() string
GetPasscode returns the value of Passcode.
func (*UserPassloginPostReq) SetPasscode ¶
func (s *UserPassloginPostReq) SetPasscode(val string)
SetPasscode sets the value of Passcode.
type UserPostingPostOK ¶
type UserPostingPostOK struct { Type UserPostingPostOKType // switch on this field PostingNewThread PostingNewThread PostingNewPost PostingNewPost }
UserPostingPostOK represents sum type.
func NewPostingNewPostUserPostingPostOK ¶
func NewPostingNewPostUserPostingPostOK(v PostingNewPost) UserPostingPostOK
NewPostingNewPostUserPostingPostOK returns new UserPostingPostOK from PostingNewPost.
func NewPostingNewThreadUserPostingPostOK ¶
func NewPostingNewThreadUserPostingPostOK(v PostingNewThread) UserPostingPostOK
NewPostingNewThreadUserPostingPostOK returns new UserPostingPostOK from PostingNewThread.
func (*UserPostingPostOK) Decode ¶
func (s *UserPostingPostOK) Decode(d *jx.Decoder) error
Decode decodes UserPostingPostOK from json.
func (UserPostingPostOK) Encode ¶
func (s UserPostingPostOK) Encode(e *jx.Encoder)
Encode encodes UserPostingPostOK as json.
func (UserPostingPostOK) GetPostingNewPost ¶
func (s UserPostingPostOK) GetPostingNewPost() (v PostingNewPost, ok bool)
GetPostingNewPost returns PostingNewPost and true boolean if UserPostingPostOK is PostingNewPost.
func (UserPostingPostOK) GetPostingNewThread ¶
func (s UserPostingPostOK) GetPostingNewThread() (v PostingNewThread, ok bool)
GetPostingNewThread returns PostingNewThread and true boolean if UserPostingPostOK is PostingNewThread.
func (UserPostingPostOK) IsPostingNewPost ¶
func (s UserPostingPostOK) IsPostingNewPost() bool
IsPostingNewPost reports whether UserPostingPostOK is PostingNewPost.
func (UserPostingPostOK) IsPostingNewThread ¶
func (s UserPostingPostOK) IsPostingNewThread() bool
IsPostingNewThread reports whether UserPostingPostOK is PostingNewThread.
func (UserPostingPostOK) MarshalJSON ¶
func (s UserPostingPostOK) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*UserPostingPostOK) SetPostingNewPost ¶
func (s *UserPostingPostOK) SetPostingNewPost(v PostingNewPost)
SetPostingNewPost sets UserPostingPostOK to PostingNewPost.
func (*UserPostingPostOK) SetPostingNewThread ¶
func (s *UserPostingPostOK) SetPostingNewThread(v PostingNewThread)
SetPostingNewThread sets UserPostingPostOK to PostingNewThread.
func (*UserPostingPostOK) UnmarshalJSON ¶
func (s *UserPostingPostOK) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (UserPostingPostOK) Validate ¶
func (s UserPostingPostOK) Validate() error
type UserPostingPostOKType ¶
type UserPostingPostOKType string
UserPostingPostOKType is oneOf type of UserPostingPostOK.
const ( PostingNewThreadUserPostingPostOK UserPostingPostOKType = "PostingNewThread" PostingNewPostUserPostingPostOK UserPostingPostOKType = "PostingNewPost" )
Possible values for UserPostingPostOKType.
type UserPostingPostReq ¶
type UserPostingPostReq struct { CaptchaType CaptchaType `json:"captcha_type"` Board string `json:"board"` // Если не указано, будет создан тред. Thread OptInt `json:"thread"` // Если не включено в настройках доски - поле будет // проигнорировано. Name OptString `json:"name"` // Если не включено в настройках доски - поле будет // проигнорировано. Email OptString `json:"email"` // Если не включено в настройках доски - поле будет // проигнорировано. Tags OptString `json:"tags"` // Если не включено в настройках доски - поле будет // проигнорировано. Subject OptString `json:"subject"` Comment OptString `json:"comment"` Icon OptInt `json:"icon"` // Если не включено в настройках доски - поле будет // проигнорировано. OpMark OptInt `json:"op_mark"` File []ht.MultipartFile `json:"file[]"` }
func (*UserPostingPostReq) GetBoard ¶
func (s *UserPostingPostReq) GetBoard() string
GetBoard returns the value of Board.
func (*UserPostingPostReq) GetCaptchaType ¶
func (s *UserPostingPostReq) GetCaptchaType() CaptchaType
GetCaptchaType returns the value of CaptchaType.
func (*UserPostingPostReq) GetComment ¶
func (s *UserPostingPostReq) GetComment() OptString
GetComment returns the value of Comment.
func (*UserPostingPostReq) GetEmail ¶
func (s *UserPostingPostReq) GetEmail() OptString
GetEmail returns the value of Email.
func (*UserPostingPostReq) GetFile ¶
func (s *UserPostingPostReq) GetFile() []ht.MultipartFile
GetFile returns the value of File.
func (*UserPostingPostReq) GetIcon ¶
func (s *UserPostingPostReq) GetIcon() OptInt
GetIcon returns the value of Icon.
func (*UserPostingPostReq) GetName ¶
func (s *UserPostingPostReq) GetName() OptString
GetName returns the value of Name.
func (*UserPostingPostReq) GetOpMark ¶
func (s *UserPostingPostReq) GetOpMark() OptInt
GetOpMark returns the value of OpMark.
func (*UserPostingPostReq) GetSubject ¶
func (s *UserPostingPostReq) GetSubject() OptString
GetSubject returns the value of Subject.
func (*UserPostingPostReq) GetTags ¶
func (s *UserPostingPostReq) GetTags() OptString
GetTags returns the value of Tags.
func (*UserPostingPostReq) GetThread ¶
func (s *UserPostingPostReq) GetThread() OptInt
GetThread returns the value of Thread.
func (*UserPostingPostReq) SetBoard ¶
func (s *UserPostingPostReq) SetBoard(val string)
SetBoard sets the value of Board.
func (*UserPostingPostReq) SetCaptchaType ¶
func (s *UserPostingPostReq) SetCaptchaType(val CaptchaType)
SetCaptchaType sets the value of CaptchaType.
func (*UserPostingPostReq) SetComment ¶
func (s *UserPostingPostReq) SetComment(val OptString)
SetComment sets the value of Comment.
func (*UserPostingPostReq) SetEmail ¶
func (s *UserPostingPostReq) SetEmail(val OptString)
SetEmail sets the value of Email.
func (*UserPostingPostReq) SetFile ¶
func (s *UserPostingPostReq) SetFile(val []ht.MultipartFile)
SetFile sets the value of File.
func (*UserPostingPostReq) SetIcon ¶
func (s *UserPostingPostReq) SetIcon(val OptInt)
SetIcon sets the value of Icon.
func (*UserPostingPostReq) SetName ¶
func (s *UserPostingPostReq) SetName(val OptString)
SetName sets the value of Name.
func (*UserPostingPostReq) SetOpMark ¶
func (s *UserPostingPostReq) SetOpMark(val OptInt)
SetOpMark sets the value of OpMark.
func (*UserPostingPostReq) SetSubject ¶
func (s *UserPostingPostReq) SetSubject(val OptString)
SetSubject sets the value of Subject.
func (*UserPostingPostReq) SetTags ¶
func (s *UserPostingPostReq) SetTags(val OptString)
SetTags sets the value of Tags.
func (*UserPostingPostReq) SetThread ¶
func (s *UserPostingPostReq) SetThread(val OptInt)
SetThread sets the value of Thread.
func (*UserPostingPostReq) Validate ¶
func (s *UserPostingPostReq) Validate() error
type UserReportPostReq ¶
type UserReportPostReq struct { Board string `json:"board"` Thread int `json:"thread"` Post []int `json:"post"` Comment string `json:"comment"` }
func (*UserReportPostReq) GetBoard ¶
func (s *UserReportPostReq) GetBoard() string
GetBoard returns the value of Board.
func (*UserReportPostReq) GetComment ¶
func (s *UserReportPostReq) GetComment() string
GetComment returns the value of Comment.
func (*UserReportPostReq) GetPost ¶
func (s *UserReportPostReq) GetPost() []int
GetPost returns the value of Post.
func (*UserReportPostReq) GetThread ¶
func (s *UserReportPostReq) GetThread() int
GetThread returns the value of Thread.
func (*UserReportPostReq) SetBoard ¶
func (s *UserReportPostReq) SetBoard(val string)
SetBoard sets the value of Board.
func (*UserReportPostReq) SetComment ¶
func (s *UserReportPostReq) SetComment(val string)
SetComment sets the value of Comment.
func (*UserReportPostReq) SetPost ¶
func (s *UserReportPostReq) SetPost(val []int)
SetPost sets the value of Post.
func (*UserReportPostReq) SetThread ¶
func (s *UserReportPostReq) SetThread(val int)
SetThread sets the value of Thread.
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_labeler_gen.go
- oas_middleware_gen.go
- oas_operations_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