Documentation ¶
Overview ¶
Code generated by ogen, DO NOT EDIT.
Index ¶
- func WithServerURL(ctx context.Context, u *url.URL) context.Context
- type AnswerAuthorRead
- func (s *AnswerAuthorRead) Decode(d *jx.Decoder) error
- func (u *AnswerAuthorRead) Elem() AnswerAuthorRead
- func (s *AnswerAuthorRead) Encode(e *jx.Encoder)
- func (s *AnswerAuthorRead) GetCreatedAt() time.Time
- func (s *AnswerAuthorRead) GetEmail() string
- func (s *AnswerAuthorRead) GetID() int
- func (s *AnswerAuthorRead) GetLastLogin() time.Time
- func (s *AnswerAuthorRead) GetUsername() string
- func (s *AnswerAuthorRead) MarshalJSON() ([]byte, error)
- func (s *AnswerAuthorRead) SetCreatedAt(val time.Time)
- func (s *AnswerAuthorRead) SetEmail(val string)
- func (s *AnswerAuthorRead) SetID(val int)
- func (s *AnswerAuthorRead) SetLastLogin(val time.Time)
- func (s *AnswerAuthorRead) SetUsername(val string)
- func (s *AnswerAuthorRead) UnmarshalJSON(data []byte) error
- type AnswerCreate
- func (s *AnswerCreate) Decode(d *jx.Decoder) error
- func (a *AnswerCreate) Elem() AnswerCreate
- func (s *AnswerCreate) Encode(e *jx.Encoder)
- func (s *AnswerCreate) GetContent() string
- func (s *AnswerCreate) GetCreatedAt() time.Time
- func (s *AnswerCreate) GetID() int
- func (s *AnswerCreate) GetIsAcceptedAnswer() bool
- func (s *AnswerCreate) GetLikes() int
- func (s *AnswerCreate) GetUpdatedAt() time.Time
- func (s *AnswerCreate) MarshalJSON() ([]byte, error)
- func (s *AnswerCreate) SetContent(val string)
- func (s *AnswerCreate) SetCreatedAt(val time.Time)
- func (s *AnswerCreate) SetID(val int)
- func (s *AnswerCreate) SetIsAcceptedAnswer(val bool)
- func (s *AnswerCreate) SetLikes(val int)
- func (s *AnswerCreate) SetUpdatedAt(val time.Time)
- func (s *AnswerCreate) UnmarshalJSON(data []byte) error
- type AnswerList
- func (s *AnswerList) Decode(d *jx.Decoder) error
- func (a *AnswerList) Elem() AnswerList
- func (s *AnswerList) Encode(e *jx.Encoder)
- func (s *AnswerList) GetContent() string
- func (s *AnswerList) GetCreatedAt() time.Time
- func (s *AnswerList) GetID() int
- func (s *AnswerList) GetIsAcceptedAnswer() bool
- func (s *AnswerList) GetLikes() int
- func (s *AnswerList) GetUpdatedAt() time.Time
- func (s *AnswerList) MarshalJSON() ([]byte, error)
- func (s *AnswerList) SetContent(val string)
- func (s *AnswerList) SetCreatedAt(val time.Time)
- func (s *AnswerList) SetID(val int)
- func (s *AnswerList) SetIsAcceptedAnswer(val bool)
- func (s *AnswerList) SetLikes(val int)
- func (s *AnswerList) SetUpdatedAt(val time.Time)
- func (s *AnswerList) UnmarshalJSON(data []byte) error
- type AnswerQuestionRead
- func (s *AnswerQuestionRead) Decode(d *jx.Decoder) error
- func (q *AnswerQuestionRead) Elem() AnswerQuestionRead
- func (s *AnswerQuestionRead) Encode(e *jx.Encoder)
- func (s *AnswerQuestionRead) GetContent() string
- func (s *AnswerQuestionRead) GetCreatedAt() time.Time
- func (s *AnswerQuestionRead) GetID() int
- func (s *AnswerQuestionRead) GetLikes() int
- func (s *AnswerQuestionRead) GetSlug() string
- func (s *AnswerQuestionRead) GetTitle() string
- func (s *AnswerQuestionRead) GetUpdatedAt() time.Time
- func (s *AnswerQuestionRead) GetViews() int
- func (s *AnswerQuestionRead) MarshalJSON() ([]byte, error)
- func (s *AnswerQuestionRead) SetContent(val string)
- func (s *AnswerQuestionRead) SetCreatedAt(val time.Time)
- func (s *AnswerQuestionRead) SetID(val int)
- func (s *AnswerQuestionRead) SetLikes(val int)
- func (s *AnswerQuestionRead) SetSlug(val string)
- func (s *AnswerQuestionRead) SetTitle(val string)
- func (s *AnswerQuestionRead) SetUpdatedAt(val time.Time)
- func (s *AnswerQuestionRead) SetViews(val int)
- func (s *AnswerQuestionRead) UnmarshalJSON(data []byte) error
- type AnswerRead
- func (s *AnswerRead) Decode(d *jx.Decoder) error
- func (a *AnswerRead) Elem() AnswerRead
- func (s *AnswerRead) Encode(e *jx.Encoder)
- func (s *AnswerRead) GetContent() string
- func (s *AnswerRead) GetCreatedAt() time.Time
- func (s *AnswerRead) GetID() int
- func (s *AnswerRead) GetIsAcceptedAnswer() bool
- func (s *AnswerRead) GetLikes() int
- func (s *AnswerRead) GetUpdatedAt() time.Time
- func (s *AnswerRead) MarshalJSON() ([]byte, error)
- func (s *AnswerRead) SetContent(val string)
- func (s *AnswerRead) SetCreatedAt(val time.Time)
- func (s *AnswerRead) SetID(val int)
- func (s *AnswerRead) SetIsAcceptedAnswer(val bool)
- func (s *AnswerRead) SetLikes(val int)
- func (s *AnswerRead) SetUpdatedAt(val time.Time)
- func (s *AnswerRead) UnmarshalJSON(data []byte) error
- type AnswerUpdate
- func (s *AnswerUpdate) Decode(d *jx.Decoder) error
- func (a *AnswerUpdate) Elem() AnswerUpdate
- func (s *AnswerUpdate) Encode(e *jx.Encoder)
- func (s *AnswerUpdate) GetContent() string
- func (s *AnswerUpdate) GetCreatedAt() time.Time
- func (s *AnswerUpdate) GetID() int
- func (s *AnswerUpdate) GetIsAcceptedAnswer() bool
- func (s *AnswerUpdate) GetLikes() int
- func (s *AnswerUpdate) GetUpdatedAt() time.Time
- func (s *AnswerUpdate) MarshalJSON() ([]byte, error)
- func (s *AnswerUpdate) SetContent(val string)
- func (s *AnswerUpdate) SetCreatedAt(val time.Time)
- func (s *AnswerUpdate) SetID(val int)
- func (s *AnswerUpdate) SetIsAcceptedAnswer(val bool)
- func (s *AnswerUpdate) SetLikes(val int)
- func (s *AnswerUpdate) SetUpdatedAt(val time.Time)
- func (s *AnswerUpdate) UnmarshalJSON(data []byte) error
- type Client
- func (c *Client) CreateAnswer(ctx context.Context, request *CreateAnswerReq) (CreateAnswerRes, error)
- func (c *Client) CreateQuestion(ctx context.Context, request *CreateQuestionReq) (CreateQuestionRes, error)
- func (c *Client) CreateTag(ctx context.Context, request *CreateTagReq) (CreateTagRes, error)
- func (c *Client) CreateUser(ctx context.Context, request *CreateUserReq) (CreateUserRes, error)
- func (c *Client) DeleteAnswer(ctx context.Context, params DeleteAnswerParams) (DeleteAnswerRes, error)
- func (c *Client) DeleteQuestion(ctx context.Context, params DeleteQuestionParams) (DeleteQuestionRes, error)
- func (c *Client) DeleteTag(ctx context.Context, params DeleteTagParams) (DeleteTagRes, error)
- func (c *Client) DeleteUser(ctx context.Context, params DeleteUserParams) (DeleteUserRes, error)
- func (c *Client) ListAnswer(ctx context.Context, params ListAnswerParams) (ListAnswerRes, error)
- func (c *Client) ListQuestion(ctx context.Context, params ListQuestionParams) (ListQuestionRes, error)
- func (c *Client) ListQuestionAnswers(ctx context.Context, params ListQuestionAnswersParams) (ListQuestionAnswersRes, error)
- func (c *Client) ListQuestionTags(ctx context.Context, params ListQuestionTagsParams) (ListQuestionTagsRes, error)
- func (c *Client) ListTag(ctx context.Context, params ListTagParams) (ListTagRes, error)
- func (c *Client) ListTagQuestions(ctx context.Context, params ListTagQuestionsParams) (ListTagQuestionsRes, error)
- func (c *Client) ListUser(ctx context.Context, params ListUserParams) (ListUserRes, error)
- func (c *Client) ListUserAnswers(ctx context.Context, params ListUserAnswersParams) (ListUserAnswersRes, error)
- func (c *Client) ListUserQuestions(ctx context.Context, params ListUserQuestionsParams) (ListUserQuestionsRes, error)
- func (c *Client) ListUserTags(ctx context.Context, params ListUserTagsParams) (ListUserTagsRes, error)
- func (c *Client) ReadAnswer(ctx context.Context, params ReadAnswerParams) (ReadAnswerRes, error)
- func (c *Client) ReadAnswerAuthor(ctx context.Context, params ReadAnswerAuthorParams) (ReadAnswerAuthorRes, error)
- func (c *Client) ReadAnswerQuestion(ctx context.Context, params ReadAnswerQuestionParams) (ReadAnswerQuestionRes, error)
- func (c *Client) ReadQuestion(ctx context.Context, params ReadQuestionParams) (ReadQuestionRes, error)
- func (c *Client) ReadQuestionAuthor(ctx context.Context, params ReadQuestionAuthorParams) (ReadQuestionAuthorRes, error)
- func (c *Client) ReadTag(ctx context.Context, params ReadTagParams) (ReadTagRes, error)
- func (c *Client) ReadUser(ctx context.Context, params ReadUserParams) (ReadUserRes, error)
- func (c *Client) UpdateAnswer(ctx context.Context, request *UpdateAnswerReq, params UpdateAnswerParams) (UpdateAnswerRes, error)
- func (c *Client) UpdateQuestion(ctx context.Context, request *UpdateQuestionReq, params UpdateQuestionParams) (UpdateQuestionRes, error)
- func (c *Client) UpdateTag(ctx context.Context, request *UpdateTagReq, params UpdateTagParams) (UpdateTagRes, error)
- func (c *Client) UpdateUser(ctx context.Context, request *UpdateUserReq, params UpdateUserParams) (UpdateUserRes, error)
- type ClientOption
- type CreateAnswerReq
- func (s *CreateAnswerReq) Decode(d *jx.Decoder) error
- func (s *CreateAnswerReq) Encode(e *jx.Encoder)
- func (s *CreateAnswerReq) GetAuthor() OptInt
- func (s *CreateAnswerReq) GetContent() string
- func (s *CreateAnswerReq) GetCreatedAt() time.Time
- func (s *CreateAnswerReq) GetIsAcceptedAnswer() bool
- func (s *CreateAnswerReq) GetLikes() int
- func (s *CreateAnswerReq) GetQuestion() OptInt
- func (s *CreateAnswerReq) GetUpdatedAt() time.Time
- func (s *CreateAnswerReq) MarshalJSON() ([]byte, error)
- func (s *CreateAnswerReq) SetAuthor(val OptInt)
- func (s *CreateAnswerReq) SetContent(val string)
- func (s *CreateAnswerReq) SetCreatedAt(val time.Time)
- func (s *CreateAnswerReq) SetIsAcceptedAnswer(val bool)
- func (s *CreateAnswerReq) SetLikes(val int)
- func (s *CreateAnswerReq) SetQuestion(val OptInt)
- func (s *CreateAnswerReq) SetUpdatedAt(val time.Time)
- func (s *CreateAnswerReq) UnmarshalJSON(data []byte) error
- type CreateAnswerRes
- type CreateQuestionReq
- func (s *CreateQuestionReq) Decode(d *jx.Decoder) error
- func (s *CreateQuestionReq) Encode(e *jx.Encoder)
- func (s *CreateQuestionReq) GetAnswers() []int
- func (s *CreateQuestionReq) GetAuthor() OptInt
- func (s *CreateQuestionReq) GetContent() string
- func (s *CreateQuestionReq) GetCreatedAt() time.Time
- func (s *CreateQuestionReq) GetLikes() int
- func (s *CreateQuestionReq) GetSlug() string
- func (s *CreateQuestionReq) GetTags() []int
- func (s *CreateQuestionReq) GetTitle() string
- func (s *CreateQuestionReq) GetUpdatedAt() time.Time
- func (s *CreateQuestionReq) GetViews() int
- func (s *CreateQuestionReq) MarshalJSON() ([]byte, error)
- func (s *CreateQuestionReq) SetAnswers(val []int)
- func (s *CreateQuestionReq) SetAuthor(val OptInt)
- func (s *CreateQuestionReq) SetContent(val string)
- func (s *CreateQuestionReq) SetCreatedAt(val time.Time)
- func (s *CreateQuestionReq) SetLikes(val int)
- func (s *CreateQuestionReq) SetSlug(val string)
- func (s *CreateQuestionReq) SetTags(val []int)
- func (s *CreateQuestionReq) SetTitle(val string)
- func (s *CreateQuestionReq) SetUpdatedAt(val time.Time)
- func (s *CreateQuestionReq) SetViews(val int)
- func (s *CreateQuestionReq) UnmarshalJSON(data []byte) error
- type CreateQuestionRes
- type CreateTagReq
- func (s *CreateTagReq) Decode(d *jx.Decoder) error
- func (s *CreateTagReq) Encode(e *jx.Encoder)
- func (s *CreateTagReq) GetName() string
- func (s *CreateTagReq) GetQuestions() []int
- func (s *CreateTagReq) MarshalJSON() ([]byte, error)
- func (s *CreateTagReq) SetName(val string)
- func (s *CreateTagReq) SetQuestions(val []int)
- func (s *CreateTagReq) UnmarshalJSON(data []byte) error
- type CreateTagRes
- type CreateUserReq
- func (s *CreateUserReq) Decode(d *jx.Decoder) error
- func (s *CreateUserReq) Encode(e *jx.Encoder)
- func (s *CreateUserReq) GetAnswers() []int
- func (s *CreateUserReq) GetCreatedAt() time.Time
- func (s *CreateUserReq) GetEmail() string
- func (s *CreateUserReq) GetLastLogin() time.Time
- func (s *CreateUserReq) GetPassword() string
- func (s *CreateUserReq) GetQuestions() []int
- func (s *CreateUserReq) GetTags() []int
- func (s *CreateUserReq) GetUsername() string
- func (s *CreateUserReq) MarshalJSON() ([]byte, error)
- func (s *CreateUserReq) SetAnswers(val []int)
- func (s *CreateUserReq) SetCreatedAt(val time.Time)
- func (s *CreateUserReq) SetEmail(val string)
- func (s *CreateUserReq) SetLastLogin(val time.Time)
- func (s *CreateUserReq) SetPassword(val string)
- func (s *CreateUserReq) SetQuestions(val []int)
- func (s *CreateUserReq) SetTags(val []int)
- func (s *CreateUserReq) SetUsername(val string)
- func (s *CreateUserReq) UnmarshalJSON(data []byte) error
- type CreateUserRes
- type DeleteAnswerNoContent
- type DeleteAnswerParams
- type DeleteAnswerRes
- type DeleteQuestionNoContent
- type DeleteQuestionParams
- type DeleteQuestionRes
- type DeleteTagNoContent
- type DeleteTagParams
- type DeleteTagRes
- type DeleteUserNoContent
- type DeleteUserParams
- type DeleteUserRes
- type ErrorHandler
- type Handler
- type Invoker
- type ListAnswerOKApplicationJSON
- func (s *ListAnswerOKApplicationJSON) Decode(d *jx.Decoder) error
- func (s ListAnswerOKApplicationJSON) Encode(e *jx.Encoder)
- func (s ListAnswerOKApplicationJSON) MarshalJSON() ([]byte, error)
- func (s *ListAnswerOKApplicationJSON) UnmarshalJSON(data []byte) error
- func (s ListAnswerOKApplicationJSON) Validate() error
- type ListAnswerParams
- type ListAnswerRes
- type ListQuestionAnswersOKApplicationJSON
- func (s *ListQuestionAnswersOKApplicationJSON) Decode(d *jx.Decoder) error
- func (s ListQuestionAnswersOKApplicationJSON) Encode(e *jx.Encoder)
- func (s ListQuestionAnswersOKApplicationJSON) MarshalJSON() ([]byte, error)
- func (s *ListQuestionAnswersOKApplicationJSON) UnmarshalJSON(data []byte) error
- func (s ListQuestionAnswersOKApplicationJSON) Validate() error
- type ListQuestionAnswersParams
- type ListQuestionAnswersRes
- type ListQuestionOKApplicationJSON
- func (s *ListQuestionOKApplicationJSON) Decode(d *jx.Decoder) error
- func (s ListQuestionOKApplicationJSON) Encode(e *jx.Encoder)
- func (s ListQuestionOKApplicationJSON) MarshalJSON() ([]byte, error)
- func (s *ListQuestionOKApplicationJSON) UnmarshalJSON(data []byte) error
- func (s ListQuestionOKApplicationJSON) Validate() error
- type ListQuestionParams
- type ListQuestionRes
- type ListQuestionTagsOKApplicationJSON
- func (s *ListQuestionTagsOKApplicationJSON) Decode(d *jx.Decoder) error
- func (s ListQuestionTagsOKApplicationJSON) Encode(e *jx.Encoder)
- func (s ListQuestionTagsOKApplicationJSON) MarshalJSON() ([]byte, error)
- func (s *ListQuestionTagsOKApplicationJSON) UnmarshalJSON(data []byte) error
- func (s ListQuestionTagsOKApplicationJSON) Validate() error
- type ListQuestionTagsParams
- type ListQuestionTagsRes
- type ListTagOKApplicationJSON
- func (s *ListTagOKApplicationJSON) Decode(d *jx.Decoder) error
- func (s ListTagOKApplicationJSON) Encode(e *jx.Encoder)
- func (s ListTagOKApplicationJSON) MarshalJSON() ([]byte, error)
- func (s *ListTagOKApplicationJSON) UnmarshalJSON(data []byte) error
- func (s ListTagOKApplicationJSON) Validate() error
- type ListTagParams
- type ListTagQuestionsOKApplicationJSON
- func (s *ListTagQuestionsOKApplicationJSON) Decode(d *jx.Decoder) error
- func (s ListTagQuestionsOKApplicationJSON) Encode(e *jx.Encoder)
- func (s ListTagQuestionsOKApplicationJSON) MarshalJSON() ([]byte, error)
- func (s *ListTagQuestionsOKApplicationJSON) UnmarshalJSON(data []byte) error
- func (s ListTagQuestionsOKApplicationJSON) Validate() error
- type ListTagQuestionsParams
- type ListTagQuestionsRes
- type ListTagRes
- type ListUserAnswersOKApplicationJSON
- func (s *ListUserAnswersOKApplicationJSON) Decode(d *jx.Decoder) error
- func (s ListUserAnswersOKApplicationJSON) Encode(e *jx.Encoder)
- func (s ListUserAnswersOKApplicationJSON) MarshalJSON() ([]byte, error)
- func (s *ListUserAnswersOKApplicationJSON) UnmarshalJSON(data []byte) error
- func (s ListUserAnswersOKApplicationJSON) Validate() error
- type ListUserAnswersParams
- type ListUserAnswersRes
- type ListUserOKApplicationJSON
- func (s *ListUserOKApplicationJSON) Decode(d *jx.Decoder) error
- func (s ListUserOKApplicationJSON) Encode(e *jx.Encoder)
- func (s ListUserOKApplicationJSON) MarshalJSON() ([]byte, error)
- func (s *ListUserOKApplicationJSON) UnmarshalJSON(data []byte) error
- func (s ListUserOKApplicationJSON) Validate() error
- type ListUserParams
- type ListUserQuestionsOKApplicationJSON
- func (s *ListUserQuestionsOKApplicationJSON) Decode(d *jx.Decoder) error
- func (s ListUserQuestionsOKApplicationJSON) Encode(e *jx.Encoder)
- func (s ListUserQuestionsOKApplicationJSON) MarshalJSON() ([]byte, error)
- func (s *ListUserQuestionsOKApplicationJSON) UnmarshalJSON(data []byte) error
- func (s ListUserQuestionsOKApplicationJSON) Validate() error
- type ListUserQuestionsParams
- type ListUserQuestionsRes
- type ListUserRes
- type ListUserTagsOKApplicationJSON
- func (s *ListUserTagsOKApplicationJSON) Decode(d *jx.Decoder) error
- func (s ListUserTagsOKApplicationJSON) Encode(e *jx.Encoder)
- func (s ListUserTagsOKApplicationJSON) MarshalJSON() ([]byte, error)
- func (s *ListUserTagsOKApplicationJSON) UnmarshalJSON(data []byte) error
- func (s ListUserTagsOKApplicationJSON) Validate() error
- type ListUserTagsParams
- type ListUserTagsRes
- type Middleware
- type OgentHandler
- func (h *OgentHandler) CreateAnswer(ctx context.Context, req *CreateAnswerReq) (CreateAnswerRes, error)
- func (h *OgentHandler) CreateQuestion(ctx context.Context, req *CreateQuestionReq) (CreateQuestionRes, error)
- func (h *OgentHandler) CreateTag(ctx context.Context, req *CreateTagReq) (CreateTagRes, error)
- func (h *OgentHandler) CreateUser(ctx context.Context, req *CreateUserReq) (CreateUserRes, error)
- func (h *OgentHandler) DeleteAnswer(ctx context.Context, params DeleteAnswerParams) (DeleteAnswerRes, error)
- func (h *OgentHandler) DeleteQuestion(ctx context.Context, params DeleteQuestionParams) (DeleteQuestionRes, error)
- func (h *OgentHandler) DeleteTag(ctx context.Context, params DeleteTagParams) (DeleteTagRes, error)
- func (h *OgentHandler) DeleteUser(ctx context.Context, params DeleteUserParams) (DeleteUserRes, error)
- func (h *OgentHandler) ListAnswer(ctx context.Context, params ListAnswerParams) (ListAnswerRes, error)
- func (h *OgentHandler) ListQuestion(ctx context.Context, params ListQuestionParams) (ListQuestionRes, error)
- func (h *OgentHandler) ListQuestionAnswers(ctx context.Context, params ListQuestionAnswersParams) (ListQuestionAnswersRes, error)
- func (h *OgentHandler) ListQuestionTags(ctx context.Context, params ListQuestionTagsParams) (ListQuestionTagsRes, error)
- func (h *OgentHandler) ListTag(ctx context.Context, params ListTagParams) (ListTagRes, error)
- func (h *OgentHandler) ListTagQuestions(ctx context.Context, params ListTagQuestionsParams) (ListTagQuestionsRes, error)
- func (h *OgentHandler) ListUser(ctx context.Context, params ListUserParams) (ListUserRes, error)
- func (h *OgentHandler) ListUserAnswers(ctx context.Context, params ListUserAnswersParams) (ListUserAnswersRes, error)
- func (h *OgentHandler) ListUserQuestions(ctx context.Context, params ListUserQuestionsParams) (ListUserQuestionsRes, error)
- func (h *OgentHandler) ListUserTags(ctx context.Context, params ListUserTagsParams) (ListUserTagsRes, error)
- func (h *OgentHandler) ReadAnswer(ctx context.Context, params ReadAnswerParams) (ReadAnswerRes, error)
- func (h *OgentHandler) ReadAnswerAuthor(ctx context.Context, params ReadAnswerAuthorParams) (ReadAnswerAuthorRes, error)
- func (h *OgentHandler) ReadAnswerQuestion(ctx context.Context, params ReadAnswerQuestionParams) (ReadAnswerQuestionRes, error)
- func (h *OgentHandler) ReadQuestion(ctx context.Context, params ReadQuestionParams) (ReadQuestionRes, error)
- func (h *OgentHandler) ReadQuestionAuthor(ctx context.Context, params ReadQuestionAuthorParams) (ReadQuestionAuthorRes, error)
- func (h *OgentHandler) ReadTag(ctx context.Context, params ReadTagParams) (ReadTagRes, error)
- func (h *OgentHandler) ReadUser(ctx context.Context, params ReadUserParams) (ReadUserRes, error)
- func (h *OgentHandler) UpdateAnswer(ctx context.Context, req *UpdateAnswerReq, params UpdateAnswerParams) (UpdateAnswerRes, error)
- func (h *OgentHandler) UpdateQuestion(ctx context.Context, req *UpdateQuestionReq, params UpdateQuestionParams) (UpdateQuestionRes, error)
- func (h *OgentHandler) UpdateTag(ctx context.Context, req *UpdateTagReq, params UpdateTagParams) (UpdateTagRes, error)
- func (h *OgentHandler) UpdateUser(ctx context.Context, req *UpdateUserReq, params UpdateUserParams) (UpdateUserRes, error)
- type OptBool
- func (o *OptBool) Decode(d *jx.Decoder) error
- func (o OptBool) Encode(e *jx.Encoder)
- func (o OptBool) Get() (v bool, ok bool)
- func (o OptBool) IsSet() bool
- func (s OptBool) MarshalJSON() ([]byte, error)
- func (o OptBool) Or(d bool) bool
- func (o *OptBool) Reset()
- func (o *OptBool) SetTo(v bool)
- func (s *OptBool) UnmarshalJSON(data []byte) error
- type OptDateTime
- func (o *OptDateTime) Decode(d *jx.Decoder, format func(*jx.Decoder) (time.Time, error)) error
- func (o OptDateTime) Encode(e *jx.Encoder, format func(*jx.Encoder, time.Time))
- func (o OptDateTime) Get() (v time.Time, ok bool)
- func (o OptDateTime) IsSet() bool
- func (s OptDateTime) MarshalJSON() ([]byte, error)
- func (o OptDateTime) Or(d time.Time) time.Time
- func (o *OptDateTime) Reset()
- func (o *OptDateTime) SetTo(v time.Time)
- func (s *OptDateTime) 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 (o *OptInt) SetTo(v int)
- func (s *OptInt) UnmarshalJSON(data []byte) error
- type OptString
- func (o *OptString) Decode(d *jx.Decoder) error
- func (o OptString) Encode(e *jx.Encoder)
- func (o OptString) Get() (v string, ok bool)
- func (o OptString) IsSet() bool
- func (s OptString) MarshalJSON() ([]byte, error)
- func (o OptString) Or(d string) string
- func (o *OptString) Reset()
- func (o *OptString) SetTo(v string)
- func (s *OptString) UnmarshalJSON(data []byte) error
- type Option
- type QuestionAnswersList
- func (s *QuestionAnswersList) Decode(d *jx.Decoder) error
- func (a *QuestionAnswersList) Elem() QuestionAnswersList
- func (s *QuestionAnswersList) Encode(e *jx.Encoder)
- func (s *QuestionAnswersList) GetContent() string
- func (s *QuestionAnswersList) GetCreatedAt() time.Time
- func (s *QuestionAnswersList) GetID() int
- func (s *QuestionAnswersList) GetIsAcceptedAnswer() bool
- func (s *QuestionAnswersList) GetLikes() int
- func (s *QuestionAnswersList) GetUpdatedAt() time.Time
- func (s *QuestionAnswersList) MarshalJSON() ([]byte, error)
- func (s *QuestionAnswersList) SetContent(val string)
- func (s *QuestionAnswersList) SetCreatedAt(val time.Time)
- func (s *QuestionAnswersList) SetID(val int)
- func (s *QuestionAnswersList) SetIsAcceptedAnswer(val bool)
- func (s *QuestionAnswersList) SetLikes(val int)
- func (s *QuestionAnswersList) SetUpdatedAt(val time.Time)
- func (s *QuestionAnswersList) UnmarshalJSON(data []byte) error
- type QuestionAuthorRead
- func (s *QuestionAuthorRead) Decode(d *jx.Decoder) error
- func (u *QuestionAuthorRead) Elem() QuestionAuthorRead
- func (s *QuestionAuthorRead) Encode(e *jx.Encoder)
- func (s *QuestionAuthorRead) GetCreatedAt() time.Time
- func (s *QuestionAuthorRead) GetEmail() string
- func (s *QuestionAuthorRead) GetID() int
- func (s *QuestionAuthorRead) GetLastLogin() time.Time
- func (s *QuestionAuthorRead) GetUsername() string
- func (s *QuestionAuthorRead) MarshalJSON() ([]byte, error)
- func (s *QuestionAuthorRead) SetCreatedAt(val time.Time)
- func (s *QuestionAuthorRead) SetEmail(val string)
- func (s *QuestionAuthorRead) SetID(val int)
- func (s *QuestionAuthorRead) SetLastLogin(val time.Time)
- func (s *QuestionAuthorRead) SetUsername(val string)
- func (s *QuestionAuthorRead) UnmarshalJSON(data []byte) error
- type QuestionCreate
- func (s *QuestionCreate) Decode(d *jx.Decoder) error
- func (q *QuestionCreate) Elem() QuestionCreate
- func (s *QuestionCreate) Encode(e *jx.Encoder)
- func (s *QuestionCreate) GetContent() string
- func (s *QuestionCreate) GetCreatedAt() time.Time
- func (s *QuestionCreate) GetID() int
- func (s *QuestionCreate) GetLikes() int
- func (s *QuestionCreate) GetSlug() string
- func (s *QuestionCreate) GetTitle() string
- func (s *QuestionCreate) GetUpdatedAt() time.Time
- func (s *QuestionCreate) GetViews() int
- func (s *QuestionCreate) MarshalJSON() ([]byte, error)
- func (s *QuestionCreate) SetContent(val string)
- func (s *QuestionCreate) SetCreatedAt(val time.Time)
- func (s *QuestionCreate) SetID(val int)
- func (s *QuestionCreate) SetLikes(val int)
- func (s *QuestionCreate) SetSlug(val string)
- func (s *QuestionCreate) SetTitle(val string)
- func (s *QuestionCreate) SetUpdatedAt(val time.Time)
- func (s *QuestionCreate) SetViews(val int)
- func (s *QuestionCreate) UnmarshalJSON(data []byte) error
- type QuestionList
- func (s *QuestionList) Decode(d *jx.Decoder) error
- func (q *QuestionList) Elem() QuestionList
- func (s *QuestionList) Encode(e *jx.Encoder)
- func (s *QuestionList) GetContent() string
- func (s *QuestionList) GetCreatedAt() time.Time
- func (s *QuestionList) GetID() int
- func (s *QuestionList) GetLikes() int
- func (s *QuestionList) GetSlug() string
- func (s *QuestionList) GetTitle() string
- func (s *QuestionList) GetUpdatedAt() time.Time
- func (s *QuestionList) GetViews() int
- func (s *QuestionList) MarshalJSON() ([]byte, error)
- func (s *QuestionList) SetContent(val string)
- func (s *QuestionList) SetCreatedAt(val time.Time)
- func (s *QuestionList) SetID(val int)
- func (s *QuestionList) SetLikes(val int)
- func (s *QuestionList) SetSlug(val string)
- func (s *QuestionList) SetTitle(val string)
- func (s *QuestionList) SetUpdatedAt(val time.Time)
- func (s *QuestionList) SetViews(val int)
- func (s *QuestionList) UnmarshalJSON(data []byte) error
- type QuestionRead
- func (s *QuestionRead) Decode(d *jx.Decoder) error
- func (q *QuestionRead) Elem() QuestionRead
- func (s *QuestionRead) Encode(e *jx.Encoder)
- func (s *QuestionRead) GetContent() string
- func (s *QuestionRead) GetCreatedAt() time.Time
- func (s *QuestionRead) GetID() int
- func (s *QuestionRead) GetLikes() int
- func (s *QuestionRead) GetSlug() string
- func (s *QuestionRead) GetTitle() string
- func (s *QuestionRead) GetUpdatedAt() time.Time
- func (s *QuestionRead) GetViews() int
- func (s *QuestionRead) MarshalJSON() ([]byte, error)
- func (s *QuestionRead) SetContent(val string)
- func (s *QuestionRead) SetCreatedAt(val time.Time)
- func (s *QuestionRead) SetID(val int)
- func (s *QuestionRead) SetLikes(val int)
- func (s *QuestionRead) SetSlug(val string)
- func (s *QuestionRead) SetTitle(val string)
- func (s *QuestionRead) SetUpdatedAt(val time.Time)
- func (s *QuestionRead) SetViews(val int)
- func (s *QuestionRead) UnmarshalJSON(data []byte) error
- type QuestionTagsList
- func (s *QuestionTagsList) Decode(d *jx.Decoder) error
- func (t *QuestionTagsList) Elem() QuestionTagsList
- func (s *QuestionTagsList) Encode(e *jx.Encoder)
- func (s *QuestionTagsList) GetID() int
- func (s *QuestionTagsList) GetName() string
- func (s *QuestionTagsList) MarshalJSON() ([]byte, error)
- func (s *QuestionTagsList) SetID(val int)
- func (s *QuestionTagsList) SetName(val string)
- func (s *QuestionTagsList) UnmarshalJSON(data []byte) error
- type QuestionUpdate
- func (s *QuestionUpdate) Decode(d *jx.Decoder) error
- func (q *QuestionUpdate) Elem() QuestionUpdate
- func (s *QuestionUpdate) Encode(e *jx.Encoder)
- func (s *QuestionUpdate) GetContent() string
- func (s *QuestionUpdate) GetCreatedAt() time.Time
- func (s *QuestionUpdate) GetID() int
- func (s *QuestionUpdate) GetLikes() int
- func (s *QuestionUpdate) GetSlug() string
- func (s *QuestionUpdate) GetTitle() string
- func (s *QuestionUpdate) GetUpdatedAt() time.Time
- func (s *QuestionUpdate) GetViews() int
- func (s *QuestionUpdate) MarshalJSON() ([]byte, error)
- func (s *QuestionUpdate) SetContent(val string)
- func (s *QuestionUpdate) SetCreatedAt(val time.Time)
- func (s *QuestionUpdate) SetID(val int)
- func (s *QuestionUpdate) SetLikes(val int)
- func (s *QuestionUpdate) SetSlug(val string)
- func (s *QuestionUpdate) SetTitle(val string)
- func (s *QuestionUpdate) SetUpdatedAt(val time.Time)
- func (s *QuestionUpdate) SetViews(val int)
- func (s *QuestionUpdate) UnmarshalJSON(data []byte) error
- type R400
- func (s *R400) Decode(d *jx.Decoder) error
- func (s *R400) Encode(e *jx.Encoder)
- func (s *R400) GetCode() int
- func (s *R400) GetErrors() jx.Raw
- func (s *R400) GetStatus() string
- func (s *R400) MarshalJSON() ([]byte, error)
- func (s *R400) SetCode(val int)
- func (s *R400) SetErrors(val jx.Raw)
- func (s *R400) SetStatus(val string)
- func (s *R400) UnmarshalJSON(data []byte) error
- type R404
- func (s *R404) Decode(d *jx.Decoder) error
- func (s *R404) Encode(e *jx.Encoder)
- func (s *R404) GetCode() int
- func (s *R404) GetErrors() jx.Raw
- func (s *R404) GetStatus() string
- func (s *R404) MarshalJSON() ([]byte, error)
- func (s *R404) SetCode(val int)
- func (s *R404) SetErrors(val jx.Raw)
- func (s *R404) SetStatus(val string)
- func (s *R404) UnmarshalJSON(data []byte) error
- type R409
- func (s *R409) Decode(d *jx.Decoder) error
- func (s *R409) Encode(e *jx.Encoder)
- func (s *R409) GetCode() int
- func (s *R409) GetErrors() jx.Raw
- func (s *R409) GetStatus() string
- func (s *R409) MarshalJSON() ([]byte, error)
- func (s *R409) SetCode(val int)
- func (s *R409) SetErrors(val jx.Raw)
- func (s *R409) SetStatus(val string)
- func (s *R409) UnmarshalJSON(data []byte) error
- type R500
- func (s *R500) Decode(d *jx.Decoder) error
- func (s *R500) Encode(e *jx.Encoder)
- func (s *R500) GetCode() int
- func (s *R500) GetErrors() jx.Raw
- func (s *R500) GetStatus() string
- func (s *R500) MarshalJSON() ([]byte, error)
- func (s *R500) SetCode(val int)
- func (s *R500) SetErrors(val jx.Raw)
- func (s *R500) SetStatus(val string)
- func (s *R500) UnmarshalJSON(data []byte) error
- type ReadAnswerAuthorParams
- type ReadAnswerAuthorRes
- type ReadAnswerParams
- type ReadAnswerQuestionParams
- type ReadAnswerQuestionRes
- type ReadAnswerRes
- type ReadQuestionAuthorParams
- type ReadQuestionAuthorRes
- type ReadQuestionParams
- type ReadQuestionRes
- type ReadTagParams
- type ReadTagRes
- type ReadUserParams
- type ReadUserRes
- 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 TagCreate
- func (s *TagCreate) Decode(d *jx.Decoder) error
- func (t *TagCreate) Elem() TagCreate
- func (s *TagCreate) Encode(e *jx.Encoder)
- func (s *TagCreate) GetID() int
- func (s *TagCreate) GetName() string
- func (s *TagCreate) MarshalJSON() ([]byte, error)
- func (s *TagCreate) SetID(val int)
- func (s *TagCreate) SetName(val string)
- func (s *TagCreate) UnmarshalJSON(data []byte) error
- type TagList
- func (s *TagList) Decode(d *jx.Decoder) error
- func (t *TagList) Elem() TagList
- func (s *TagList) Encode(e *jx.Encoder)
- func (s *TagList) GetID() int
- func (s *TagList) GetName() string
- func (s *TagList) MarshalJSON() ([]byte, error)
- func (s *TagList) SetID(val int)
- func (s *TagList) SetName(val string)
- func (s *TagList) UnmarshalJSON(data []byte) error
- type TagQuestionsList
- func (s *TagQuestionsList) Decode(d *jx.Decoder) error
- func (q *TagQuestionsList) Elem() TagQuestionsList
- func (s *TagQuestionsList) Encode(e *jx.Encoder)
- func (s *TagQuestionsList) GetContent() string
- func (s *TagQuestionsList) GetCreatedAt() time.Time
- func (s *TagQuestionsList) GetID() int
- func (s *TagQuestionsList) GetLikes() int
- func (s *TagQuestionsList) GetSlug() string
- func (s *TagQuestionsList) GetTitle() string
- func (s *TagQuestionsList) GetUpdatedAt() time.Time
- func (s *TagQuestionsList) GetViews() int
- func (s *TagQuestionsList) MarshalJSON() ([]byte, error)
- func (s *TagQuestionsList) SetContent(val string)
- func (s *TagQuestionsList) SetCreatedAt(val time.Time)
- func (s *TagQuestionsList) SetID(val int)
- func (s *TagQuestionsList) SetLikes(val int)
- func (s *TagQuestionsList) SetSlug(val string)
- func (s *TagQuestionsList) SetTitle(val string)
- func (s *TagQuestionsList) SetUpdatedAt(val time.Time)
- func (s *TagQuestionsList) SetViews(val int)
- func (s *TagQuestionsList) UnmarshalJSON(data []byte) error
- type TagRead
- func (s *TagRead) Decode(d *jx.Decoder) error
- func (t *TagRead) Elem() TagRead
- func (s *TagRead) Encode(e *jx.Encoder)
- func (s *TagRead) GetID() int
- func (s *TagRead) GetName() string
- func (s *TagRead) MarshalJSON() ([]byte, error)
- func (s *TagRead) SetID(val int)
- func (s *TagRead) SetName(val string)
- func (s *TagRead) UnmarshalJSON(data []byte) error
- type TagUpdate
- func (s *TagUpdate) Decode(d *jx.Decoder) error
- func (t *TagUpdate) Elem() TagUpdate
- func (s *TagUpdate) Encode(e *jx.Encoder)
- func (s *TagUpdate) GetID() int
- func (s *TagUpdate) GetName() string
- func (s *TagUpdate) MarshalJSON() ([]byte, error)
- func (s *TagUpdate) SetID(val int)
- func (s *TagUpdate) SetName(val string)
- func (s *TagUpdate) UnmarshalJSON(data []byte) error
- type UnimplementedHandler
- func (UnimplementedHandler) CreateAnswer(ctx context.Context, req *CreateAnswerReq) (r CreateAnswerRes, _ error)
- func (UnimplementedHandler) CreateQuestion(ctx context.Context, req *CreateQuestionReq) (r CreateQuestionRes, _ error)
- func (UnimplementedHandler) CreateTag(ctx context.Context, req *CreateTagReq) (r CreateTagRes, _ error)
- func (UnimplementedHandler) CreateUser(ctx context.Context, req *CreateUserReq) (r CreateUserRes, _ error)
- func (UnimplementedHandler) DeleteAnswer(ctx context.Context, params DeleteAnswerParams) (r DeleteAnswerRes, _ error)
- func (UnimplementedHandler) DeleteQuestion(ctx context.Context, params DeleteQuestionParams) (r DeleteQuestionRes, _ error)
- func (UnimplementedHandler) DeleteTag(ctx context.Context, params DeleteTagParams) (r DeleteTagRes, _ error)
- func (UnimplementedHandler) DeleteUser(ctx context.Context, params DeleteUserParams) (r DeleteUserRes, _ error)
- func (UnimplementedHandler) ListAnswer(ctx context.Context, params ListAnswerParams) (r ListAnswerRes, _ error)
- func (UnimplementedHandler) ListQuestion(ctx context.Context, params ListQuestionParams) (r ListQuestionRes, _ error)
- func (UnimplementedHandler) ListQuestionAnswers(ctx context.Context, params ListQuestionAnswersParams) (r ListQuestionAnswersRes, _ error)
- func (UnimplementedHandler) ListQuestionTags(ctx context.Context, params ListQuestionTagsParams) (r ListQuestionTagsRes, _ error)
- func (UnimplementedHandler) ListTag(ctx context.Context, params ListTagParams) (r ListTagRes, _ error)
- func (UnimplementedHandler) ListTagQuestions(ctx context.Context, params ListTagQuestionsParams) (r ListTagQuestionsRes, _ error)
- func (UnimplementedHandler) ListUser(ctx context.Context, params ListUserParams) (r ListUserRes, _ error)
- func (UnimplementedHandler) ListUserAnswers(ctx context.Context, params ListUserAnswersParams) (r ListUserAnswersRes, _ error)
- func (UnimplementedHandler) ListUserQuestions(ctx context.Context, params ListUserQuestionsParams) (r ListUserQuestionsRes, _ error)
- func (UnimplementedHandler) ListUserTags(ctx context.Context, params ListUserTagsParams) (r ListUserTagsRes, _ error)
- func (UnimplementedHandler) ReadAnswer(ctx context.Context, params ReadAnswerParams) (r ReadAnswerRes, _ error)
- func (UnimplementedHandler) ReadAnswerAuthor(ctx context.Context, params ReadAnswerAuthorParams) (r ReadAnswerAuthorRes, _ error)
- func (UnimplementedHandler) ReadAnswerQuestion(ctx context.Context, params ReadAnswerQuestionParams) (r ReadAnswerQuestionRes, _ error)
- func (UnimplementedHandler) ReadQuestion(ctx context.Context, params ReadQuestionParams) (r ReadQuestionRes, _ error)
- func (UnimplementedHandler) ReadQuestionAuthor(ctx context.Context, params ReadQuestionAuthorParams) (r ReadQuestionAuthorRes, _ error)
- func (UnimplementedHandler) ReadTag(ctx context.Context, params ReadTagParams) (r ReadTagRes, _ error)
- func (UnimplementedHandler) ReadUser(ctx context.Context, params ReadUserParams) (r ReadUserRes, _ error)
- func (UnimplementedHandler) UpdateAnswer(ctx context.Context, req *UpdateAnswerReq, params UpdateAnswerParams) (r UpdateAnswerRes, _ error)
- func (UnimplementedHandler) UpdateQuestion(ctx context.Context, req *UpdateQuestionReq, params UpdateQuestionParams) (r UpdateQuestionRes, _ error)
- func (UnimplementedHandler) UpdateTag(ctx context.Context, req *UpdateTagReq, params UpdateTagParams) (r UpdateTagRes, _ error)
- func (UnimplementedHandler) UpdateUser(ctx context.Context, req *UpdateUserReq, params UpdateUserParams) (r UpdateUserRes, _ error)
- type UpdateAnswerParams
- type UpdateAnswerReq
- func (s *UpdateAnswerReq) Decode(d *jx.Decoder) error
- func (s *UpdateAnswerReq) Encode(e *jx.Encoder)
- func (s *UpdateAnswerReq) GetAuthor() OptInt
- func (s *UpdateAnswerReq) GetContent() OptString
- func (s *UpdateAnswerReq) GetIsAcceptedAnswer() OptBool
- func (s *UpdateAnswerReq) GetLikes() OptInt
- func (s *UpdateAnswerReq) GetQuestion() OptInt
- func (s *UpdateAnswerReq) GetUpdatedAt() OptDateTime
- func (s *UpdateAnswerReq) MarshalJSON() ([]byte, error)
- func (s *UpdateAnswerReq) SetAuthor(val OptInt)
- func (s *UpdateAnswerReq) SetContent(val OptString)
- func (s *UpdateAnswerReq) SetIsAcceptedAnswer(val OptBool)
- func (s *UpdateAnswerReq) SetLikes(val OptInt)
- func (s *UpdateAnswerReq) SetQuestion(val OptInt)
- func (s *UpdateAnswerReq) SetUpdatedAt(val OptDateTime)
- func (s *UpdateAnswerReq) UnmarshalJSON(data []byte) error
- type UpdateAnswerRes
- type UpdateQuestionParams
- type UpdateQuestionReq
- func (s *UpdateQuestionReq) Decode(d *jx.Decoder) error
- func (s *UpdateQuestionReq) Encode(e *jx.Encoder)
- func (s *UpdateQuestionReq) GetAnswers() []int
- func (s *UpdateQuestionReq) GetAuthor() OptInt
- func (s *UpdateQuestionReq) GetContent() OptString
- func (s *UpdateQuestionReq) GetLikes() OptInt
- func (s *UpdateQuestionReq) GetSlug() OptString
- func (s *UpdateQuestionReq) GetTags() []int
- func (s *UpdateQuestionReq) GetTitle() OptString
- func (s *UpdateQuestionReq) GetUpdatedAt() OptDateTime
- func (s *UpdateQuestionReq) GetViews() OptInt
- func (s *UpdateQuestionReq) MarshalJSON() ([]byte, error)
- func (s *UpdateQuestionReq) SetAnswers(val []int)
- func (s *UpdateQuestionReq) SetAuthor(val OptInt)
- func (s *UpdateQuestionReq) SetContent(val OptString)
- func (s *UpdateQuestionReq) SetLikes(val OptInt)
- func (s *UpdateQuestionReq) SetSlug(val OptString)
- func (s *UpdateQuestionReq) SetTags(val []int)
- func (s *UpdateQuestionReq) SetTitle(val OptString)
- func (s *UpdateQuestionReq) SetUpdatedAt(val OptDateTime)
- func (s *UpdateQuestionReq) SetViews(val OptInt)
- func (s *UpdateQuestionReq) UnmarshalJSON(data []byte) error
- type UpdateQuestionRes
- type UpdateTagParams
- type UpdateTagReq
- func (s *UpdateTagReq) Decode(d *jx.Decoder) error
- func (s *UpdateTagReq) Encode(e *jx.Encoder)
- func (s *UpdateTagReq) GetName() OptString
- func (s *UpdateTagReq) GetQuestions() []int
- func (s *UpdateTagReq) MarshalJSON() ([]byte, error)
- func (s *UpdateTagReq) SetName(val OptString)
- func (s *UpdateTagReq) SetQuestions(val []int)
- func (s *UpdateTagReq) UnmarshalJSON(data []byte) error
- type UpdateTagRes
- type UpdateUserParams
- type UpdateUserReq
- func (s *UpdateUserReq) Decode(d *jx.Decoder) error
- func (s *UpdateUserReq) Encode(e *jx.Encoder)
- func (s *UpdateUserReq) GetAnswers() []int
- func (s *UpdateUserReq) GetEmail() OptString
- func (s *UpdateUserReq) GetLastLogin() OptDateTime
- func (s *UpdateUserReq) GetPassword() OptString
- func (s *UpdateUserReq) GetQuestions() []int
- func (s *UpdateUserReq) GetTags() []int
- func (s *UpdateUserReq) GetUsername() OptString
- func (s *UpdateUserReq) MarshalJSON() ([]byte, error)
- func (s *UpdateUserReq) SetAnswers(val []int)
- func (s *UpdateUserReq) SetEmail(val OptString)
- func (s *UpdateUserReq) SetLastLogin(val OptDateTime)
- func (s *UpdateUserReq) SetPassword(val OptString)
- func (s *UpdateUserReq) SetQuestions(val []int)
- func (s *UpdateUserReq) SetTags(val []int)
- func (s *UpdateUserReq) SetUsername(val OptString)
- func (s *UpdateUserReq) UnmarshalJSON(data []byte) error
- type UpdateUserRes
- type UserAnswersList
- func (s *UserAnswersList) Decode(d *jx.Decoder) error
- func (a *UserAnswersList) Elem() UserAnswersList
- func (s *UserAnswersList) Encode(e *jx.Encoder)
- func (s *UserAnswersList) GetContent() string
- func (s *UserAnswersList) GetCreatedAt() time.Time
- func (s *UserAnswersList) GetID() int
- func (s *UserAnswersList) GetIsAcceptedAnswer() bool
- func (s *UserAnswersList) GetLikes() int
- func (s *UserAnswersList) GetUpdatedAt() time.Time
- func (s *UserAnswersList) MarshalJSON() ([]byte, error)
- func (s *UserAnswersList) SetContent(val string)
- func (s *UserAnswersList) SetCreatedAt(val time.Time)
- func (s *UserAnswersList) SetID(val int)
- func (s *UserAnswersList) SetIsAcceptedAnswer(val bool)
- func (s *UserAnswersList) SetLikes(val int)
- func (s *UserAnswersList) SetUpdatedAt(val time.Time)
- func (s *UserAnswersList) UnmarshalJSON(data []byte) error
- type UserCreate
- func (s *UserCreate) Decode(d *jx.Decoder) error
- func (u *UserCreate) Elem() UserCreate
- func (s *UserCreate) Encode(e *jx.Encoder)
- func (s *UserCreate) GetCreatedAt() time.Time
- func (s *UserCreate) GetEmail() string
- func (s *UserCreate) GetID() int
- func (s *UserCreate) GetLastLogin() time.Time
- func (s *UserCreate) GetUsername() string
- func (s *UserCreate) MarshalJSON() ([]byte, error)
- func (s *UserCreate) SetCreatedAt(val time.Time)
- func (s *UserCreate) SetEmail(val string)
- func (s *UserCreate) SetID(val int)
- func (s *UserCreate) SetLastLogin(val time.Time)
- func (s *UserCreate) SetUsername(val string)
- func (s *UserCreate) UnmarshalJSON(data []byte) error
- type UserList
- func (s *UserList) Decode(d *jx.Decoder) error
- func (u *UserList) Elem() UserList
- func (s *UserList) Encode(e *jx.Encoder)
- func (s *UserList) GetCreatedAt() time.Time
- func (s *UserList) GetEmail() string
- func (s *UserList) GetID() int
- func (s *UserList) GetLastLogin() time.Time
- func (s *UserList) GetUsername() string
- func (s *UserList) MarshalJSON() ([]byte, error)
- func (s *UserList) SetCreatedAt(val time.Time)
- func (s *UserList) SetEmail(val string)
- func (s *UserList) SetID(val int)
- func (s *UserList) SetLastLogin(val time.Time)
- func (s *UserList) SetUsername(val string)
- func (s *UserList) UnmarshalJSON(data []byte) error
- type UserQuestionsList
- func (s *UserQuestionsList) Decode(d *jx.Decoder) error
- func (q *UserQuestionsList) Elem() UserQuestionsList
- func (s *UserQuestionsList) Encode(e *jx.Encoder)
- func (s *UserQuestionsList) GetContent() string
- func (s *UserQuestionsList) GetCreatedAt() time.Time
- func (s *UserQuestionsList) GetID() int
- func (s *UserQuestionsList) GetLikes() int
- func (s *UserQuestionsList) GetSlug() string
- func (s *UserQuestionsList) GetTitle() string
- func (s *UserQuestionsList) GetUpdatedAt() time.Time
- func (s *UserQuestionsList) GetViews() int
- func (s *UserQuestionsList) MarshalJSON() ([]byte, error)
- func (s *UserQuestionsList) SetContent(val string)
- func (s *UserQuestionsList) SetCreatedAt(val time.Time)
- func (s *UserQuestionsList) SetID(val int)
- func (s *UserQuestionsList) SetLikes(val int)
- func (s *UserQuestionsList) SetSlug(val string)
- func (s *UserQuestionsList) SetTitle(val string)
- func (s *UserQuestionsList) SetUpdatedAt(val time.Time)
- func (s *UserQuestionsList) SetViews(val int)
- func (s *UserQuestionsList) UnmarshalJSON(data []byte) error
- type UserRead
- func (s *UserRead) Decode(d *jx.Decoder) error
- func (u *UserRead) Elem() UserRead
- func (s *UserRead) Encode(e *jx.Encoder)
- func (s *UserRead) GetCreatedAt() time.Time
- func (s *UserRead) GetEmail() string
- func (s *UserRead) GetID() int
- func (s *UserRead) GetLastLogin() time.Time
- func (s *UserRead) GetUsername() string
- func (s *UserRead) MarshalJSON() ([]byte, error)
- func (s *UserRead) SetCreatedAt(val time.Time)
- func (s *UserRead) SetEmail(val string)
- func (s *UserRead) SetID(val int)
- func (s *UserRead) SetLastLogin(val time.Time)
- func (s *UserRead) SetUsername(val string)
- func (s *UserRead) UnmarshalJSON(data []byte) error
- type UserTagsList
- func (s *UserTagsList) Decode(d *jx.Decoder) error
- func (t *UserTagsList) Elem() UserTagsList
- func (s *UserTagsList) Encode(e *jx.Encoder)
- func (s *UserTagsList) GetID() int
- func (s *UserTagsList) GetName() string
- func (s *UserTagsList) MarshalJSON() ([]byte, error)
- func (s *UserTagsList) SetID(val int)
- func (s *UserTagsList) SetName(val string)
- func (s *UserTagsList) UnmarshalJSON(data []byte) error
- type UserUpdate
- func (s *UserUpdate) Decode(d *jx.Decoder) error
- func (u *UserUpdate) Elem() UserUpdate
- func (s *UserUpdate) Encode(e *jx.Encoder)
- func (s *UserUpdate) GetCreatedAt() time.Time
- func (s *UserUpdate) GetEmail() string
- func (s *UserUpdate) GetID() int
- func (s *UserUpdate) GetLastLogin() time.Time
- func (s *UserUpdate) GetUsername() string
- func (s *UserUpdate) MarshalJSON() ([]byte, error)
- func (s *UserUpdate) SetCreatedAt(val time.Time)
- func (s *UserUpdate) SetEmail(val string)
- func (s *UserUpdate) SetID(val int)
- func (s *UserUpdate) SetLastLogin(val time.Time)
- func (s *UserUpdate) SetUsername(val string)
- func (s *UserUpdate) UnmarshalJSON(data []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AnswerAuthorRead ¶
type AnswerAuthorRead struct { ID int `json:"id"` Username string `json:"username"` Email string `json:"email"` CreatedAt time.Time `json:"created_at"` LastLogin time.Time `json:"last_login"` }
Ref: #/components/schemas/Answer_AuthorRead
func NewAnswerAuthorRead ¶
func NewAnswerAuthorRead(e *ent.User) *AnswerAuthorRead
func NewAnswerAuthorReads ¶
func NewAnswerAuthorReads(es []*ent.User) []AnswerAuthorRead
func (*AnswerAuthorRead) Decode ¶
func (s *AnswerAuthorRead) Decode(d *jx.Decoder) error
Decode decodes AnswerAuthorRead from json.
func (*AnswerAuthorRead) Elem ¶
func (u *AnswerAuthorRead) Elem() AnswerAuthorRead
func (*AnswerAuthorRead) Encode ¶
func (s *AnswerAuthorRead) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*AnswerAuthorRead) GetCreatedAt ¶
func (s *AnswerAuthorRead) GetCreatedAt() time.Time
GetCreatedAt returns the value of CreatedAt.
func (*AnswerAuthorRead) GetEmail ¶
func (s *AnswerAuthorRead) GetEmail() string
GetEmail returns the value of Email.
func (*AnswerAuthorRead) GetID ¶
func (s *AnswerAuthorRead) GetID() int
GetID returns the value of ID.
func (*AnswerAuthorRead) GetLastLogin ¶
func (s *AnswerAuthorRead) GetLastLogin() time.Time
GetLastLogin returns the value of LastLogin.
func (*AnswerAuthorRead) GetUsername ¶
func (s *AnswerAuthorRead) GetUsername() string
GetUsername returns the value of Username.
func (*AnswerAuthorRead) MarshalJSON ¶
func (s *AnswerAuthorRead) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*AnswerAuthorRead) SetCreatedAt ¶
func (s *AnswerAuthorRead) SetCreatedAt(val time.Time)
SetCreatedAt sets the value of CreatedAt.
func (*AnswerAuthorRead) SetEmail ¶
func (s *AnswerAuthorRead) SetEmail(val string)
SetEmail sets the value of Email.
func (*AnswerAuthorRead) SetID ¶
func (s *AnswerAuthorRead) SetID(val int)
SetID sets the value of ID.
func (*AnswerAuthorRead) SetLastLogin ¶
func (s *AnswerAuthorRead) SetLastLogin(val time.Time)
SetLastLogin sets the value of LastLogin.
func (*AnswerAuthorRead) SetUsername ¶
func (s *AnswerAuthorRead) SetUsername(val string)
SetUsername sets the value of Username.
func (*AnswerAuthorRead) UnmarshalJSON ¶
func (s *AnswerAuthorRead) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type AnswerCreate ¶
type AnswerCreate struct { ID int `json:"id"` Content string `json:"content"` Likes int `json:"likes"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` IsAcceptedAnswer bool `json:"is_accepted_answer"` }
Ref: #/components/schemas/AnswerCreate
func NewAnswerCreate ¶
func NewAnswerCreate(e *ent.Answer) *AnswerCreate
func NewAnswerCreates ¶
func NewAnswerCreates(es []*ent.Answer) []AnswerCreate
func (*AnswerCreate) Decode ¶
func (s *AnswerCreate) Decode(d *jx.Decoder) error
Decode decodes AnswerCreate from json.
func (*AnswerCreate) Elem ¶
func (a *AnswerCreate) Elem() AnswerCreate
func (*AnswerCreate) Encode ¶
func (s *AnswerCreate) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*AnswerCreate) GetContent ¶
func (s *AnswerCreate) GetContent() string
GetContent returns the value of Content.
func (*AnswerCreate) GetCreatedAt ¶
func (s *AnswerCreate) GetCreatedAt() time.Time
GetCreatedAt returns the value of CreatedAt.
func (*AnswerCreate) GetIsAcceptedAnswer ¶
func (s *AnswerCreate) GetIsAcceptedAnswer() bool
GetIsAcceptedAnswer returns the value of IsAcceptedAnswer.
func (*AnswerCreate) GetLikes ¶
func (s *AnswerCreate) GetLikes() int
GetLikes returns the value of Likes.
func (*AnswerCreate) GetUpdatedAt ¶
func (s *AnswerCreate) GetUpdatedAt() time.Time
GetUpdatedAt returns the value of UpdatedAt.
func (*AnswerCreate) MarshalJSON ¶
func (s *AnswerCreate) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*AnswerCreate) SetContent ¶
func (s *AnswerCreate) SetContent(val string)
SetContent sets the value of Content.
func (*AnswerCreate) SetCreatedAt ¶
func (s *AnswerCreate) SetCreatedAt(val time.Time)
SetCreatedAt sets the value of CreatedAt.
func (*AnswerCreate) SetIsAcceptedAnswer ¶
func (s *AnswerCreate) SetIsAcceptedAnswer(val bool)
SetIsAcceptedAnswer sets the value of IsAcceptedAnswer.
func (*AnswerCreate) SetLikes ¶
func (s *AnswerCreate) SetLikes(val int)
SetLikes sets the value of Likes.
func (*AnswerCreate) SetUpdatedAt ¶
func (s *AnswerCreate) SetUpdatedAt(val time.Time)
SetUpdatedAt sets the value of UpdatedAt.
func (*AnswerCreate) UnmarshalJSON ¶
func (s *AnswerCreate) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type AnswerList ¶
type AnswerList struct { ID int `json:"id"` Content string `json:"content"` Likes int `json:"likes"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` IsAcceptedAnswer bool `json:"is_accepted_answer"` }
Ref: #/components/schemas/AnswerList
func NewAnswerList ¶
func NewAnswerList(e *ent.Answer) *AnswerList
func NewAnswerLists ¶
func NewAnswerLists(es []*ent.Answer) []AnswerList
func (*AnswerList) Decode ¶
func (s *AnswerList) Decode(d *jx.Decoder) error
Decode decodes AnswerList from json.
func (*AnswerList) Elem ¶
func (a *AnswerList) Elem() AnswerList
func (*AnswerList) Encode ¶
func (s *AnswerList) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*AnswerList) GetContent ¶
func (s *AnswerList) GetContent() string
GetContent returns the value of Content.
func (*AnswerList) GetCreatedAt ¶
func (s *AnswerList) GetCreatedAt() time.Time
GetCreatedAt returns the value of CreatedAt.
func (*AnswerList) GetIsAcceptedAnswer ¶
func (s *AnswerList) GetIsAcceptedAnswer() bool
GetIsAcceptedAnswer returns the value of IsAcceptedAnswer.
func (*AnswerList) GetLikes ¶
func (s *AnswerList) GetLikes() int
GetLikes returns the value of Likes.
func (*AnswerList) GetUpdatedAt ¶
func (s *AnswerList) GetUpdatedAt() time.Time
GetUpdatedAt returns the value of UpdatedAt.
func (*AnswerList) MarshalJSON ¶
func (s *AnswerList) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*AnswerList) SetContent ¶
func (s *AnswerList) SetContent(val string)
SetContent sets the value of Content.
func (*AnswerList) SetCreatedAt ¶
func (s *AnswerList) SetCreatedAt(val time.Time)
SetCreatedAt sets the value of CreatedAt.
func (*AnswerList) SetIsAcceptedAnswer ¶
func (s *AnswerList) SetIsAcceptedAnswer(val bool)
SetIsAcceptedAnswer sets the value of IsAcceptedAnswer.
func (*AnswerList) SetLikes ¶
func (s *AnswerList) SetLikes(val int)
SetLikes sets the value of Likes.
func (*AnswerList) SetUpdatedAt ¶
func (s *AnswerList) SetUpdatedAt(val time.Time)
SetUpdatedAt sets the value of UpdatedAt.
func (*AnswerList) UnmarshalJSON ¶
func (s *AnswerList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type AnswerQuestionRead ¶
type AnswerQuestionRead struct { ID int `json:"id"` Title string `json:"title"` Slug string `json:"slug"` Content string `json:"content"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` Views int `json:"views"` Likes int `json:"likes"` }
Ref: #/components/schemas/Answer_QuestionRead
func NewAnswerQuestionRead ¶
func NewAnswerQuestionRead(e *ent.Question) *AnswerQuestionRead
func NewAnswerQuestionReads ¶
func NewAnswerQuestionReads(es []*ent.Question) []AnswerQuestionRead
func (*AnswerQuestionRead) Decode ¶
func (s *AnswerQuestionRead) Decode(d *jx.Decoder) error
Decode decodes AnswerQuestionRead from json.
func (*AnswerQuestionRead) Elem ¶
func (q *AnswerQuestionRead) Elem() AnswerQuestionRead
func (*AnswerQuestionRead) Encode ¶
func (s *AnswerQuestionRead) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*AnswerQuestionRead) GetContent ¶
func (s *AnswerQuestionRead) GetContent() string
GetContent returns the value of Content.
func (*AnswerQuestionRead) GetCreatedAt ¶
func (s *AnswerQuestionRead) GetCreatedAt() time.Time
GetCreatedAt returns the value of CreatedAt.
func (*AnswerQuestionRead) GetID ¶
func (s *AnswerQuestionRead) GetID() int
GetID returns the value of ID.
func (*AnswerQuestionRead) GetLikes ¶
func (s *AnswerQuestionRead) GetLikes() int
GetLikes returns the value of Likes.
func (*AnswerQuestionRead) GetSlug ¶
func (s *AnswerQuestionRead) GetSlug() string
GetSlug returns the value of Slug.
func (*AnswerQuestionRead) GetTitle ¶
func (s *AnswerQuestionRead) GetTitle() string
GetTitle returns the value of Title.
func (*AnswerQuestionRead) GetUpdatedAt ¶
func (s *AnswerQuestionRead) GetUpdatedAt() time.Time
GetUpdatedAt returns the value of UpdatedAt.
func (*AnswerQuestionRead) GetViews ¶
func (s *AnswerQuestionRead) GetViews() int
GetViews returns the value of Views.
func (*AnswerQuestionRead) MarshalJSON ¶
func (s *AnswerQuestionRead) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*AnswerQuestionRead) SetContent ¶
func (s *AnswerQuestionRead) SetContent(val string)
SetContent sets the value of Content.
func (*AnswerQuestionRead) SetCreatedAt ¶
func (s *AnswerQuestionRead) SetCreatedAt(val time.Time)
SetCreatedAt sets the value of CreatedAt.
func (*AnswerQuestionRead) SetID ¶
func (s *AnswerQuestionRead) SetID(val int)
SetID sets the value of ID.
func (*AnswerQuestionRead) SetLikes ¶
func (s *AnswerQuestionRead) SetLikes(val int)
SetLikes sets the value of Likes.
func (*AnswerQuestionRead) SetSlug ¶
func (s *AnswerQuestionRead) SetSlug(val string)
SetSlug sets the value of Slug.
func (*AnswerQuestionRead) SetTitle ¶
func (s *AnswerQuestionRead) SetTitle(val string)
SetTitle sets the value of Title.
func (*AnswerQuestionRead) SetUpdatedAt ¶
func (s *AnswerQuestionRead) SetUpdatedAt(val time.Time)
SetUpdatedAt sets the value of UpdatedAt.
func (*AnswerQuestionRead) SetViews ¶
func (s *AnswerQuestionRead) SetViews(val int)
SetViews sets the value of Views.
func (*AnswerQuestionRead) UnmarshalJSON ¶
func (s *AnswerQuestionRead) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type AnswerRead ¶
type AnswerRead struct { ID int `json:"id"` Content string `json:"content"` Likes int `json:"likes"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` IsAcceptedAnswer bool `json:"is_accepted_answer"` }
Ref: #/components/schemas/AnswerRead
func NewAnswerRead ¶
func NewAnswerRead(e *ent.Answer) *AnswerRead
func NewAnswerReads ¶
func NewAnswerReads(es []*ent.Answer) []AnswerRead
func (*AnswerRead) Decode ¶
func (s *AnswerRead) Decode(d *jx.Decoder) error
Decode decodes AnswerRead from json.
func (*AnswerRead) Elem ¶
func (a *AnswerRead) Elem() AnswerRead
func (*AnswerRead) Encode ¶
func (s *AnswerRead) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*AnswerRead) GetContent ¶
func (s *AnswerRead) GetContent() string
GetContent returns the value of Content.
func (*AnswerRead) GetCreatedAt ¶
func (s *AnswerRead) GetCreatedAt() time.Time
GetCreatedAt returns the value of CreatedAt.
func (*AnswerRead) GetIsAcceptedAnswer ¶
func (s *AnswerRead) GetIsAcceptedAnswer() bool
GetIsAcceptedAnswer returns the value of IsAcceptedAnswer.
func (*AnswerRead) GetLikes ¶
func (s *AnswerRead) GetLikes() int
GetLikes returns the value of Likes.
func (*AnswerRead) GetUpdatedAt ¶
func (s *AnswerRead) GetUpdatedAt() time.Time
GetUpdatedAt returns the value of UpdatedAt.
func (*AnswerRead) MarshalJSON ¶
func (s *AnswerRead) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*AnswerRead) SetContent ¶
func (s *AnswerRead) SetContent(val string)
SetContent sets the value of Content.
func (*AnswerRead) SetCreatedAt ¶
func (s *AnswerRead) SetCreatedAt(val time.Time)
SetCreatedAt sets the value of CreatedAt.
func (*AnswerRead) SetIsAcceptedAnswer ¶
func (s *AnswerRead) SetIsAcceptedAnswer(val bool)
SetIsAcceptedAnswer sets the value of IsAcceptedAnswer.
func (*AnswerRead) SetLikes ¶
func (s *AnswerRead) SetLikes(val int)
SetLikes sets the value of Likes.
func (*AnswerRead) SetUpdatedAt ¶
func (s *AnswerRead) SetUpdatedAt(val time.Time)
SetUpdatedAt sets the value of UpdatedAt.
func (*AnswerRead) UnmarshalJSON ¶
func (s *AnswerRead) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type AnswerUpdate ¶
type AnswerUpdate struct { ID int `json:"id"` Content string `json:"content"` Likes int `json:"likes"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` IsAcceptedAnswer bool `json:"is_accepted_answer"` }
Ref: #/components/schemas/AnswerUpdate
func NewAnswerUpdate ¶
func NewAnswerUpdate(e *ent.Answer) *AnswerUpdate
func NewAnswerUpdates ¶
func NewAnswerUpdates(es []*ent.Answer) []AnswerUpdate
func (*AnswerUpdate) Decode ¶
func (s *AnswerUpdate) Decode(d *jx.Decoder) error
Decode decodes AnswerUpdate from json.
func (*AnswerUpdate) Elem ¶
func (a *AnswerUpdate) Elem() AnswerUpdate
func (*AnswerUpdate) Encode ¶
func (s *AnswerUpdate) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*AnswerUpdate) GetContent ¶
func (s *AnswerUpdate) GetContent() string
GetContent returns the value of Content.
func (*AnswerUpdate) GetCreatedAt ¶
func (s *AnswerUpdate) GetCreatedAt() time.Time
GetCreatedAt returns the value of CreatedAt.
func (*AnswerUpdate) GetIsAcceptedAnswer ¶
func (s *AnswerUpdate) GetIsAcceptedAnswer() bool
GetIsAcceptedAnswer returns the value of IsAcceptedAnswer.
func (*AnswerUpdate) GetLikes ¶
func (s *AnswerUpdate) GetLikes() int
GetLikes returns the value of Likes.
func (*AnswerUpdate) GetUpdatedAt ¶
func (s *AnswerUpdate) GetUpdatedAt() time.Time
GetUpdatedAt returns the value of UpdatedAt.
func (*AnswerUpdate) MarshalJSON ¶
func (s *AnswerUpdate) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*AnswerUpdate) SetContent ¶
func (s *AnswerUpdate) SetContent(val string)
SetContent sets the value of Content.
func (*AnswerUpdate) SetCreatedAt ¶
func (s *AnswerUpdate) SetCreatedAt(val time.Time)
SetCreatedAt sets the value of CreatedAt.
func (*AnswerUpdate) SetIsAcceptedAnswer ¶
func (s *AnswerUpdate) SetIsAcceptedAnswer(val bool)
SetIsAcceptedAnswer sets the value of IsAcceptedAnswer.
func (*AnswerUpdate) SetLikes ¶
func (s *AnswerUpdate) SetLikes(val int)
SetLikes sets the value of Likes.
func (*AnswerUpdate) SetUpdatedAt ¶
func (s *AnswerUpdate) SetUpdatedAt(val time.Time)
SetUpdatedAt sets the value of UpdatedAt.
func (*AnswerUpdate) UnmarshalJSON ¶
func (s *AnswerUpdate) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client implements OAS client.
func NewClient ¶
func NewClient(serverURL string, opts ...ClientOption) (*Client, error)
NewClient initializes new Client defined by OAS.
func (*Client) CreateAnswer ¶
func (c *Client) CreateAnswer(ctx context.Context, request *CreateAnswerReq) (CreateAnswerRes, error)
CreateAnswer invokes createAnswer operation.
Creates a new Answer and persists it to storage.
POST /answers
func (*Client) CreateQuestion ¶
func (c *Client) CreateQuestion(ctx context.Context, request *CreateQuestionReq) (CreateQuestionRes, error)
CreateQuestion invokes createQuestion operation.
Creates a new Question and persists it to storage.
POST /questions
func (*Client) CreateTag ¶
func (c *Client) CreateTag(ctx context.Context, request *CreateTagReq) (CreateTagRes, error)
CreateTag invokes createTag operation.
Creates a new Tag and persists it to storage.
POST /tags
func (*Client) CreateUser ¶
func (c *Client) CreateUser(ctx context.Context, request *CreateUserReq) (CreateUserRes, error)
CreateUser invokes createUser operation.
Creates a new User and persists it to storage.
POST /users
func (*Client) DeleteAnswer ¶
func (c *Client) DeleteAnswer(ctx context.Context, params DeleteAnswerParams) (DeleteAnswerRes, error)
DeleteAnswer invokes deleteAnswer operation.
Deletes the Answer with the requested ID.
DELETE /answers/{id}
func (*Client) DeleteQuestion ¶
func (c *Client) DeleteQuestion(ctx context.Context, params DeleteQuestionParams) (DeleteQuestionRes, error)
DeleteQuestion invokes deleteQuestion operation.
Deletes the Question with the requested ID.
DELETE /questions/{id}
func (*Client) DeleteTag ¶
func (c *Client) DeleteTag(ctx context.Context, params DeleteTagParams) (DeleteTagRes, error)
DeleteTag invokes deleteTag operation.
Deletes the Tag with the requested ID.
DELETE /tags/{id}
func (*Client) DeleteUser ¶
func (c *Client) DeleteUser(ctx context.Context, params DeleteUserParams) (DeleteUserRes, error)
DeleteUser invokes deleteUser operation.
Deletes the User with the requested ID.
DELETE /users/{id}
func (*Client) ListAnswer ¶
func (c *Client) ListAnswer(ctx context.Context, params ListAnswerParams) (ListAnswerRes, error)
ListAnswer invokes listAnswer operation.
List Answers.
GET /answers
func (*Client) ListQuestion ¶
func (c *Client) ListQuestion(ctx context.Context, params ListQuestionParams) (ListQuestionRes, error)
ListQuestion invokes listQuestion operation.
List Questions.
GET /questions
func (*Client) ListQuestionAnswers ¶
func (c *Client) ListQuestionAnswers(ctx context.Context, params ListQuestionAnswersParams) (ListQuestionAnswersRes, error)
ListQuestionAnswers invokes listQuestionAnswers operation.
List attached Answers.
GET /questions/{id}/answers
func (*Client) ListQuestionTags ¶
func (c *Client) ListQuestionTags(ctx context.Context, params ListQuestionTagsParams) (ListQuestionTagsRes, error)
ListQuestionTags invokes listQuestionTags operation.
List attached Tags.
GET /questions/{id}/tags
func (*Client) ListTag ¶
func (c *Client) ListTag(ctx context.Context, params ListTagParams) (ListTagRes, error)
ListTag invokes listTag operation.
List Tags.
GET /tags
func (*Client) ListTagQuestions ¶
func (c *Client) ListTagQuestions(ctx context.Context, params ListTagQuestionsParams) (ListTagQuestionsRes, error)
ListTagQuestions invokes listTagQuestions operation.
List attached Questions.
GET /tags/{id}/questions
func (*Client) ListUser ¶
func (c *Client) ListUser(ctx context.Context, params ListUserParams) (ListUserRes, error)
ListUser invokes listUser operation.
List Users.
GET /users
func (*Client) ListUserAnswers ¶
func (c *Client) ListUserAnswers(ctx context.Context, params ListUserAnswersParams) (ListUserAnswersRes, error)
ListUserAnswers invokes listUserAnswers operation.
List attached Answers.
GET /users/{id}/answers
func (*Client) ListUserQuestions ¶
func (c *Client) ListUserQuestions(ctx context.Context, params ListUserQuestionsParams) (ListUserQuestionsRes, error)
ListUserQuestions invokes listUserQuestions operation.
List attached Questions.
GET /users/{id}/questions
func (*Client) ListUserTags ¶
func (c *Client) ListUserTags(ctx context.Context, params ListUserTagsParams) (ListUserTagsRes, error)
ListUserTags invokes listUserTags operation.
List attached Tags.
GET /users/{id}/tags
func (*Client) ReadAnswer ¶
func (c *Client) ReadAnswer(ctx context.Context, params ReadAnswerParams) (ReadAnswerRes, error)
ReadAnswer invokes readAnswer operation.
Finds the Answer with the requested ID and returns it.
GET /answers/{id}
func (*Client) ReadAnswerAuthor ¶
func (c *Client) ReadAnswerAuthor(ctx context.Context, params ReadAnswerAuthorParams) (ReadAnswerAuthorRes, error)
ReadAnswerAuthor invokes readAnswerAuthor operation.
Find the attached User of the Answer with the given ID.
GET /answers/{id}/author
func (*Client) ReadAnswerQuestion ¶
func (c *Client) ReadAnswerQuestion(ctx context.Context, params ReadAnswerQuestionParams) (ReadAnswerQuestionRes, error)
ReadAnswerQuestion invokes readAnswerQuestion operation.
Find the attached Question of the Answer with the given ID.
GET /answers/{id}/question
func (*Client) ReadQuestion ¶
func (c *Client) ReadQuestion(ctx context.Context, params ReadQuestionParams) (ReadQuestionRes, error)
ReadQuestion invokes readQuestion operation.
Finds the Question with the requested ID and returns it.
GET /questions/{id}
func (*Client) ReadQuestionAuthor ¶
func (c *Client) ReadQuestionAuthor(ctx context.Context, params ReadQuestionAuthorParams) (ReadQuestionAuthorRes, error)
ReadQuestionAuthor invokes readQuestionAuthor operation.
Find the attached User of the Question with the given ID.
GET /questions/{id}/author
func (*Client) ReadTag ¶
func (c *Client) ReadTag(ctx context.Context, params ReadTagParams) (ReadTagRes, error)
ReadTag invokes readTag operation.
Finds the Tag with the requested ID and returns it.
GET /tags/{id}
func (*Client) ReadUser ¶
func (c *Client) ReadUser(ctx context.Context, params ReadUserParams) (ReadUserRes, error)
ReadUser invokes readUser operation.
Finds the User with the requested ID and returns it.
GET /users/{id}
func (*Client) UpdateAnswer ¶
func (c *Client) UpdateAnswer(ctx context.Context, request *UpdateAnswerReq, params UpdateAnswerParams) (UpdateAnswerRes, error)
UpdateAnswer invokes updateAnswer operation.
Updates a Answer and persists changes to storage.
PATCH /answers/{id}
func (*Client) UpdateQuestion ¶
func (c *Client) UpdateQuestion(ctx context.Context, request *UpdateQuestionReq, params UpdateQuestionParams) (UpdateQuestionRes, error)
UpdateQuestion invokes updateQuestion operation.
Updates a Question and persists changes to storage.
PATCH /questions/{id}
func (*Client) UpdateTag ¶
func (c *Client) UpdateTag(ctx context.Context, request *UpdateTagReq, params UpdateTagParams) (UpdateTagRes, error)
UpdateTag invokes updateTag operation.
Updates a Tag and persists changes to storage.
PATCH /tags/{id}
func (*Client) UpdateUser ¶
func (c *Client) UpdateUser(ctx context.Context, request *UpdateUserReq, params UpdateUserParams) (UpdateUserRes, error)
UpdateUser invokes updateUser operation.
Updates a User and persists changes to storage.
PATCH /users/{id}
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 CreateAnswerReq ¶
type CreateAnswerReq struct { Content string `json:"content"` Likes int `json:"likes"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` IsAcceptedAnswer bool `json:"is_accepted_answer"` Question OptInt `json:"question"` Author OptInt `json:"author"` }
func (*CreateAnswerReq) Decode ¶
func (s *CreateAnswerReq) Decode(d *jx.Decoder) error
Decode decodes CreateAnswerReq from json.
func (*CreateAnswerReq) Encode ¶
func (s *CreateAnswerReq) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*CreateAnswerReq) GetAuthor ¶
func (s *CreateAnswerReq) GetAuthor() OptInt
GetAuthor returns the value of Author.
func (*CreateAnswerReq) GetContent ¶
func (s *CreateAnswerReq) GetContent() string
GetContent returns the value of Content.
func (*CreateAnswerReq) GetCreatedAt ¶
func (s *CreateAnswerReq) GetCreatedAt() time.Time
GetCreatedAt returns the value of CreatedAt.
func (*CreateAnswerReq) GetIsAcceptedAnswer ¶
func (s *CreateAnswerReq) GetIsAcceptedAnswer() bool
GetIsAcceptedAnswer returns the value of IsAcceptedAnswer.
func (*CreateAnswerReq) GetLikes ¶
func (s *CreateAnswerReq) GetLikes() int
GetLikes returns the value of Likes.
func (*CreateAnswerReq) GetQuestion ¶
func (s *CreateAnswerReq) GetQuestion() OptInt
GetQuestion returns the value of Question.
func (*CreateAnswerReq) GetUpdatedAt ¶
func (s *CreateAnswerReq) GetUpdatedAt() time.Time
GetUpdatedAt returns the value of UpdatedAt.
func (*CreateAnswerReq) MarshalJSON ¶
func (s *CreateAnswerReq) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*CreateAnswerReq) SetAuthor ¶
func (s *CreateAnswerReq) SetAuthor(val OptInt)
SetAuthor sets the value of Author.
func (*CreateAnswerReq) SetContent ¶
func (s *CreateAnswerReq) SetContent(val string)
SetContent sets the value of Content.
func (*CreateAnswerReq) SetCreatedAt ¶
func (s *CreateAnswerReq) SetCreatedAt(val time.Time)
SetCreatedAt sets the value of CreatedAt.
func (*CreateAnswerReq) SetIsAcceptedAnswer ¶
func (s *CreateAnswerReq) SetIsAcceptedAnswer(val bool)
SetIsAcceptedAnswer sets the value of IsAcceptedAnswer.
func (*CreateAnswerReq) SetLikes ¶
func (s *CreateAnswerReq) SetLikes(val int)
SetLikes sets the value of Likes.
func (*CreateAnswerReq) SetQuestion ¶
func (s *CreateAnswerReq) SetQuestion(val OptInt)
SetQuestion sets the value of Question.
func (*CreateAnswerReq) SetUpdatedAt ¶
func (s *CreateAnswerReq) SetUpdatedAt(val time.Time)
SetUpdatedAt sets the value of UpdatedAt.
func (*CreateAnswerReq) UnmarshalJSON ¶
func (s *CreateAnswerReq) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type CreateAnswerRes ¶
type CreateAnswerRes interface {
// contains filtered or unexported methods
}
type CreateQuestionReq ¶
type CreateQuestionReq struct { Title string `json:"title"` Slug string `json:"slug"` Content string `json:"content"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` Views int `json:"views"` Likes int `json:"likes"` Answers []int `json:"answers"` Author OptInt `json:"author"` Tags []int `json:"tags"` }
func (*CreateQuestionReq) Decode ¶
func (s *CreateQuestionReq) Decode(d *jx.Decoder) error
Decode decodes CreateQuestionReq from json.
func (*CreateQuestionReq) Encode ¶
func (s *CreateQuestionReq) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*CreateQuestionReq) GetAnswers ¶
func (s *CreateQuestionReq) GetAnswers() []int
GetAnswers returns the value of Answers.
func (*CreateQuestionReq) GetAuthor ¶
func (s *CreateQuestionReq) GetAuthor() OptInt
GetAuthor returns the value of Author.
func (*CreateQuestionReq) GetContent ¶
func (s *CreateQuestionReq) GetContent() string
GetContent returns the value of Content.
func (*CreateQuestionReq) GetCreatedAt ¶
func (s *CreateQuestionReq) GetCreatedAt() time.Time
GetCreatedAt returns the value of CreatedAt.
func (*CreateQuestionReq) GetLikes ¶
func (s *CreateQuestionReq) GetLikes() int
GetLikes returns the value of Likes.
func (*CreateQuestionReq) GetSlug ¶
func (s *CreateQuestionReq) GetSlug() string
GetSlug returns the value of Slug.
func (*CreateQuestionReq) GetTags ¶
func (s *CreateQuestionReq) GetTags() []int
GetTags returns the value of Tags.
func (*CreateQuestionReq) GetTitle ¶
func (s *CreateQuestionReq) GetTitle() string
GetTitle returns the value of Title.
func (*CreateQuestionReq) GetUpdatedAt ¶
func (s *CreateQuestionReq) GetUpdatedAt() time.Time
GetUpdatedAt returns the value of UpdatedAt.
func (*CreateQuestionReq) GetViews ¶
func (s *CreateQuestionReq) GetViews() int
GetViews returns the value of Views.
func (*CreateQuestionReq) MarshalJSON ¶
func (s *CreateQuestionReq) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*CreateQuestionReq) SetAnswers ¶
func (s *CreateQuestionReq) SetAnswers(val []int)
SetAnswers sets the value of Answers.
func (*CreateQuestionReq) SetAuthor ¶
func (s *CreateQuestionReq) SetAuthor(val OptInt)
SetAuthor sets the value of Author.
func (*CreateQuestionReq) SetContent ¶
func (s *CreateQuestionReq) SetContent(val string)
SetContent sets the value of Content.
func (*CreateQuestionReq) SetCreatedAt ¶
func (s *CreateQuestionReq) SetCreatedAt(val time.Time)
SetCreatedAt sets the value of CreatedAt.
func (*CreateQuestionReq) SetLikes ¶
func (s *CreateQuestionReq) SetLikes(val int)
SetLikes sets the value of Likes.
func (*CreateQuestionReq) SetSlug ¶
func (s *CreateQuestionReq) SetSlug(val string)
SetSlug sets the value of Slug.
func (*CreateQuestionReq) SetTags ¶
func (s *CreateQuestionReq) SetTags(val []int)
SetTags sets the value of Tags.
func (*CreateQuestionReq) SetTitle ¶
func (s *CreateQuestionReq) SetTitle(val string)
SetTitle sets the value of Title.
func (*CreateQuestionReq) SetUpdatedAt ¶
func (s *CreateQuestionReq) SetUpdatedAt(val time.Time)
SetUpdatedAt sets the value of UpdatedAt.
func (*CreateQuestionReq) SetViews ¶
func (s *CreateQuestionReq) SetViews(val int)
SetViews sets the value of Views.
func (*CreateQuestionReq) UnmarshalJSON ¶
func (s *CreateQuestionReq) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type CreateQuestionRes ¶
type CreateQuestionRes interface {
// contains filtered or unexported methods
}
type CreateTagReq ¶
func (*CreateTagReq) Decode ¶
func (s *CreateTagReq) Decode(d *jx.Decoder) error
Decode decodes CreateTagReq from json.
func (*CreateTagReq) Encode ¶
func (s *CreateTagReq) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*CreateTagReq) GetName ¶
func (s *CreateTagReq) GetName() string
GetName returns the value of Name.
func (*CreateTagReq) GetQuestions ¶
func (s *CreateTagReq) GetQuestions() []int
GetQuestions returns the value of Questions.
func (*CreateTagReq) MarshalJSON ¶
func (s *CreateTagReq) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*CreateTagReq) SetName ¶
func (s *CreateTagReq) SetName(val string)
SetName sets the value of Name.
func (*CreateTagReq) SetQuestions ¶
func (s *CreateTagReq) SetQuestions(val []int)
SetQuestions sets the value of Questions.
func (*CreateTagReq) UnmarshalJSON ¶
func (s *CreateTagReq) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type CreateTagRes ¶
type CreateTagRes interface {
// contains filtered or unexported methods
}
type CreateUserReq ¶
type CreateUserReq struct { Username string `json:"username"` Email string `json:"email"` Password string `json:"password"` CreatedAt time.Time `json:"created_at"` LastLogin time.Time `json:"last_login"` Questions []int `json:"questions"` Answers []int `json:"answers"` Tags []int `json:"tags"` }
func (*CreateUserReq) Decode ¶
func (s *CreateUserReq) Decode(d *jx.Decoder) error
Decode decodes CreateUserReq from json.
func (*CreateUserReq) Encode ¶
func (s *CreateUserReq) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*CreateUserReq) GetAnswers ¶
func (s *CreateUserReq) GetAnswers() []int
GetAnswers returns the value of Answers.
func (*CreateUserReq) GetCreatedAt ¶
func (s *CreateUserReq) GetCreatedAt() time.Time
GetCreatedAt returns the value of CreatedAt.
func (*CreateUserReq) GetEmail ¶
func (s *CreateUserReq) GetEmail() string
GetEmail returns the value of Email.
func (*CreateUserReq) GetLastLogin ¶
func (s *CreateUserReq) GetLastLogin() time.Time
GetLastLogin returns the value of LastLogin.
func (*CreateUserReq) GetPassword ¶
func (s *CreateUserReq) GetPassword() string
GetPassword returns the value of Password.
func (*CreateUserReq) GetQuestions ¶
func (s *CreateUserReq) GetQuestions() []int
GetQuestions returns the value of Questions.
func (*CreateUserReq) GetTags ¶
func (s *CreateUserReq) GetTags() []int
GetTags returns the value of Tags.
func (*CreateUserReq) GetUsername ¶
func (s *CreateUserReq) GetUsername() string
GetUsername returns the value of Username.
func (*CreateUserReq) MarshalJSON ¶
func (s *CreateUserReq) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*CreateUserReq) SetAnswers ¶
func (s *CreateUserReq) SetAnswers(val []int)
SetAnswers sets the value of Answers.
func (*CreateUserReq) SetCreatedAt ¶
func (s *CreateUserReq) SetCreatedAt(val time.Time)
SetCreatedAt sets the value of CreatedAt.
func (*CreateUserReq) SetEmail ¶
func (s *CreateUserReq) SetEmail(val string)
SetEmail sets the value of Email.
func (*CreateUserReq) SetLastLogin ¶
func (s *CreateUserReq) SetLastLogin(val time.Time)
SetLastLogin sets the value of LastLogin.
func (*CreateUserReq) SetPassword ¶
func (s *CreateUserReq) SetPassword(val string)
SetPassword sets the value of Password.
func (*CreateUserReq) SetQuestions ¶
func (s *CreateUserReq) SetQuestions(val []int)
SetQuestions sets the value of Questions.
func (*CreateUserReq) SetTags ¶
func (s *CreateUserReq) SetTags(val []int)
SetTags sets the value of Tags.
func (*CreateUserReq) SetUsername ¶
func (s *CreateUserReq) SetUsername(val string)
SetUsername sets the value of Username.
func (*CreateUserReq) UnmarshalJSON ¶
func (s *CreateUserReq) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type CreateUserRes ¶
type CreateUserRes interface {
// contains filtered or unexported methods
}
type DeleteAnswerNoContent ¶
type DeleteAnswerNoContent struct{}
DeleteAnswerNoContent is response for DeleteAnswer operation.
type DeleteAnswerParams ¶
type DeleteAnswerParams struct { // ID of the Answer. ID int }
DeleteAnswerParams is parameters of deleteAnswer operation.
type DeleteAnswerRes ¶
type DeleteAnswerRes interface {
// contains filtered or unexported methods
}
type DeleteQuestionNoContent ¶
type DeleteQuestionNoContent struct{}
DeleteQuestionNoContent is response for DeleteQuestion operation.
type DeleteQuestionParams ¶
type DeleteQuestionParams struct { // ID of the Question. ID int }
DeleteQuestionParams is parameters of deleteQuestion operation.
type DeleteQuestionRes ¶
type DeleteQuestionRes interface {
// contains filtered or unexported methods
}
type DeleteTagNoContent ¶
type DeleteTagNoContent struct{}
DeleteTagNoContent is response for DeleteTag operation.
type DeleteTagParams ¶
type DeleteTagParams struct { // ID of the Tag. ID int }
DeleteTagParams is parameters of deleteTag operation.
type DeleteTagRes ¶
type DeleteTagRes interface {
// contains filtered or unexported methods
}
type DeleteUserNoContent ¶
type DeleteUserNoContent struct{}
DeleteUserNoContent is response for DeleteUser operation.
type DeleteUserParams ¶
type DeleteUserParams struct { // ID of the User. ID int }
DeleteUserParams is parameters of deleteUser operation.
type DeleteUserRes ¶
type DeleteUserRes interface {
// contains filtered or unexported methods
}
type Handler ¶
type Handler interface { // CreateAnswer implements createAnswer operation. // // Creates a new Answer and persists it to storage. // // POST /answers CreateAnswer(ctx context.Context, req *CreateAnswerReq) (CreateAnswerRes, error) // CreateQuestion implements createQuestion operation. // // Creates a new Question and persists it to storage. // // POST /questions CreateQuestion(ctx context.Context, req *CreateQuestionReq) (CreateQuestionRes, error) // CreateTag implements createTag operation. // // Creates a new Tag and persists it to storage. // // POST /tags CreateTag(ctx context.Context, req *CreateTagReq) (CreateTagRes, error) // CreateUser implements createUser operation. // // Creates a new User and persists it to storage. // // POST /users CreateUser(ctx context.Context, req *CreateUserReq) (CreateUserRes, error) // DeleteAnswer implements deleteAnswer operation. // // Deletes the Answer with the requested ID. // // DELETE /answers/{id} DeleteAnswer(ctx context.Context, params DeleteAnswerParams) (DeleteAnswerRes, error) // DeleteQuestion implements deleteQuestion operation. // // Deletes the Question with the requested ID. // // DELETE /questions/{id} DeleteQuestion(ctx context.Context, params DeleteQuestionParams) (DeleteQuestionRes, error) // DeleteTag implements deleteTag operation. // // Deletes the Tag with the requested ID. // // DELETE /tags/{id} DeleteTag(ctx context.Context, params DeleteTagParams) (DeleteTagRes, error) // DeleteUser implements deleteUser operation. // // Deletes the User with the requested ID. // // DELETE /users/{id} DeleteUser(ctx context.Context, params DeleteUserParams) (DeleteUserRes, error) // ListAnswer implements listAnswer operation. // // List Answers. // // GET /answers ListAnswer(ctx context.Context, params ListAnswerParams) (ListAnswerRes, error) // ListQuestion implements listQuestion operation. // // List Questions. // // GET /questions ListQuestion(ctx context.Context, params ListQuestionParams) (ListQuestionRes, error) // ListQuestionAnswers implements listQuestionAnswers operation. // // List attached Answers. // // GET /questions/{id}/answers ListQuestionAnswers(ctx context.Context, params ListQuestionAnswersParams) (ListQuestionAnswersRes, error) // ListQuestionTags implements listQuestionTags operation. // // List attached Tags. // // GET /questions/{id}/tags ListQuestionTags(ctx context.Context, params ListQuestionTagsParams) (ListQuestionTagsRes, error) // ListTag implements listTag operation. // // List Tags. // // GET /tags ListTag(ctx context.Context, params ListTagParams) (ListTagRes, error) // ListTagQuestions implements listTagQuestions operation. // // List attached Questions. // // GET /tags/{id}/questions ListTagQuestions(ctx context.Context, params ListTagQuestionsParams) (ListTagQuestionsRes, error) // ListUser implements listUser operation. // // List Users. // // GET /users ListUser(ctx context.Context, params ListUserParams) (ListUserRes, error) // ListUserAnswers implements listUserAnswers operation. // // List attached Answers. // // GET /users/{id}/answers ListUserAnswers(ctx context.Context, params ListUserAnswersParams) (ListUserAnswersRes, error) // ListUserQuestions implements listUserQuestions operation. // // List attached Questions. // // GET /users/{id}/questions ListUserQuestions(ctx context.Context, params ListUserQuestionsParams) (ListUserQuestionsRes, error) // ListUserTags implements listUserTags operation. // // List attached Tags. // // GET /users/{id}/tags ListUserTags(ctx context.Context, params ListUserTagsParams) (ListUserTagsRes, error) // ReadAnswer implements readAnswer operation. // // Finds the Answer with the requested ID and returns it. // // GET /answers/{id} ReadAnswer(ctx context.Context, params ReadAnswerParams) (ReadAnswerRes, error) // ReadAnswerAuthor implements readAnswerAuthor operation. // // Find the attached User of the Answer with the given ID. // // GET /answers/{id}/author ReadAnswerAuthor(ctx context.Context, params ReadAnswerAuthorParams) (ReadAnswerAuthorRes, error) // ReadAnswerQuestion implements readAnswerQuestion operation. // // Find the attached Question of the Answer with the given ID. // // GET /answers/{id}/question ReadAnswerQuestion(ctx context.Context, params ReadAnswerQuestionParams) (ReadAnswerQuestionRes, error) // ReadQuestion implements readQuestion operation. // // Finds the Question with the requested ID and returns it. // // GET /questions/{id} ReadQuestion(ctx context.Context, params ReadQuestionParams) (ReadQuestionRes, error) // ReadQuestionAuthor implements readQuestionAuthor operation. // // Find the attached User of the Question with the given ID. // // GET /questions/{id}/author ReadQuestionAuthor(ctx context.Context, params ReadQuestionAuthorParams) (ReadQuestionAuthorRes, error) // ReadTag implements readTag operation. // // Finds the Tag with the requested ID and returns it. // // GET /tags/{id} ReadTag(ctx context.Context, params ReadTagParams) (ReadTagRes, error) // ReadUser implements readUser operation. // // Finds the User with the requested ID and returns it. // // GET /users/{id} ReadUser(ctx context.Context, params ReadUserParams) (ReadUserRes, error) // UpdateAnswer implements updateAnswer operation. // // Updates a Answer and persists changes to storage. // // PATCH /answers/{id} UpdateAnswer(ctx context.Context, req *UpdateAnswerReq, params UpdateAnswerParams) (UpdateAnswerRes, error) // UpdateQuestion implements updateQuestion operation. // // Updates a Question and persists changes to storage. // // PATCH /questions/{id} UpdateQuestion(ctx context.Context, req *UpdateQuestionReq, params UpdateQuestionParams) (UpdateQuestionRes, error) // UpdateTag implements updateTag operation. // // Updates a Tag and persists changes to storage. // // PATCH /tags/{id} UpdateTag(ctx context.Context, req *UpdateTagReq, params UpdateTagParams) (UpdateTagRes, error) // UpdateUser implements updateUser operation. // // Updates a User and persists changes to storage. // // PATCH /users/{id} UpdateUser(ctx context.Context, req *UpdateUserReq, params UpdateUserParams) (UpdateUserRes, error) }
Handler handles operations described by OpenAPI v3 specification.
type Invoker ¶
type Invoker interface { // CreateAnswer invokes createAnswer operation. // // Creates a new Answer and persists it to storage. // // POST /answers CreateAnswer(ctx context.Context, request *CreateAnswerReq) (CreateAnswerRes, error) // CreateQuestion invokes createQuestion operation. // // Creates a new Question and persists it to storage. // // POST /questions CreateQuestion(ctx context.Context, request *CreateQuestionReq) (CreateQuestionRes, error) // CreateTag invokes createTag operation. // // Creates a new Tag and persists it to storage. // // POST /tags CreateTag(ctx context.Context, request *CreateTagReq) (CreateTagRes, error) // CreateUser invokes createUser operation. // // Creates a new User and persists it to storage. // // POST /users CreateUser(ctx context.Context, request *CreateUserReq) (CreateUserRes, error) // DeleteAnswer invokes deleteAnswer operation. // // Deletes the Answer with the requested ID. // // DELETE /answers/{id} DeleteAnswer(ctx context.Context, params DeleteAnswerParams) (DeleteAnswerRes, error) // DeleteQuestion invokes deleteQuestion operation. // // Deletes the Question with the requested ID. // // DELETE /questions/{id} DeleteQuestion(ctx context.Context, params DeleteQuestionParams) (DeleteQuestionRes, error) // DeleteTag invokes deleteTag operation. // // Deletes the Tag with the requested ID. // // DELETE /tags/{id} DeleteTag(ctx context.Context, params DeleteTagParams) (DeleteTagRes, error) // DeleteUser invokes deleteUser operation. // // Deletes the User with the requested ID. // // DELETE /users/{id} DeleteUser(ctx context.Context, params DeleteUserParams) (DeleteUserRes, error) // ListAnswer invokes listAnswer operation. // // List Answers. // // GET /answers ListAnswer(ctx context.Context, params ListAnswerParams) (ListAnswerRes, error) // ListQuestion invokes listQuestion operation. // // List Questions. // // GET /questions ListQuestion(ctx context.Context, params ListQuestionParams) (ListQuestionRes, error) // ListQuestionAnswers invokes listQuestionAnswers operation. // // List attached Answers. // // GET /questions/{id}/answers ListQuestionAnswers(ctx context.Context, params ListQuestionAnswersParams) (ListQuestionAnswersRes, error) // ListQuestionTags invokes listQuestionTags operation. // // List attached Tags. // // GET /questions/{id}/tags ListQuestionTags(ctx context.Context, params ListQuestionTagsParams) (ListQuestionTagsRes, error) // ListTag invokes listTag operation. // // List Tags. // // GET /tags ListTag(ctx context.Context, params ListTagParams) (ListTagRes, error) // ListTagQuestions invokes listTagQuestions operation. // // List attached Questions. // // GET /tags/{id}/questions ListTagQuestions(ctx context.Context, params ListTagQuestionsParams) (ListTagQuestionsRes, error) // ListUser invokes listUser operation. // // List Users. // // GET /users ListUser(ctx context.Context, params ListUserParams) (ListUserRes, error) // ListUserAnswers invokes listUserAnswers operation. // // List attached Answers. // // GET /users/{id}/answers ListUserAnswers(ctx context.Context, params ListUserAnswersParams) (ListUserAnswersRes, error) // ListUserQuestions invokes listUserQuestions operation. // // List attached Questions. // // GET /users/{id}/questions ListUserQuestions(ctx context.Context, params ListUserQuestionsParams) (ListUserQuestionsRes, error) // ListUserTags invokes listUserTags operation. // // List attached Tags. // // GET /users/{id}/tags ListUserTags(ctx context.Context, params ListUserTagsParams) (ListUserTagsRes, error) // ReadAnswer invokes readAnswer operation. // // Finds the Answer with the requested ID and returns it. // // GET /answers/{id} ReadAnswer(ctx context.Context, params ReadAnswerParams) (ReadAnswerRes, error) // ReadAnswerAuthor invokes readAnswerAuthor operation. // // Find the attached User of the Answer with the given ID. // // GET /answers/{id}/author ReadAnswerAuthor(ctx context.Context, params ReadAnswerAuthorParams) (ReadAnswerAuthorRes, error) // ReadAnswerQuestion invokes readAnswerQuestion operation. // // Find the attached Question of the Answer with the given ID. // // GET /answers/{id}/question ReadAnswerQuestion(ctx context.Context, params ReadAnswerQuestionParams) (ReadAnswerQuestionRes, error) // ReadQuestion invokes readQuestion operation. // // Finds the Question with the requested ID and returns it. // // GET /questions/{id} ReadQuestion(ctx context.Context, params ReadQuestionParams) (ReadQuestionRes, error) // ReadQuestionAuthor invokes readQuestionAuthor operation. // // Find the attached User of the Question with the given ID. // // GET /questions/{id}/author ReadQuestionAuthor(ctx context.Context, params ReadQuestionAuthorParams) (ReadQuestionAuthorRes, error) // ReadTag invokes readTag operation. // // Finds the Tag with the requested ID and returns it. // // GET /tags/{id} ReadTag(ctx context.Context, params ReadTagParams) (ReadTagRes, error) // ReadUser invokes readUser operation. // // Finds the User with the requested ID and returns it. // // GET /users/{id} ReadUser(ctx context.Context, params ReadUserParams) (ReadUserRes, error) // UpdateAnswer invokes updateAnswer operation. // // Updates a Answer and persists changes to storage. // // PATCH /answers/{id} UpdateAnswer(ctx context.Context, request *UpdateAnswerReq, params UpdateAnswerParams) (UpdateAnswerRes, error) // UpdateQuestion invokes updateQuestion operation. // // Updates a Question and persists changes to storage. // // PATCH /questions/{id} UpdateQuestion(ctx context.Context, request *UpdateQuestionReq, params UpdateQuestionParams) (UpdateQuestionRes, error) // UpdateTag invokes updateTag operation. // // Updates a Tag and persists changes to storage. // // PATCH /tags/{id} UpdateTag(ctx context.Context, request *UpdateTagReq, params UpdateTagParams) (UpdateTagRes, error) // UpdateUser invokes updateUser operation. // // Updates a User and persists changes to storage. // // PATCH /users/{id} UpdateUser(ctx context.Context, request *UpdateUserReq, params UpdateUserParams) (UpdateUserRes, error) }
Invoker invokes operations described by OpenAPI v3 specification.
type ListAnswerOKApplicationJSON ¶
type ListAnswerOKApplicationJSON []AnswerList
func (*ListAnswerOKApplicationJSON) Decode ¶
func (s *ListAnswerOKApplicationJSON) Decode(d *jx.Decoder) error
Decode decodes ListAnswerOKApplicationJSON from json.
func (ListAnswerOKApplicationJSON) Encode ¶
func (s ListAnswerOKApplicationJSON) Encode(e *jx.Encoder)
Encode encodes ListAnswerOKApplicationJSON as json.
func (ListAnswerOKApplicationJSON) MarshalJSON ¶
func (s ListAnswerOKApplicationJSON) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*ListAnswerOKApplicationJSON) UnmarshalJSON ¶
func (s *ListAnswerOKApplicationJSON) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (ListAnswerOKApplicationJSON) Validate ¶
func (s ListAnswerOKApplicationJSON) Validate() error
type ListAnswerParams ¶
type ListAnswerParams struct { // What page to render. Page OptInt // Item count to render per page. ItemsPerPage OptInt }
ListAnswerParams is parameters of listAnswer operation.
type ListAnswerRes ¶
type ListAnswerRes interface {
// contains filtered or unexported methods
}
type ListQuestionAnswersOKApplicationJSON ¶
type ListQuestionAnswersOKApplicationJSON []QuestionAnswersList
func (*ListQuestionAnswersOKApplicationJSON) Decode ¶
func (s *ListQuestionAnswersOKApplicationJSON) Decode(d *jx.Decoder) error
Decode decodes ListQuestionAnswersOKApplicationJSON from json.
func (ListQuestionAnswersOKApplicationJSON) Encode ¶
func (s ListQuestionAnswersOKApplicationJSON) Encode(e *jx.Encoder)
Encode encodes ListQuestionAnswersOKApplicationJSON as json.
func (ListQuestionAnswersOKApplicationJSON) MarshalJSON ¶
func (s ListQuestionAnswersOKApplicationJSON) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*ListQuestionAnswersOKApplicationJSON) UnmarshalJSON ¶
func (s *ListQuestionAnswersOKApplicationJSON) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (ListQuestionAnswersOKApplicationJSON) Validate ¶
func (s ListQuestionAnswersOKApplicationJSON) Validate() error
type ListQuestionAnswersParams ¶
type ListQuestionAnswersParams struct { // ID of the Question. ID int // What page to render. Page OptInt // Item count to render per page. ItemsPerPage OptInt }
ListQuestionAnswersParams is parameters of listQuestionAnswers operation.
type ListQuestionAnswersRes ¶
type ListQuestionAnswersRes interface {
// contains filtered or unexported methods
}
type ListQuestionOKApplicationJSON ¶
type ListQuestionOKApplicationJSON []QuestionList
func (*ListQuestionOKApplicationJSON) Decode ¶
func (s *ListQuestionOKApplicationJSON) Decode(d *jx.Decoder) error
Decode decodes ListQuestionOKApplicationJSON from json.
func (ListQuestionOKApplicationJSON) Encode ¶
func (s ListQuestionOKApplicationJSON) Encode(e *jx.Encoder)
Encode encodes ListQuestionOKApplicationJSON as json.
func (ListQuestionOKApplicationJSON) MarshalJSON ¶
func (s ListQuestionOKApplicationJSON) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*ListQuestionOKApplicationJSON) UnmarshalJSON ¶
func (s *ListQuestionOKApplicationJSON) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (ListQuestionOKApplicationJSON) Validate ¶
func (s ListQuestionOKApplicationJSON) Validate() error
type ListQuestionParams ¶
type ListQuestionParams struct { // What page to render. Page OptInt // Item count to render per page. ItemsPerPage OptInt }
ListQuestionParams is parameters of listQuestion operation.
type ListQuestionRes ¶
type ListQuestionRes interface {
// contains filtered or unexported methods
}
type ListQuestionTagsOKApplicationJSON ¶
type ListQuestionTagsOKApplicationJSON []QuestionTagsList
func (*ListQuestionTagsOKApplicationJSON) Decode ¶
func (s *ListQuestionTagsOKApplicationJSON) Decode(d *jx.Decoder) error
Decode decodes ListQuestionTagsOKApplicationJSON from json.
func (ListQuestionTagsOKApplicationJSON) Encode ¶
func (s ListQuestionTagsOKApplicationJSON) Encode(e *jx.Encoder)
Encode encodes ListQuestionTagsOKApplicationJSON as json.
func (ListQuestionTagsOKApplicationJSON) MarshalJSON ¶
func (s ListQuestionTagsOKApplicationJSON) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*ListQuestionTagsOKApplicationJSON) UnmarshalJSON ¶
func (s *ListQuestionTagsOKApplicationJSON) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (ListQuestionTagsOKApplicationJSON) Validate ¶
func (s ListQuestionTagsOKApplicationJSON) Validate() error
type ListQuestionTagsParams ¶
type ListQuestionTagsParams struct { // ID of the Question. ID int // What page to render. Page OptInt // Item count to render per page. ItemsPerPage OptInt }
ListQuestionTagsParams is parameters of listQuestionTags operation.
type ListQuestionTagsRes ¶
type ListQuestionTagsRes interface {
// contains filtered or unexported methods
}
type ListTagOKApplicationJSON ¶
type ListTagOKApplicationJSON []TagList
func (*ListTagOKApplicationJSON) Decode ¶
func (s *ListTagOKApplicationJSON) Decode(d *jx.Decoder) error
Decode decodes ListTagOKApplicationJSON from json.
func (ListTagOKApplicationJSON) Encode ¶
func (s ListTagOKApplicationJSON) Encode(e *jx.Encoder)
Encode encodes ListTagOKApplicationJSON as json.
func (ListTagOKApplicationJSON) MarshalJSON ¶
func (s ListTagOKApplicationJSON) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*ListTagOKApplicationJSON) UnmarshalJSON ¶
func (s *ListTagOKApplicationJSON) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (ListTagOKApplicationJSON) Validate ¶
func (s ListTagOKApplicationJSON) Validate() error
type ListTagParams ¶
type ListTagParams struct { // What page to render. Page OptInt // Item count to render per page. ItemsPerPage OptInt }
ListTagParams is parameters of listTag operation.
type ListTagQuestionsOKApplicationJSON ¶
type ListTagQuestionsOKApplicationJSON []TagQuestionsList
func (*ListTagQuestionsOKApplicationJSON) Decode ¶
func (s *ListTagQuestionsOKApplicationJSON) Decode(d *jx.Decoder) error
Decode decodes ListTagQuestionsOKApplicationJSON from json.
func (ListTagQuestionsOKApplicationJSON) Encode ¶
func (s ListTagQuestionsOKApplicationJSON) Encode(e *jx.Encoder)
Encode encodes ListTagQuestionsOKApplicationJSON as json.
func (ListTagQuestionsOKApplicationJSON) MarshalJSON ¶
func (s ListTagQuestionsOKApplicationJSON) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*ListTagQuestionsOKApplicationJSON) UnmarshalJSON ¶
func (s *ListTagQuestionsOKApplicationJSON) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (ListTagQuestionsOKApplicationJSON) Validate ¶
func (s ListTagQuestionsOKApplicationJSON) Validate() error
type ListTagQuestionsParams ¶
type ListTagQuestionsParams struct { // ID of the Tag. ID int // What page to render. Page OptInt // Item count to render per page. ItemsPerPage OptInt }
ListTagQuestionsParams is parameters of listTagQuestions operation.
type ListTagQuestionsRes ¶
type ListTagQuestionsRes interface {
// contains filtered or unexported methods
}
type ListTagRes ¶
type ListTagRes interface {
// contains filtered or unexported methods
}
type ListUserAnswersOKApplicationJSON ¶
type ListUserAnswersOKApplicationJSON []UserAnswersList
func (*ListUserAnswersOKApplicationJSON) Decode ¶
func (s *ListUserAnswersOKApplicationJSON) Decode(d *jx.Decoder) error
Decode decodes ListUserAnswersOKApplicationJSON from json.
func (ListUserAnswersOKApplicationJSON) Encode ¶
func (s ListUserAnswersOKApplicationJSON) Encode(e *jx.Encoder)
Encode encodes ListUserAnswersOKApplicationJSON as json.
func (ListUserAnswersOKApplicationJSON) MarshalJSON ¶
func (s ListUserAnswersOKApplicationJSON) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*ListUserAnswersOKApplicationJSON) UnmarshalJSON ¶
func (s *ListUserAnswersOKApplicationJSON) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (ListUserAnswersOKApplicationJSON) Validate ¶
func (s ListUserAnswersOKApplicationJSON) Validate() error
type ListUserAnswersParams ¶
type ListUserAnswersParams struct { // ID of the User. ID int // What page to render. Page OptInt // Item count to render per page. ItemsPerPage OptInt }
ListUserAnswersParams is parameters of listUserAnswers operation.
type ListUserAnswersRes ¶
type ListUserAnswersRes interface {
// contains filtered or unexported methods
}
type ListUserOKApplicationJSON ¶
type ListUserOKApplicationJSON []UserList
func (*ListUserOKApplicationJSON) Decode ¶
func (s *ListUserOKApplicationJSON) Decode(d *jx.Decoder) error
Decode decodes ListUserOKApplicationJSON from json.
func (ListUserOKApplicationJSON) Encode ¶
func (s ListUserOKApplicationJSON) Encode(e *jx.Encoder)
Encode encodes ListUserOKApplicationJSON as json.
func (ListUserOKApplicationJSON) MarshalJSON ¶
func (s ListUserOKApplicationJSON) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*ListUserOKApplicationJSON) UnmarshalJSON ¶
func (s *ListUserOKApplicationJSON) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (ListUserOKApplicationJSON) Validate ¶
func (s ListUserOKApplicationJSON) Validate() error
type ListUserParams ¶
type ListUserParams struct { // What page to render. Page OptInt // Item count to render per page. ItemsPerPage OptInt }
ListUserParams is parameters of listUser operation.
type ListUserQuestionsOKApplicationJSON ¶
type ListUserQuestionsOKApplicationJSON []UserQuestionsList
func (*ListUserQuestionsOKApplicationJSON) Decode ¶
func (s *ListUserQuestionsOKApplicationJSON) Decode(d *jx.Decoder) error
Decode decodes ListUserQuestionsOKApplicationJSON from json.
func (ListUserQuestionsOKApplicationJSON) Encode ¶
func (s ListUserQuestionsOKApplicationJSON) Encode(e *jx.Encoder)
Encode encodes ListUserQuestionsOKApplicationJSON as json.
func (ListUserQuestionsOKApplicationJSON) MarshalJSON ¶
func (s ListUserQuestionsOKApplicationJSON) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*ListUserQuestionsOKApplicationJSON) UnmarshalJSON ¶
func (s *ListUserQuestionsOKApplicationJSON) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (ListUserQuestionsOKApplicationJSON) Validate ¶
func (s ListUserQuestionsOKApplicationJSON) Validate() error
type ListUserQuestionsParams ¶
type ListUserQuestionsParams struct { // ID of the User. ID int // What page to render. Page OptInt // Item count to render per page. ItemsPerPage OptInt }
ListUserQuestionsParams is parameters of listUserQuestions operation.
type ListUserQuestionsRes ¶
type ListUserQuestionsRes interface {
// contains filtered or unexported methods
}
type ListUserRes ¶
type ListUserRes interface {
// contains filtered or unexported methods
}
type ListUserTagsOKApplicationJSON ¶
type ListUserTagsOKApplicationJSON []UserTagsList
func (*ListUserTagsOKApplicationJSON) Decode ¶
func (s *ListUserTagsOKApplicationJSON) Decode(d *jx.Decoder) error
Decode decodes ListUserTagsOKApplicationJSON from json.
func (ListUserTagsOKApplicationJSON) Encode ¶
func (s ListUserTagsOKApplicationJSON) Encode(e *jx.Encoder)
Encode encodes ListUserTagsOKApplicationJSON as json.
func (ListUserTagsOKApplicationJSON) MarshalJSON ¶
func (s ListUserTagsOKApplicationJSON) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*ListUserTagsOKApplicationJSON) UnmarshalJSON ¶
func (s *ListUserTagsOKApplicationJSON) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (ListUserTagsOKApplicationJSON) Validate ¶
func (s ListUserTagsOKApplicationJSON) Validate() error
type ListUserTagsParams ¶
type ListUserTagsParams struct { // ID of the User. ID int // What page to render. Page OptInt // Item count to render per page. ItemsPerPage OptInt }
ListUserTagsParams is parameters of listUserTags operation.
type ListUserTagsRes ¶
type ListUserTagsRes interface {
// contains filtered or unexported methods
}
type OgentHandler ¶
type OgentHandler struct {
// contains filtered or unexported fields
}
OgentHandler implements the ogen generated Handler interface and uses Ent as data layer.
func NewOgentHandler ¶
func NewOgentHandler(c *ent.Client) *OgentHandler
NewOgentHandler returns a new OgentHandler.
func (*OgentHandler) CreateAnswer ¶
func (h *OgentHandler) CreateAnswer(ctx context.Context, req *CreateAnswerReq) (CreateAnswerRes, error)
CreateAnswer handles POST /answers requests.
func (*OgentHandler) CreateQuestion ¶
func (h *OgentHandler) CreateQuestion(ctx context.Context, req *CreateQuestionReq) (CreateQuestionRes, error)
CreateQuestion handles POST /questions requests.
func (*OgentHandler) CreateTag ¶
func (h *OgentHandler) CreateTag(ctx context.Context, req *CreateTagReq) (CreateTagRes, error)
CreateTag handles POST /tags requests.
func (*OgentHandler) CreateUser ¶
func (h *OgentHandler) CreateUser(ctx context.Context, req *CreateUserReq) (CreateUserRes, error)
CreateUser handles POST /users requests.
func (*OgentHandler) DeleteAnswer ¶
func (h *OgentHandler) DeleteAnswer(ctx context.Context, params DeleteAnswerParams) (DeleteAnswerRes, error)
DeleteAnswer handles DELETE /answers/{id} requests.
func (*OgentHandler) DeleteQuestion ¶
func (h *OgentHandler) DeleteQuestion(ctx context.Context, params DeleteQuestionParams) (DeleteQuestionRes, error)
DeleteQuestion handles DELETE /questions/{id} requests.
func (*OgentHandler) DeleteTag ¶
func (h *OgentHandler) DeleteTag(ctx context.Context, params DeleteTagParams) (DeleteTagRes, error)
DeleteTag handles DELETE /tags/{id} requests.
func (*OgentHandler) DeleteUser ¶
func (h *OgentHandler) DeleteUser(ctx context.Context, params DeleteUserParams) (DeleteUserRes, error)
DeleteUser handles DELETE /users/{id} requests.
func (*OgentHandler) ListAnswer ¶
func (h *OgentHandler) ListAnswer(ctx context.Context, params ListAnswerParams) (ListAnswerRes, error)
ListAnswer handles GET /answers requests.
func (*OgentHandler) ListQuestion ¶
func (h *OgentHandler) ListQuestion(ctx context.Context, params ListQuestionParams) (ListQuestionRes, error)
ListQuestion handles GET /questions requests.
func (*OgentHandler) ListQuestionAnswers ¶
func (h *OgentHandler) ListQuestionAnswers(ctx context.Context, params ListQuestionAnswersParams) (ListQuestionAnswersRes, error)
ListQuestionAnswers handles GET /questions/{id}/answers requests.
func (*OgentHandler) ListQuestionTags ¶
func (h *OgentHandler) ListQuestionTags(ctx context.Context, params ListQuestionTagsParams) (ListQuestionTagsRes, error)
ListQuestionTags handles GET /questions/{id}/tags requests.
func (*OgentHandler) ListTag ¶
func (h *OgentHandler) ListTag(ctx context.Context, params ListTagParams) (ListTagRes, error)
ListTag handles GET /tags requests.
func (*OgentHandler) ListTagQuestions ¶
func (h *OgentHandler) ListTagQuestions(ctx context.Context, params ListTagQuestionsParams) (ListTagQuestionsRes, error)
ListTagQuestions handles GET /tags/{id}/questions requests.
func (*OgentHandler) ListUser ¶
func (h *OgentHandler) ListUser(ctx context.Context, params ListUserParams) (ListUserRes, error)
ListUser handles GET /users requests.
func (*OgentHandler) ListUserAnswers ¶
func (h *OgentHandler) ListUserAnswers(ctx context.Context, params ListUserAnswersParams) (ListUserAnswersRes, error)
ListUserAnswers handles GET /users/{id}/answers requests.
func (*OgentHandler) ListUserQuestions ¶
func (h *OgentHandler) ListUserQuestions(ctx context.Context, params ListUserQuestionsParams) (ListUserQuestionsRes, error)
ListUserQuestions handles GET /users/{id}/questions requests.
func (*OgentHandler) ListUserTags ¶
func (h *OgentHandler) ListUserTags(ctx context.Context, params ListUserTagsParams) (ListUserTagsRes, error)
ListUserTags handles GET /users/{id}/tags requests.
func (*OgentHandler) ReadAnswer ¶
func (h *OgentHandler) ReadAnswer(ctx context.Context, params ReadAnswerParams) (ReadAnswerRes, error)
ReadAnswer handles GET /answers/{id} requests.
func (*OgentHandler) ReadAnswerAuthor ¶
func (h *OgentHandler) ReadAnswerAuthor(ctx context.Context, params ReadAnswerAuthorParams) (ReadAnswerAuthorRes, error)
ReadAnswerAuthor handles GET /answers/{id}/author requests.
func (*OgentHandler) ReadAnswerQuestion ¶
func (h *OgentHandler) ReadAnswerQuestion(ctx context.Context, params ReadAnswerQuestionParams) (ReadAnswerQuestionRes, error)
ReadAnswerQuestion handles GET /answers/{id}/question requests.
func (*OgentHandler) ReadQuestion ¶
func (h *OgentHandler) ReadQuestion(ctx context.Context, params ReadQuestionParams) (ReadQuestionRes, error)
ReadQuestion handles GET /questions/{id} requests.
func (*OgentHandler) ReadQuestionAuthor ¶
func (h *OgentHandler) ReadQuestionAuthor(ctx context.Context, params ReadQuestionAuthorParams) (ReadQuestionAuthorRes, error)
ReadQuestionAuthor handles GET /questions/{id}/author requests.
func (*OgentHandler) ReadTag ¶
func (h *OgentHandler) ReadTag(ctx context.Context, params ReadTagParams) (ReadTagRes, error)
ReadTag handles GET /tags/{id} requests.
func (*OgentHandler) ReadUser ¶
func (h *OgentHandler) ReadUser(ctx context.Context, params ReadUserParams) (ReadUserRes, error)
ReadUser handles GET /users/{id} requests.
func (*OgentHandler) UpdateAnswer ¶
func (h *OgentHandler) UpdateAnswer(ctx context.Context, req *UpdateAnswerReq, params UpdateAnswerParams) (UpdateAnswerRes, error)
UpdateAnswer handles PATCH /answers/{id} requests.
func (*OgentHandler) UpdateQuestion ¶
func (h *OgentHandler) UpdateQuestion(ctx context.Context, req *UpdateQuestionReq, params UpdateQuestionParams) (UpdateQuestionRes, error)
UpdateQuestion handles PATCH /questions/{id} requests.
func (*OgentHandler) UpdateTag ¶
func (h *OgentHandler) UpdateTag(ctx context.Context, req *UpdateTagReq, params UpdateTagParams) (UpdateTagRes, error)
UpdateTag handles PATCH /tags/{id} requests.
func (*OgentHandler) UpdateUser ¶
func (h *OgentHandler) UpdateUser(ctx context.Context, req *UpdateUserReq, params UpdateUserParams) (UpdateUserRes, error)
UpdateUser handles PATCH /users/{id} requests.
type OptBool ¶
OptBool is optional bool.
func NewOptBool ¶
NewOptBool returns new OptBool with value set to v.
func (OptBool) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*OptBool) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type OptDateTime ¶
OptDateTime is optional time.Time.
func NewOptDateTime ¶
func NewOptDateTime(v time.Time) OptDateTime
NewOptDateTime returns new OptDateTime with value set to v.
func (OptDateTime) Get ¶
func (o OptDateTime) Get() (v time.Time, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptDateTime) IsSet ¶
func (o OptDateTime) IsSet() bool
IsSet returns true if OptDateTime was set.
func (OptDateTime) MarshalJSON ¶
func (s OptDateTime) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (OptDateTime) Or ¶
func (o OptDateTime) Or(d time.Time) time.Time
Or returns value if set, or given parameter if does not.
func (*OptDateTime) UnmarshalJSON ¶
func (s *OptDateTime) 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 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 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 QuestionAnswersList ¶
type QuestionAnswersList struct { ID int `json:"id"` Content string `json:"content"` Likes int `json:"likes"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` IsAcceptedAnswer bool `json:"is_accepted_answer"` }
Ref: #/components/schemas/Question_AnswersList
func NewQuestionAnswersList ¶
func NewQuestionAnswersList(e *ent.Answer) *QuestionAnswersList
func NewQuestionAnswersLists ¶
func NewQuestionAnswersLists(es []*ent.Answer) []QuestionAnswersList
func (*QuestionAnswersList) Decode ¶
func (s *QuestionAnswersList) Decode(d *jx.Decoder) error
Decode decodes QuestionAnswersList from json.
func (*QuestionAnswersList) Elem ¶
func (a *QuestionAnswersList) Elem() QuestionAnswersList
func (*QuestionAnswersList) Encode ¶
func (s *QuestionAnswersList) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*QuestionAnswersList) GetContent ¶
func (s *QuestionAnswersList) GetContent() string
GetContent returns the value of Content.
func (*QuestionAnswersList) GetCreatedAt ¶
func (s *QuestionAnswersList) GetCreatedAt() time.Time
GetCreatedAt returns the value of CreatedAt.
func (*QuestionAnswersList) GetID ¶
func (s *QuestionAnswersList) GetID() int
GetID returns the value of ID.
func (*QuestionAnswersList) GetIsAcceptedAnswer ¶
func (s *QuestionAnswersList) GetIsAcceptedAnswer() bool
GetIsAcceptedAnswer returns the value of IsAcceptedAnswer.
func (*QuestionAnswersList) GetLikes ¶
func (s *QuestionAnswersList) GetLikes() int
GetLikes returns the value of Likes.
func (*QuestionAnswersList) GetUpdatedAt ¶
func (s *QuestionAnswersList) GetUpdatedAt() time.Time
GetUpdatedAt returns the value of UpdatedAt.
func (*QuestionAnswersList) MarshalJSON ¶
func (s *QuestionAnswersList) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*QuestionAnswersList) SetContent ¶
func (s *QuestionAnswersList) SetContent(val string)
SetContent sets the value of Content.
func (*QuestionAnswersList) SetCreatedAt ¶
func (s *QuestionAnswersList) SetCreatedAt(val time.Time)
SetCreatedAt sets the value of CreatedAt.
func (*QuestionAnswersList) SetID ¶
func (s *QuestionAnswersList) SetID(val int)
SetID sets the value of ID.
func (*QuestionAnswersList) SetIsAcceptedAnswer ¶
func (s *QuestionAnswersList) SetIsAcceptedAnswer(val bool)
SetIsAcceptedAnswer sets the value of IsAcceptedAnswer.
func (*QuestionAnswersList) SetLikes ¶
func (s *QuestionAnswersList) SetLikes(val int)
SetLikes sets the value of Likes.
func (*QuestionAnswersList) SetUpdatedAt ¶
func (s *QuestionAnswersList) SetUpdatedAt(val time.Time)
SetUpdatedAt sets the value of UpdatedAt.
func (*QuestionAnswersList) UnmarshalJSON ¶
func (s *QuestionAnswersList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type QuestionAuthorRead ¶
type QuestionAuthorRead struct { ID int `json:"id"` Username string `json:"username"` Email string `json:"email"` CreatedAt time.Time `json:"created_at"` LastLogin time.Time `json:"last_login"` }
Ref: #/components/schemas/Question_AuthorRead
func NewQuestionAuthorRead ¶
func NewQuestionAuthorRead(e *ent.User) *QuestionAuthorRead
func NewQuestionAuthorReads ¶
func NewQuestionAuthorReads(es []*ent.User) []QuestionAuthorRead
func (*QuestionAuthorRead) Decode ¶
func (s *QuestionAuthorRead) Decode(d *jx.Decoder) error
Decode decodes QuestionAuthorRead from json.
func (*QuestionAuthorRead) Elem ¶
func (u *QuestionAuthorRead) Elem() QuestionAuthorRead
func (*QuestionAuthorRead) Encode ¶
func (s *QuestionAuthorRead) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*QuestionAuthorRead) GetCreatedAt ¶
func (s *QuestionAuthorRead) GetCreatedAt() time.Time
GetCreatedAt returns the value of CreatedAt.
func (*QuestionAuthorRead) GetEmail ¶
func (s *QuestionAuthorRead) GetEmail() string
GetEmail returns the value of Email.
func (*QuestionAuthorRead) GetID ¶
func (s *QuestionAuthorRead) GetID() int
GetID returns the value of ID.
func (*QuestionAuthorRead) GetLastLogin ¶
func (s *QuestionAuthorRead) GetLastLogin() time.Time
GetLastLogin returns the value of LastLogin.
func (*QuestionAuthorRead) GetUsername ¶
func (s *QuestionAuthorRead) GetUsername() string
GetUsername returns the value of Username.
func (*QuestionAuthorRead) MarshalJSON ¶
func (s *QuestionAuthorRead) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*QuestionAuthorRead) SetCreatedAt ¶
func (s *QuestionAuthorRead) SetCreatedAt(val time.Time)
SetCreatedAt sets the value of CreatedAt.
func (*QuestionAuthorRead) SetEmail ¶
func (s *QuestionAuthorRead) SetEmail(val string)
SetEmail sets the value of Email.
func (*QuestionAuthorRead) SetID ¶
func (s *QuestionAuthorRead) SetID(val int)
SetID sets the value of ID.
func (*QuestionAuthorRead) SetLastLogin ¶
func (s *QuestionAuthorRead) SetLastLogin(val time.Time)
SetLastLogin sets the value of LastLogin.
func (*QuestionAuthorRead) SetUsername ¶
func (s *QuestionAuthorRead) SetUsername(val string)
SetUsername sets the value of Username.
func (*QuestionAuthorRead) UnmarshalJSON ¶
func (s *QuestionAuthorRead) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type QuestionCreate ¶
type QuestionCreate struct { ID int `json:"id"` Title string `json:"title"` Slug string `json:"slug"` Content string `json:"content"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` Views int `json:"views"` Likes int `json:"likes"` }
Ref: #/components/schemas/QuestionCreate
func NewQuestionCreate ¶
func NewQuestionCreate(e *ent.Question) *QuestionCreate
func NewQuestionCreates ¶
func NewQuestionCreates(es []*ent.Question) []QuestionCreate
func (*QuestionCreate) Decode ¶
func (s *QuestionCreate) Decode(d *jx.Decoder) error
Decode decodes QuestionCreate from json.
func (*QuestionCreate) Elem ¶
func (q *QuestionCreate) Elem() QuestionCreate
func (*QuestionCreate) Encode ¶
func (s *QuestionCreate) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*QuestionCreate) GetContent ¶
func (s *QuestionCreate) GetContent() string
GetContent returns the value of Content.
func (*QuestionCreate) GetCreatedAt ¶
func (s *QuestionCreate) GetCreatedAt() time.Time
GetCreatedAt returns the value of CreatedAt.
func (*QuestionCreate) GetLikes ¶
func (s *QuestionCreate) GetLikes() int
GetLikes returns the value of Likes.
func (*QuestionCreate) GetSlug ¶
func (s *QuestionCreate) GetSlug() string
GetSlug returns the value of Slug.
func (*QuestionCreate) GetTitle ¶
func (s *QuestionCreate) GetTitle() string
GetTitle returns the value of Title.
func (*QuestionCreate) GetUpdatedAt ¶
func (s *QuestionCreate) GetUpdatedAt() time.Time
GetUpdatedAt returns the value of UpdatedAt.
func (*QuestionCreate) GetViews ¶
func (s *QuestionCreate) GetViews() int
GetViews returns the value of Views.
func (*QuestionCreate) MarshalJSON ¶
func (s *QuestionCreate) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*QuestionCreate) SetContent ¶
func (s *QuestionCreate) SetContent(val string)
SetContent sets the value of Content.
func (*QuestionCreate) SetCreatedAt ¶
func (s *QuestionCreate) SetCreatedAt(val time.Time)
SetCreatedAt sets the value of CreatedAt.
func (*QuestionCreate) SetLikes ¶
func (s *QuestionCreate) SetLikes(val int)
SetLikes sets the value of Likes.
func (*QuestionCreate) SetSlug ¶
func (s *QuestionCreate) SetSlug(val string)
SetSlug sets the value of Slug.
func (*QuestionCreate) SetTitle ¶
func (s *QuestionCreate) SetTitle(val string)
SetTitle sets the value of Title.
func (*QuestionCreate) SetUpdatedAt ¶
func (s *QuestionCreate) SetUpdatedAt(val time.Time)
SetUpdatedAt sets the value of UpdatedAt.
func (*QuestionCreate) SetViews ¶
func (s *QuestionCreate) SetViews(val int)
SetViews sets the value of Views.
func (*QuestionCreate) UnmarshalJSON ¶
func (s *QuestionCreate) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type QuestionList ¶
type QuestionList struct { ID int `json:"id"` Title string `json:"title"` Slug string `json:"slug"` Content string `json:"content"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` Views int `json:"views"` Likes int `json:"likes"` }
Ref: #/components/schemas/QuestionList
func NewQuestionList ¶
func NewQuestionList(e *ent.Question) *QuestionList
func NewQuestionLists ¶
func NewQuestionLists(es []*ent.Question) []QuestionList
func (*QuestionList) Decode ¶
func (s *QuestionList) Decode(d *jx.Decoder) error
Decode decodes QuestionList from json.
func (*QuestionList) Elem ¶
func (q *QuestionList) Elem() QuestionList
func (*QuestionList) Encode ¶
func (s *QuestionList) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*QuestionList) GetContent ¶
func (s *QuestionList) GetContent() string
GetContent returns the value of Content.
func (*QuestionList) GetCreatedAt ¶
func (s *QuestionList) GetCreatedAt() time.Time
GetCreatedAt returns the value of CreatedAt.
func (*QuestionList) GetLikes ¶
func (s *QuestionList) GetLikes() int
GetLikes returns the value of Likes.
func (*QuestionList) GetSlug ¶
func (s *QuestionList) GetSlug() string
GetSlug returns the value of Slug.
func (*QuestionList) GetTitle ¶
func (s *QuestionList) GetTitle() string
GetTitle returns the value of Title.
func (*QuestionList) GetUpdatedAt ¶
func (s *QuestionList) GetUpdatedAt() time.Time
GetUpdatedAt returns the value of UpdatedAt.
func (*QuestionList) GetViews ¶
func (s *QuestionList) GetViews() int
GetViews returns the value of Views.
func (*QuestionList) MarshalJSON ¶
func (s *QuestionList) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*QuestionList) SetContent ¶
func (s *QuestionList) SetContent(val string)
SetContent sets the value of Content.
func (*QuestionList) SetCreatedAt ¶
func (s *QuestionList) SetCreatedAt(val time.Time)
SetCreatedAt sets the value of CreatedAt.
func (*QuestionList) SetLikes ¶
func (s *QuestionList) SetLikes(val int)
SetLikes sets the value of Likes.
func (*QuestionList) SetSlug ¶
func (s *QuestionList) SetSlug(val string)
SetSlug sets the value of Slug.
func (*QuestionList) SetTitle ¶
func (s *QuestionList) SetTitle(val string)
SetTitle sets the value of Title.
func (*QuestionList) SetUpdatedAt ¶
func (s *QuestionList) SetUpdatedAt(val time.Time)
SetUpdatedAt sets the value of UpdatedAt.
func (*QuestionList) SetViews ¶
func (s *QuestionList) SetViews(val int)
SetViews sets the value of Views.
func (*QuestionList) UnmarshalJSON ¶
func (s *QuestionList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type QuestionRead ¶
type QuestionRead struct { ID int `json:"id"` Title string `json:"title"` Slug string `json:"slug"` Content string `json:"content"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` Views int `json:"views"` Likes int `json:"likes"` }
Ref: #/components/schemas/QuestionRead
func NewQuestionRead ¶
func NewQuestionRead(e *ent.Question) *QuestionRead
func NewQuestionReads ¶
func NewQuestionReads(es []*ent.Question) []QuestionRead
func (*QuestionRead) Decode ¶
func (s *QuestionRead) Decode(d *jx.Decoder) error
Decode decodes QuestionRead from json.
func (*QuestionRead) Elem ¶
func (q *QuestionRead) Elem() QuestionRead
func (*QuestionRead) Encode ¶
func (s *QuestionRead) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*QuestionRead) GetContent ¶
func (s *QuestionRead) GetContent() string
GetContent returns the value of Content.
func (*QuestionRead) GetCreatedAt ¶
func (s *QuestionRead) GetCreatedAt() time.Time
GetCreatedAt returns the value of CreatedAt.
func (*QuestionRead) GetLikes ¶
func (s *QuestionRead) GetLikes() int
GetLikes returns the value of Likes.
func (*QuestionRead) GetSlug ¶
func (s *QuestionRead) GetSlug() string
GetSlug returns the value of Slug.
func (*QuestionRead) GetTitle ¶
func (s *QuestionRead) GetTitle() string
GetTitle returns the value of Title.
func (*QuestionRead) GetUpdatedAt ¶
func (s *QuestionRead) GetUpdatedAt() time.Time
GetUpdatedAt returns the value of UpdatedAt.
func (*QuestionRead) GetViews ¶
func (s *QuestionRead) GetViews() int
GetViews returns the value of Views.
func (*QuestionRead) MarshalJSON ¶
func (s *QuestionRead) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*QuestionRead) SetContent ¶
func (s *QuestionRead) SetContent(val string)
SetContent sets the value of Content.
func (*QuestionRead) SetCreatedAt ¶
func (s *QuestionRead) SetCreatedAt(val time.Time)
SetCreatedAt sets the value of CreatedAt.
func (*QuestionRead) SetLikes ¶
func (s *QuestionRead) SetLikes(val int)
SetLikes sets the value of Likes.
func (*QuestionRead) SetSlug ¶
func (s *QuestionRead) SetSlug(val string)
SetSlug sets the value of Slug.
func (*QuestionRead) SetTitle ¶
func (s *QuestionRead) SetTitle(val string)
SetTitle sets the value of Title.
func (*QuestionRead) SetUpdatedAt ¶
func (s *QuestionRead) SetUpdatedAt(val time.Time)
SetUpdatedAt sets the value of UpdatedAt.
func (*QuestionRead) SetViews ¶
func (s *QuestionRead) SetViews(val int)
SetViews sets the value of Views.
func (*QuestionRead) UnmarshalJSON ¶
func (s *QuestionRead) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type QuestionTagsList ¶
Ref: #/components/schemas/Question_TagsList
func NewQuestionTagsList ¶
func NewQuestionTagsList(e *ent.Tag) *QuestionTagsList
func NewQuestionTagsLists ¶
func NewQuestionTagsLists(es []*ent.Tag) []QuestionTagsList
func (*QuestionTagsList) Decode ¶
func (s *QuestionTagsList) Decode(d *jx.Decoder) error
Decode decodes QuestionTagsList from json.
func (*QuestionTagsList) Elem ¶
func (t *QuestionTagsList) Elem() QuestionTagsList
func (*QuestionTagsList) Encode ¶
func (s *QuestionTagsList) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*QuestionTagsList) GetID ¶
func (s *QuestionTagsList) GetID() int
GetID returns the value of ID.
func (*QuestionTagsList) GetName ¶
func (s *QuestionTagsList) GetName() string
GetName returns the value of Name.
func (*QuestionTagsList) MarshalJSON ¶
func (s *QuestionTagsList) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*QuestionTagsList) SetID ¶
func (s *QuestionTagsList) SetID(val int)
SetID sets the value of ID.
func (*QuestionTagsList) SetName ¶
func (s *QuestionTagsList) SetName(val string)
SetName sets the value of Name.
func (*QuestionTagsList) UnmarshalJSON ¶
func (s *QuestionTagsList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type QuestionUpdate ¶
type QuestionUpdate struct { ID int `json:"id"` Title string `json:"title"` Slug string `json:"slug"` Content string `json:"content"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` Views int `json:"views"` Likes int `json:"likes"` }
Ref: #/components/schemas/QuestionUpdate
func NewQuestionUpdate ¶
func NewQuestionUpdate(e *ent.Question) *QuestionUpdate
func NewQuestionUpdates ¶
func NewQuestionUpdates(es []*ent.Question) []QuestionUpdate
func (*QuestionUpdate) Decode ¶
func (s *QuestionUpdate) Decode(d *jx.Decoder) error
Decode decodes QuestionUpdate from json.
func (*QuestionUpdate) Elem ¶
func (q *QuestionUpdate) Elem() QuestionUpdate
func (*QuestionUpdate) Encode ¶
func (s *QuestionUpdate) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*QuestionUpdate) GetContent ¶
func (s *QuestionUpdate) GetContent() string
GetContent returns the value of Content.
func (*QuestionUpdate) GetCreatedAt ¶
func (s *QuestionUpdate) GetCreatedAt() time.Time
GetCreatedAt returns the value of CreatedAt.
func (*QuestionUpdate) GetLikes ¶
func (s *QuestionUpdate) GetLikes() int
GetLikes returns the value of Likes.
func (*QuestionUpdate) GetSlug ¶
func (s *QuestionUpdate) GetSlug() string
GetSlug returns the value of Slug.
func (*QuestionUpdate) GetTitle ¶
func (s *QuestionUpdate) GetTitle() string
GetTitle returns the value of Title.
func (*QuestionUpdate) GetUpdatedAt ¶
func (s *QuestionUpdate) GetUpdatedAt() time.Time
GetUpdatedAt returns the value of UpdatedAt.
func (*QuestionUpdate) GetViews ¶
func (s *QuestionUpdate) GetViews() int
GetViews returns the value of Views.
func (*QuestionUpdate) MarshalJSON ¶
func (s *QuestionUpdate) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*QuestionUpdate) SetContent ¶
func (s *QuestionUpdate) SetContent(val string)
SetContent sets the value of Content.
func (*QuestionUpdate) SetCreatedAt ¶
func (s *QuestionUpdate) SetCreatedAt(val time.Time)
SetCreatedAt sets the value of CreatedAt.
func (*QuestionUpdate) SetLikes ¶
func (s *QuestionUpdate) SetLikes(val int)
SetLikes sets the value of Likes.
func (*QuestionUpdate) SetSlug ¶
func (s *QuestionUpdate) SetSlug(val string)
SetSlug sets the value of Slug.
func (*QuestionUpdate) SetTitle ¶
func (s *QuestionUpdate) SetTitle(val string)
SetTitle sets the value of Title.
func (*QuestionUpdate) SetUpdatedAt ¶
func (s *QuestionUpdate) SetUpdatedAt(val time.Time)
SetUpdatedAt sets the value of UpdatedAt.
func (*QuestionUpdate) SetViews ¶
func (s *QuestionUpdate) SetViews(val int)
SetViews sets the value of Views.
func (*QuestionUpdate) UnmarshalJSON ¶
func (s *QuestionUpdate) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type R400 ¶
type R400 struct { Code int `json:"code"` Status string `json:"status"` Errors jx.Raw `json:"errors"` }
func (*R400) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*R400) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type R404 ¶
type R404 struct { Code int `json:"code"` Status string `json:"status"` Errors jx.Raw `json:"errors"` }
func (*R404) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*R404) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type R409 ¶
type R409 struct { Code int `json:"code"` Status string `json:"status"` Errors jx.Raw `json:"errors"` }
func (*R409) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*R409) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type R500 ¶
type R500 struct { Code int `json:"code"` Status string `json:"status"` Errors jx.Raw `json:"errors"` }
func (*R500) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*R500) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type ReadAnswerAuthorParams ¶
type ReadAnswerAuthorParams struct { // ID of the Answer. ID int }
ReadAnswerAuthorParams is parameters of readAnswerAuthor operation.
type ReadAnswerAuthorRes ¶
type ReadAnswerAuthorRes interface {
// contains filtered or unexported methods
}
type ReadAnswerParams ¶
type ReadAnswerParams struct { // ID of the Answer. ID int }
ReadAnswerParams is parameters of readAnswer operation.
type ReadAnswerQuestionParams ¶
type ReadAnswerQuestionParams struct { // ID of the Answer. ID int }
ReadAnswerQuestionParams is parameters of readAnswerQuestion operation.
type ReadAnswerQuestionRes ¶
type ReadAnswerQuestionRes interface {
// contains filtered or unexported methods
}
type ReadAnswerRes ¶
type ReadAnswerRes interface {
// contains filtered or unexported methods
}
type ReadQuestionAuthorParams ¶
type ReadQuestionAuthorParams struct { // ID of the Question. ID int }
ReadQuestionAuthorParams is parameters of readQuestionAuthor operation.
type ReadQuestionAuthorRes ¶
type ReadQuestionAuthorRes interface {
// contains filtered or unexported methods
}
type ReadQuestionParams ¶
type ReadQuestionParams struct { // ID of the Question. ID int }
ReadQuestionParams is parameters of readQuestion operation.
type ReadQuestionRes ¶
type ReadQuestionRes interface {
// contains filtered or unexported methods
}
type ReadTagParams ¶
type ReadTagParams struct { // ID of the Tag. ID int }
ReadTagParams is parameters of readTag operation.
type ReadTagRes ¶
type ReadTagRes interface {
// contains filtered or unexported methods
}
type ReadUserParams ¶
type ReadUserParams struct { // ID of the User. ID int }
ReadUserParams is parameters of readUser operation.
type ReadUserRes ¶
type ReadUserRes interface {
// contains filtered or unexported methods
}
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 TagCreate ¶
Ref: #/components/schemas/TagCreate
func NewTagCreate ¶
func NewTagCreates ¶
func (*TagCreate) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*TagCreate) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type TagList ¶
Ref: #/components/schemas/TagList
func NewTagList ¶
func NewTagLists ¶
func (*TagList) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*TagList) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type TagQuestionsList ¶
type TagQuestionsList struct { ID int `json:"id"` Title string `json:"title"` Slug string `json:"slug"` Content string `json:"content"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` Views int `json:"views"` Likes int `json:"likes"` }
Ref: #/components/schemas/Tag_QuestionsList
func NewTagQuestionsList ¶
func NewTagQuestionsList(e *ent.Question) *TagQuestionsList
func NewTagQuestionsLists ¶
func NewTagQuestionsLists(es []*ent.Question) []TagQuestionsList
func (*TagQuestionsList) Decode ¶
func (s *TagQuestionsList) Decode(d *jx.Decoder) error
Decode decodes TagQuestionsList from json.
func (*TagQuestionsList) Elem ¶
func (q *TagQuestionsList) Elem() TagQuestionsList
func (*TagQuestionsList) Encode ¶
func (s *TagQuestionsList) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*TagQuestionsList) GetContent ¶
func (s *TagQuestionsList) GetContent() string
GetContent returns the value of Content.
func (*TagQuestionsList) GetCreatedAt ¶
func (s *TagQuestionsList) GetCreatedAt() time.Time
GetCreatedAt returns the value of CreatedAt.
func (*TagQuestionsList) GetID ¶
func (s *TagQuestionsList) GetID() int
GetID returns the value of ID.
func (*TagQuestionsList) GetLikes ¶
func (s *TagQuestionsList) GetLikes() int
GetLikes returns the value of Likes.
func (*TagQuestionsList) GetSlug ¶
func (s *TagQuestionsList) GetSlug() string
GetSlug returns the value of Slug.
func (*TagQuestionsList) GetTitle ¶
func (s *TagQuestionsList) GetTitle() string
GetTitle returns the value of Title.
func (*TagQuestionsList) GetUpdatedAt ¶
func (s *TagQuestionsList) GetUpdatedAt() time.Time
GetUpdatedAt returns the value of UpdatedAt.
func (*TagQuestionsList) GetViews ¶
func (s *TagQuestionsList) GetViews() int
GetViews returns the value of Views.
func (*TagQuestionsList) MarshalJSON ¶
func (s *TagQuestionsList) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*TagQuestionsList) SetContent ¶
func (s *TagQuestionsList) SetContent(val string)
SetContent sets the value of Content.
func (*TagQuestionsList) SetCreatedAt ¶
func (s *TagQuestionsList) SetCreatedAt(val time.Time)
SetCreatedAt sets the value of CreatedAt.
func (*TagQuestionsList) SetID ¶
func (s *TagQuestionsList) SetID(val int)
SetID sets the value of ID.
func (*TagQuestionsList) SetLikes ¶
func (s *TagQuestionsList) SetLikes(val int)
SetLikes sets the value of Likes.
func (*TagQuestionsList) SetSlug ¶
func (s *TagQuestionsList) SetSlug(val string)
SetSlug sets the value of Slug.
func (*TagQuestionsList) SetTitle ¶
func (s *TagQuestionsList) SetTitle(val string)
SetTitle sets the value of Title.
func (*TagQuestionsList) SetUpdatedAt ¶
func (s *TagQuestionsList) SetUpdatedAt(val time.Time)
SetUpdatedAt sets the value of UpdatedAt.
func (*TagQuestionsList) SetViews ¶
func (s *TagQuestionsList) SetViews(val int)
SetViews sets the value of Views.
func (*TagQuestionsList) UnmarshalJSON ¶
func (s *TagQuestionsList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type TagRead ¶
Ref: #/components/schemas/TagRead
func NewTagRead ¶
func NewTagReads ¶
func (*TagRead) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*TagRead) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type TagUpdate ¶
Ref: #/components/schemas/TagUpdate
func NewTagUpdate ¶
func NewTagUpdates ¶
func (*TagUpdate) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*TagUpdate) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type UnimplementedHandler ¶
type UnimplementedHandler struct{}
UnimplementedHandler is no-op Handler which returns http.ErrNotImplemented.
func (UnimplementedHandler) CreateAnswer ¶
func (UnimplementedHandler) CreateAnswer(ctx context.Context, req *CreateAnswerReq) (r CreateAnswerRes, _ error)
CreateAnswer implements createAnswer operation.
Creates a new Answer and persists it to storage.
POST /answers
func (UnimplementedHandler) CreateQuestion ¶
func (UnimplementedHandler) CreateQuestion(ctx context.Context, req *CreateQuestionReq) (r CreateQuestionRes, _ error)
CreateQuestion implements createQuestion operation.
Creates a new Question and persists it to storage.
POST /questions
func (UnimplementedHandler) CreateTag ¶
func (UnimplementedHandler) CreateTag(ctx context.Context, req *CreateTagReq) (r CreateTagRes, _ error)
CreateTag implements createTag operation.
Creates a new Tag and persists it to storage.
POST /tags
func (UnimplementedHandler) CreateUser ¶
func (UnimplementedHandler) CreateUser(ctx context.Context, req *CreateUserReq) (r CreateUserRes, _ error)
CreateUser implements createUser operation.
Creates a new User and persists it to storage.
POST /users
func (UnimplementedHandler) DeleteAnswer ¶
func (UnimplementedHandler) DeleteAnswer(ctx context.Context, params DeleteAnswerParams) (r DeleteAnswerRes, _ error)
DeleteAnswer implements deleteAnswer operation.
Deletes the Answer with the requested ID.
DELETE /answers/{id}
func (UnimplementedHandler) DeleteQuestion ¶
func (UnimplementedHandler) DeleteQuestion(ctx context.Context, params DeleteQuestionParams) (r DeleteQuestionRes, _ error)
DeleteQuestion implements deleteQuestion operation.
Deletes the Question with the requested ID.
DELETE /questions/{id}
func (UnimplementedHandler) DeleteTag ¶
func (UnimplementedHandler) DeleteTag(ctx context.Context, params DeleteTagParams) (r DeleteTagRes, _ error)
DeleteTag implements deleteTag operation.
Deletes the Tag with the requested ID.
DELETE /tags/{id}
func (UnimplementedHandler) DeleteUser ¶
func (UnimplementedHandler) DeleteUser(ctx context.Context, params DeleteUserParams) (r DeleteUserRes, _ error)
DeleteUser implements deleteUser operation.
Deletes the User with the requested ID.
DELETE /users/{id}
func (UnimplementedHandler) ListAnswer ¶
func (UnimplementedHandler) ListAnswer(ctx context.Context, params ListAnswerParams) (r ListAnswerRes, _ error)
ListAnswer implements listAnswer operation.
List Answers.
GET /answers
func (UnimplementedHandler) ListQuestion ¶
func (UnimplementedHandler) ListQuestion(ctx context.Context, params ListQuestionParams) (r ListQuestionRes, _ error)
ListQuestion implements listQuestion operation.
List Questions.
GET /questions
func (UnimplementedHandler) ListQuestionAnswers ¶
func (UnimplementedHandler) ListQuestionAnswers(ctx context.Context, params ListQuestionAnswersParams) (r ListQuestionAnswersRes, _ error)
ListQuestionAnswers implements listQuestionAnswers operation.
List attached Answers.
GET /questions/{id}/answers
func (UnimplementedHandler) ListQuestionTags ¶
func (UnimplementedHandler) ListQuestionTags(ctx context.Context, params ListQuestionTagsParams) (r ListQuestionTagsRes, _ error)
ListQuestionTags implements listQuestionTags operation.
List attached Tags.
GET /questions/{id}/tags
func (UnimplementedHandler) ListTag ¶
func (UnimplementedHandler) ListTag(ctx context.Context, params ListTagParams) (r ListTagRes, _ error)
ListTag implements listTag operation.
List Tags.
GET /tags
func (UnimplementedHandler) ListTagQuestions ¶
func (UnimplementedHandler) ListTagQuestions(ctx context.Context, params ListTagQuestionsParams) (r ListTagQuestionsRes, _ error)
ListTagQuestions implements listTagQuestions operation.
List attached Questions.
GET /tags/{id}/questions
func (UnimplementedHandler) ListUser ¶
func (UnimplementedHandler) ListUser(ctx context.Context, params ListUserParams) (r ListUserRes, _ error)
ListUser implements listUser operation.
List Users.
GET /users
func (UnimplementedHandler) ListUserAnswers ¶
func (UnimplementedHandler) ListUserAnswers(ctx context.Context, params ListUserAnswersParams) (r ListUserAnswersRes, _ error)
ListUserAnswers implements listUserAnswers operation.
List attached Answers.
GET /users/{id}/answers
func (UnimplementedHandler) ListUserQuestions ¶
func (UnimplementedHandler) ListUserQuestions(ctx context.Context, params ListUserQuestionsParams) (r ListUserQuestionsRes, _ error)
ListUserQuestions implements listUserQuestions operation.
List attached Questions.
GET /users/{id}/questions
func (UnimplementedHandler) ListUserTags ¶
func (UnimplementedHandler) ListUserTags(ctx context.Context, params ListUserTagsParams) (r ListUserTagsRes, _ error)
ListUserTags implements listUserTags operation.
List attached Tags.
GET /users/{id}/tags
func (UnimplementedHandler) ReadAnswer ¶
func (UnimplementedHandler) ReadAnswer(ctx context.Context, params ReadAnswerParams) (r ReadAnswerRes, _ error)
ReadAnswer implements readAnswer operation.
Finds the Answer with the requested ID and returns it.
GET /answers/{id}
func (UnimplementedHandler) ReadAnswerAuthor ¶
func (UnimplementedHandler) ReadAnswerAuthor(ctx context.Context, params ReadAnswerAuthorParams) (r ReadAnswerAuthorRes, _ error)
ReadAnswerAuthor implements readAnswerAuthor operation.
Find the attached User of the Answer with the given ID.
GET /answers/{id}/author
func (UnimplementedHandler) ReadAnswerQuestion ¶
func (UnimplementedHandler) ReadAnswerQuestion(ctx context.Context, params ReadAnswerQuestionParams) (r ReadAnswerQuestionRes, _ error)
ReadAnswerQuestion implements readAnswerQuestion operation.
Find the attached Question of the Answer with the given ID.
GET /answers/{id}/question
func (UnimplementedHandler) ReadQuestion ¶
func (UnimplementedHandler) ReadQuestion(ctx context.Context, params ReadQuestionParams) (r ReadQuestionRes, _ error)
ReadQuestion implements readQuestion operation.
Finds the Question with the requested ID and returns it.
GET /questions/{id}
func (UnimplementedHandler) ReadQuestionAuthor ¶
func (UnimplementedHandler) ReadQuestionAuthor(ctx context.Context, params ReadQuestionAuthorParams) (r ReadQuestionAuthorRes, _ error)
ReadQuestionAuthor implements readQuestionAuthor operation.
Find the attached User of the Question with the given ID.
GET /questions/{id}/author
func (UnimplementedHandler) ReadTag ¶
func (UnimplementedHandler) ReadTag(ctx context.Context, params ReadTagParams) (r ReadTagRes, _ error)
ReadTag implements readTag operation.
Finds the Tag with the requested ID and returns it.
GET /tags/{id}
func (UnimplementedHandler) ReadUser ¶
func (UnimplementedHandler) ReadUser(ctx context.Context, params ReadUserParams) (r ReadUserRes, _ error)
ReadUser implements readUser operation.
Finds the User with the requested ID and returns it.
GET /users/{id}
func (UnimplementedHandler) UpdateAnswer ¶
func (UnimplementedHandler) UpdateAnswer(ctx context.Context, req *UpdateAnswerReq, params UpdateAnswerParams) (r UpdateAnswerRes, _ error)
UpdateAnswer implements updateAnswer operation.
Updates a Answer and persists changes to storage.
PATCH /answers/{id}
func (UnimplementedHandler) UpdateQuestion ¶
func (UnimplementedHandler) UpdateQuestion(ctx context.Context, req *UpdateQuestionReq, params UpdateQuestionParams) (r UpdateQuestionRes, _ error)
UpdateQuestion implements updateQuestion operation.
Updates a Question and persists changes to storage.
PATCH /questions/{id}
func (UnimplementedHandler) UpdateTag ¶
func (UnimplementedHandler) UpdateTag(ctx context.Context, req *UpdateTagReq, params UpdateTagParams) (r UpdateTagRes, _ error)
UpdateTag implements updateTag operation.
Updates a Tag and persists changes to storage.
PATCH /tags/{id}
func (UnimplementedHandler) UpdateUser ¶
func (UnimplementedHandler) UpdateUser(ctx context.Context, req *UpdateUserReq, params UpdateUserParams) (r UpdateUserRes, _ error)
UpdateUser implements updateUser operation.
Updates a User and persists changes to storage.
PATCH /users/{id}
type UpdateAnswerParams ¶
type UpdateAnswerParams struct { // ID of the Answer. ID int }
UpdateAnswerParams is parameters of updateAnswer operation.
type UpdateAnswerReq ¶
type UpdateAnswerReq struct { Content OptString `json:"content"` Likes OptInt `json:"likes"` UpdatedAt OptDateTime `json:"updated_at"` IsAcceptedAnswer OptBool `json:"is_accepted_answer"` Question OptInt `json:"question"` Author OptInt `json:"author"` }
func (*UpdateAnswerReq) Decode ¶
func (s *UpdateAnswerReq) Decode(d *jx.Decoder) error
Decode decodes UpdateAnswerReq from json.
func (*UpdateAnswerReq) Encode ¶
func (s *UpdateAnswerReq) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*UpdateAnswerReq) GetAuthor ¶
func (s *UpdateAnswerReq) GetAuthor() OptInt
GetAuthor returns the value of Author.
func (*UpdateAnswerReq) GetContent ¶
func (s *UpdateAnswerReq) GetContent() OptString
GetContent returns the value of Content.
func (*UpdateAnswerReq) GetIsAcceptedAnswer ¶
func (s *UpdateAnswerReq) GetIsAcceptedAnswer() OptBool
GetIsAcceptedAnswer returns the value of IsAcceptedAnswer.
func (*UpdateAnswerReq) GetLikes ¶
func (s *UpdateAnswerReq) GetLikes() OptInt
GetLikes returns the value of Likes.
func (*UpdateAnswerReq) GetQuestion ¶
func (s *UpdateAnswerReq) GetQuestion() OptInt
GetQuestion returns the value of Question.
func (*UpdateAnswerReq) GetUpdatedAt ¶
func (s *UpdateAnswerReq) GetUpdatedAt() OptDateTime
GetUpdatedAt returns the value of UpdatedAt.
func (*UpdateAnswerReq) MarshalJSON ¶
func (s *UpdateAnswerReq) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*UpdateAnswerReq) SetAuthor ¶
func (s *UpdateAnswerReq) SetAuthor(val OptInt)
SetAuthor sets the value of Author.
func (*UpdateAnswerReq) SetContent ¶
func (s *UpdateAnswerReq) SetContent(val OptString)
SetContent sets the value of Content.
func (*UpdateAnswerReq) SetIsAcceptedAnswer ¶
func (s *UpdateAnswerReq) SetIsAcceptedAnswer(val OptBool)
SetIsAcceptedAnswer sets the value of IsAcceptedAnswer.
func (*UpdateAnswerReq) SetLikes ¶
func (s *UpdateAnswerReq) SetLikes(val OptInt)
SetLikes sets the value of Likes.
func (*UpdateAnswerReq) SetQuestion ¶
func (s *UpdateAnswerReq) SetQuestion(val OptInt)
SetQuestion sets the value of Question.
func (*UpdateAnswerReq) SetUpdatedAt ¶
func (s *UpdateAnswerReq) SetUpdatedAt(val OptDateTime)
SetUpdatedAt sets the value of UpdatedAt.
func (*UpdateAnswerReq) UnmarshalJSON ¶
func (s *UpdateAnswerReq) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type UpdateAnswerRes ¶
type UpdateAnswerRes interface {
// contains filtered or unexported methods
}
type UpdateQuestionParams ¶
type UpdateQuestionParams struct { // ID of the Question. ID int }
UpdateQuestionParams is parameters of updateQuestion operation.
type UpdateQuestionReq ¶
type UpdateQuestionReq struct { Title OptString `json:"title"` Slug OptString `json:"slug"` Content OptString `json:"content"` UpdatedAt OptDateTime `json:"updated_at"` Views OptInt `json:"views"` Likes OptInt `json:"likes"` Answers []int `json:"answers"` Author OptInt `json:"author"` Tags []int `json:"tags"` }
func (*UpdateQuestionReq) Decode ¶
func (s *UpdateQuestionReq) Decode(d *jx.Decoder) error
Decode decodes UpdateQuestionReq from json.
func (*UpdateQuestionReq) Encode ¶
func (s *UpdateQuestionReq) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*UpdateQuestionReq) GetAnswers ¶
func (s *UpdateQuestionReq) GetAnswers() []int
GetAnswers returns the value of Answers.
func (*UpdateQuestionReq) GetAuthor ¶
func (s *UpdateQuestionReq) GetAuthor() OptInt
GetAuthor returns the value of Author.
func (*UpdateQuestionReq) GetContent ¶
func (s *UpdateQuestionReq) GetContent() OptString
GetContent returns the value of Content.
func (*UpdateQuestionReq) GetLikes ¶
func (s *UpdateQuestionReq) GetLikes() OptInt
GetLikes returns the value of Likes.
func (*UpdateQuestionReq) GetSlug ¶
func (s *UpdateQuestionReq) GetSlug() OptString
GetSlug returns the value of Slug.
func (*UpdateQuestionReq) GetTags ¶
func (s *UpdateQuestionReq) GetTags() []int
GetTags returns the value of Tags.
func (*UpdateQuestionReq) GetTitle ¶
func (s *UpdateQuestionReq) GetTitle() OptString
GetTitle returns the value of Title.
func (*UpdateQuestionReq) GetUpdatedAt ¶
func (s *UpdateQuestionReq) GetUpdatedAt() OptDateTime
GetUpdatedAt returns the value of UpdatedAt.
func (*UpdateQuestionReq) GetViews ¶
func (s *UpdateQuestionReq) GetViews() OptInt
GetViews returns the value of Views.
func (*UpdateQuestionReq) MarshalJSON ¶
func (s *UpdateQuestionReq) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*UpdateQuestionReq) SetAnswers ¶
func (s *UpdateQuestionReq) SetAnswers(val []int)
SetAnswers sets the value of Answers.
func (*UpdateQuestionReq) SetAuthor ¶
func (s *UpdateQuestionReq) SetAuthor(val OptInt)
SetAuthor sets the value of Author.
func (*UpdateQuestionReq) SetContent ¶
func (s *UpdateQuestionReq) SetContent(val OptString)
SetContent sets the value of Content.
func (*UpdateQuestionReq) SetLikes ¶
func (s *UpdateQuestionReq) SetLikes(val OptInt)
SetLikes sets the value of Likes.
func (*UpdateQuestionReq) SetSlug ¶
func (s *UpdateQuestionReq) SetSlug(val OptString)
SetSlug sets the value of Slug.
func (*UpdateQuestionReq) SetTags ¶
func (s *UpdateQuestionReq) SetTags(val []int)
SetTags sets the value of Tags.
func (*UpdateQuestionReq) SetTitle ¶
func (s *UpdateQuestionReq) SetTitle(val OptString)
SetTitle sets the value of Title.
func (*UpdateQuestionReq) SetUpdatedAt ¶
func (s *UpdateQuestionReq) SetUpdatedAt(val OptDateTime)
SetUpdatedAt sets the value of UpdatedAt.
func (*UpdateQuestionReq) SetViews ¶
func (s *UpdateQuestionReq) SetViews(val OptInt)
SetViews sets the value of Views.
func (*UpdateQuestionReq) UnmarshalJSON ¶
func (s *UpdateQuestionReq) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type UpdateQuestionRes ¶
type UpdateQuestionRes interface {
// contains filtered or unexported methods
}
type UpdateTagParams ¶
type UpdateTagParams struct { // ID of the Tag. ID int }
UpdateTagParams is parameters of updateTag operation.
type UpdateTagReq ¶
func (*UpdateTagReq) Decode ¶
func (s *UpdateTagReq) Decode(d *jx.Decoder) error
Decode decodes UpdateTagReq from json.
func (*UpdateTagReq) Encode ¶
func (s *UpdateTagReq) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*UpdateTagReq) GetName ¶
func (s *UpdateTagReq) GetName() OptString
GetName returns the value of Name.
func (*UpdateTagReq) GetQuestions ¶
func (s *UpdateTagReq) GetQuestions() []int
GetQuestions returns the value of Questions.
func (*UpdateTagReq) MarshalJSON ¶
func (s *UpdateTagReq) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*UpdateTagReq) SetName ¶
func (s *UpdateTagReq) SetName(val OptString)
SetName sets the value of Name.
func (*UpdateTagReq) SetQuestions ¶
func (s *UpdateTagReq) SetQuestions(val []int)
SetQuestions sets the value of Questions.
func (*UpdateTagReq) UnmarshalJSON ¶
func (s *UpdateTagReq) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type UpdateTagRes ¶
type UpdateTagRes interface {
// contains filtered or unexported methods
}
type UpdateUserParams ¶
type UpdateUserParams struct { // ID of the User. ID int }
UpdateUserParams is parameters of updateUser operation.
type UpdateUserReq ¶
type UpdateUserReq struct { Username OptString `json:"username"` Email OptString `json:"email"` Password OptString `json:"password"` LastLogin OptDateTime `json:"last_login"` Questions []int `json:"questions"` Answers []int `json:"answers"` Tags []int `json:"tags"` }
func (*UpdateUserReq) Decode ¶
func (s *UpdateUserReq) Decode(d *jx.Decoder) error
Decode decodes UpdateUserReq from json.
func (*UpdateUserReq) Encode ¶
func (s *UpdateUserReq) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*UpdateUserReq) GetAnswers ¶
func (s *UpdateUserReq) GetAnswers() []int
GetAnswers returns the value of Answers.
func (*UpdateUserReq) GetEmail ¶
func (s *UpdateUserReq) GetEmail() OptString
GetEmail returns the value of Email.
func (*UpdateUserReq) GetLastLogin ¶
func (s *UpdateUserReq) GetLastLogin() OptDateTime
GetLastLogin returns the value of LastLogin.
func (*UpdateUserReq) GetPassword ¶
func (s *UpdateUserReq) GetPassword() OptString
GetPassword returns the value of Password.
func (*UpdateUserReq) GetQuestions ¶
func (s *UpdateUserReq) GetQuestions() []int
GetQuestions returns the value of Questions.
func (*UpdateUserReq) GetTags ¶
func (s *UpdateUserReq) GetTags() []int
GetTags returns the value of Tags.
func (*UpdateUserReq) GetUsername ¶
func (s *UpdateUserReq) GetUsername() OptString
GetUsername returns the value of Username.
func (*UpdateUserReq) MarshalJSON ¶
func (s *UpdateUserReq) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*UpdateUserReq) SetAnswers ¶
func (s *UpdateUserReq) SetAnswers(val []int)
SetAnswers sets the value of Answers.
func (*UpdateUserReq) SetEmail ¶
func (s *UpdateUserReq) SetEmail(val OptString)
SetEmail sets the value of Email.
func (*UpdateUserReq) SetLastLogin ¶
func (s *UpdateUserReq) SetLastLogin(val OptDateTime)
SetLastLogin sets the value of LastLogin.
func (*UpdateUserReq) SetPassword ¶
func (s *UpdateUserReq) SetPassword(val OptString)
SetPassword sets the value of Password.
func (*UpdateUserReq) SetQuestions ¶
func (s *UpdateUserReq) SetQuestions(val []int)
SetQuestions sets the value of Questions.
func (*UpdateUserReq) SetTags ¶
func (s *UpdateUserReq) SetTags(val []int)
SetTags sets the value of Tags.
func (*UpdateUserReq) SetUsername ¶
func (s *UpdateUserReq) SetUsername(val OptString)
SetUsername sets the value of Username.
func (*UpdateUserReq) UnmarshalJSON ¶
func (s *UpdateUserReq) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type UpdateUserRes ¶
type UpdateUserRes interface {
// contains filtered or unexported methods
}
type UserAnswersList ¶
type UserAnswersList struct { ID int `json:"id"` Content string `json:"content"` Likes int `json:"likes"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` IsAcceptedAnswer bool `json:"is_accepted_answer"` }
Ref: #/components/schemas/User_AnswersList
func NewUserAnswersList ¶
func NewUserAnswersList(e *ent.Answer) *UserAnswersList
func NewUserAnswersLists ¶
func NewUserAnswersLists(es []*ent.Answer) []UserAnswersList
func (*UserAnswersList) Decode ¶
func (s *UserAnswersList) Decode(d *jx.Decoder) error
Decode decodes UserAnswersList from json.
func (*UserAnswersList) Elem ¶
func (a *UserAnswersList) Elem() UserAnswersList
func (*UserAnswersList) Encode ¶
func (s *UserAnswersList) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*UserAnswersList) GetContent ¶
func (s *UserAnswersList) GetContent() string
GetContent returns the value of Content.
func (*UserAnswersList) GetCreatedAt ¶
func (s *UserAnswersList) GetCreatedAt() time.Time
GetCreatedAt returns the value of CreatedAt.
func (*UserAnswersList) GetID ¶
func (s *UserAnswersList) GetID() int
GetID returns the value of ID.
func (*UserAnswersList) GetIsAcceptedAnswer ¶
func (s *UserAnswersList) GetIsAcceptedAnswer() bool
GetIsAcceptedAnswer returns the value of IsAcceptedAnswer.
func (*UserAnswersList) GetLikes ¶
func (s *UserAnswersList) GetLikes() int
GetLikes returns the value of Likes.
func (*UserAnswersList) GetUpdatedAt ¶
func (s *UserAnswersList) GetUpdatedAt() time.Time
GetUpdatedAt returns the value of UpdatedAt.
func (*UserAnswersList) MarshalJSON ¶
func (s *UserAnswersList) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*UserAnswersList) SetContent ¶
func (s *UserAnswersList) SetContent(val string)
SetContent sets the value of Content.
func (*UserAnswersList) SetCreatedAt ¶
func (s *UserAnswersList) SetCreatedAt(val time.Time)
SetCreatedAt sets the value of CreatedAt.
func (*UserAnswersList) SetID ¶
func (s *UserAnswersList) SetID(val int)
SetID sets the value of ID.
func (*UserAnswersList) SetIsAcceptedAnswer ¶
func (s *UserAnswersList) SetIsAcceptedAnswer(val bool)
SetIsAcceptedAnswer sets the value of IsAcceptedAnswer.
func (*UserAnswersList) SetLikes ¶
func (s *UserAnswersList) SetLikes(val int)
SetLikes sets the value of Likes.
func (*UserAnswersList) SetUpdatedAt ¶
func (s *UserAnswersList) SetUpdatedAt(val time.Time)
SetUpdatedAt sets the value of UpdatedAt.
func (*UserAnswersList) UnmarshalJSON ¶
func (s *UserAnswersList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type UserCreate ¶
type UserCreate struct { ID int `json:"id"` Username string `json:"username"` Email string `json:"email"` CreatedAt time.Time `json:"created_at"` LastLogin time.Time `json:"last_login"` }
Ref: #/components/schemas/UserCreate
func NewUserCreate ¶
func NewUserCreate(e *ent.User) *UserCreate
func NewUserCreates ¶
func NewUserCreates(es []*ent.User) []UserCreate
func (*UserCreate) Decode ¶
func (s *UserCreate) Decode(d *jx.Decoder) error
Decode decodes UserCreate from json.
func (*UserCreate) Elem ¶
func (u *UserCreate) Elem() UserCreate
func (*UserCreate) Encode ¶
func (s *UserCreate) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*UserCreate) GetCreatedAt ¶
func (s *UserCreate) GetCreatedAt() time.Time
GetCreatedAt returns the value of CreatedAt.
func (*UserCreate) GetEmail ¶
func (s *UserCreate) GetEmail() string
GetEmail returns the value of Email.
func (*UserCreate) GetLastLogin ¶
func (s *UserCreate) GetLastLogin() time.Time
GetLastLogin returns the value of LastLogin.
func (*UserCreate) GetUsername ¶
func (s *UserCreate) GetUsername() string
GetUsername returns the value of Username.
func (*UserCreate) MarshalJSON ¶
func (s *UserCreate) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*UserCreate) SetCreatedAt ¶
func (s *UserCreate) SetCreatedAt(val time.Time)
SetCreatedAt sets the value of CreatedAt.
func (*UserCreate) SetEmail ¶
func (s *UserCreate) SetEmail(val string)
SetEmail sets the value of Email.
func (*UserCreate) SetLastLogin ¶
func (s *UserCreate) SetLastLogin(val time.Time)
SetLastLogin sets the value of LastLogin.
func (*UserCreate) SetUsername ¶
func (s *UserCreate) SetUsername(val string)
SetUsername sets the value of Username.
func (*UserCreate) UnmarshalJSON ¶
func (s *UserCreate) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type UserList ¶
type UserList struct { ID int `json:"id"` Username string `json:"username"` Email string `json:"email"` CreatedAt time.Time `json:"created_at"` LastLogin time.Time `json:"last_login"` }
Ref: #/components/schemas/UserList
func NewUserList ¶
func NewUserLists ¶
func (*UserList) GetCreatedAt ¶
GetCreatedAt returns the value of CreatedAt.
func (*UserList) GetLastLogin ¶
GetLastLogin returns the value of LastLogin.
func (*UserList) GetUsername ¶
GetUsername returns the value of Username.
func (*UserList) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*UserList) SetCreatedAt ¶
SetCreatedAt sets the value of CreatedAt.
func (*UserList) SetLastLogin ¶
SetLastLogin sets the value of LastLogin.
func (*UserList) SetUsername ¶
SetUsername sets the value of Username.
func (*UserList) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type UserQuestionsList ¶
type UserQuestionsList struct { ID int `json:"id"` Title string `json:"title"` Slug string `json:"slug"` Content string `json:"content"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` Views int `json:"views"` Likes int `json:"likes"` }
Ref: #/components/schemas/User_QuestionsList
func NewUserQuestionsList ¶
func NewUserQuestionsList(e *ent.Question) *UserQuestionsList
func NewUserQuestionsLists ¶
func NewUserQuestionsLists(es []*ent.Question) []UserQuestionsList
func (*UserQuestionsList) Decode ¶
func (s *UserQuestionsList) Decode(d *jx.Decoder) error
Decode decodes UserQuestionsList from json.
func (*UserQuestionsList) Elem ¶
func (q *UserQuestionsList) Elem() UserQuestionsList
func (*UserQuestionsList) Encode ¶
func (s *UserQuestionsList) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*UserQuestionsList) GetContent ¶
func (s *UserQuestionsList) GetContent() string
GetContent returns the value of Content.
func (*UserQuestionsList) GetCreatedAt ¶
func (s *UserQuestionsList) GetCreatedAt() time.Time
GetCreatedAt returns the value of CreatedAt.
func (*UserQuestionsList) GetID ¶
func (s *UserQuestionsList) GetID() int
GetID returns the value of ID.
func (*UserQuestionsList) GetLikes ¶
func (s *UserQuestionsList) GetLikes() int
GetLikes returns the value of Likes.
func (*UserQuestionsList) GetSlug ¶
func (s *UserQuestionsList) GetSlug() string
GetSlug returns the value of Slug.
func (*UserQuestionsList) GetTitle ¶
func (s *UserQuestionsList) GetTitle() string
GetTitle returns the value of Title.
func (*UserQuestionsList) GetUpdatedAt ¶
func (s *UserQuestionsList) GetUpdatedAt() time.Time
GetUpdatedAt returns the value of UpdatedAt.
func (*UserQuestionsList) GetViews ¶
func (s *UserQuestionsList) GetViews() int
GetViews returns the value of Views.
func (*UserQuestionsList) MarshalJSON ¶
func (s *UserQuestionsList) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*UserQuestionsList) SetContent ¶
func (s *UserQuestionsList) SetContent(val string)
SetContent sets the value of Content.
func (*UserQuestionsList) SetCreatedAt ¶
func (s *UserQuestionsList) SetCreatedAt(val time.Time)
SetCreatedAt sets the value of CreatedAt.
func (*UserQuestionsList) SetID ¶
func (s *UserQuestionsList) SetID(val int)
SetID sets the value of ID.
func (*UserQuestionsList) SetLikes ¶
func (s *UserQuestionsList) SetLikes(val int)
SetLikes sets the value of Likes.
func (*UserQuestionsList) SetSlug ¶
func (s *UserQuestionsList) SetSlug(val string)
SetSlug sets the value of Slug.
func (*UserQuestionsList) SetTitle ¶
func (s *UserQuestionsList) SetTitle(val string)
SetTitle sets the value of Title.
func (*UserQuestionsList) SetUpdatedAt ¶
func (s *UserQuestionsList) SetUpdatedAt(val time.Time)
SetUpdatedAt sets the value of UpdatedAt.
func (*UserQuestionsList) SetViews ¶
func (s *UserQuestionsList) SetViews(val int)
SetViews sets the value of Views.
func (*UserQuestionsList) UnmarshalJSON ¶
func (s *UserQuestionsList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type UserRead ¶
type UserRead struct { ID int `json:"id"` Username string `json:"username"` Email string `json:"email"` CreatedAt time.Time `json:"created_at"` LastLogin time.Time `json:"last_login"` }
Ref: #/components/schemas/UserRead
func NewUserRead ¶
func NewUserReads ¶
func (*UserRead) GetCreatedAt ¶
GetCreatedAt returns the value of CreatedAt.
func (*UserRead) GetLastLogin ¶
GetLastLogin returns the value of LastLogin.
func (*UserRead) GetUsername ¶
GetUsername returns the value of Username.
func (*UserRead) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*UserRead) SetCreatedAt ¶
SetCreatedAt sets the value of CreatedAt.
func (*UserRead) SetLastLogin ¶
SetLastLogin sets the value of LastLogin.
func (*UserRead) SetUsername ¶
SetUsername sets the value of Username.
func (*UserRead) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type UserTagsList ¶
Ref: #/components/schemas/User_TagsList
func NewUserTagsList ¶
func NewUserTagsList(e *ent.Tag) *UserTagsList
func NewUserTagsLists ¶
func NewUserTagsLists(es []*ent.Tag) []UserTagsList
func (*UserTagsList) Decode ¶
func (s *UserTagsList) Decode(d *jx.Decoder) error
Decode decodes UserTagsList from json.
func (*UserTagsList) Elem ¶
func (t *UserTagsList) Elem() UserTagsList
func (*UserTagsList) Encode ¶
func (s *UserTagsList) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*UserTagsList) GetName ¶
func (s *UserTagsList) GetName() string
GetName returns the value of Name.
func (*UserTagsList) MarshalJSON ¶
func (s *UserTagsList) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*UserTagsList) SetName ¶
func (s *UserTagsList) SetName(val string)
SetName sets the value of Name.
func (*UserTagsList) UnmarshalJSON ¶
func (s *UserTagsList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type UserUpdate ¶
type UserUpdate struct { ID int `json:"id"` Username string `json:"username"` Email string `json:"email"` CreatedAt time.Time `json:"created_at"` LastLogin time.Time `json:"last_login"` }
Ref: #/components/schemas/UserUpdate
func NewUserUpdate ¶
func NewUserUpdate(e *ent.User) *UserUpdate
func NewUserUpdates ¶
func NewUserUpdates(es []*ent.User) []UserUpdate
func (*UserUpdate) Decode ¶
func (s *UserUpdate) Decode(d *jx.Decoder) error
Decode decodes UserUpdate from json.
func (*UserUpdate) Elem ¶
func (u *UserUpdate) Elem() UserUpdate
func (*UserUpdate) Encode ¶
func (s *UserUpdate) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*UserUpdate) GetCreatedAt ¶
func (s *UserUpdate) GetCreatedAt() time.Time
GetCreatedAt returns the value of CreatedAt.
func (*UserUpdate) GetEmail ¶
func (s *UserUpdate) GetEmail() string
GetEmail returns the value of Email.
func (*UserUpdate) GetLastLogin ¶
func (s *UserUpdate) GetLastLogin() time.Time
GetLastLogin returns the value of LastLogin.
func (*UserUpdate) GetUsername ¶
func (s *UserUpdate) GetUsername() string
GetUsername returns the value of Username.
func (*UserUpdate) MarshalJSON ¶
func (s *UserUpdate) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*UserUpdate) SetCreatedAt ¶
func (s *UserUpdate) SetCreatedAt(val time.Time)
SetCreatedAt sets the value of CreatedAt.
func (*UserUpdate) SetEmail ¶
func (s *UserUpdate) SetEmail(val string)
SetEmail sets the value of Email.
func (*UserUpdate) SetLastLogin ¶
func (s *UserUpdate) SetLastLogin(val time.Time)
SetLastLogin sets the value of LastLogin.
func (*UserUpdate) SetUsername ¶
func (s *UserUpdate) SetUsername(val string)
SetUsername sets the value of Username.
func (*UserUpdate) UnmarshalJSON ¶
func (s *UserUpdate) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
Source Files ¶
- oas_cfg_gen.go
- oas_client_gen.go
- oas_handlers_gen.go
- oas_interfaces_gen.go
- oas_json_gen.go
- oas_middleware_gen.go
- oas_parameters_gen.go
- oas_request_decoders_gen.go
- oas_request_encoders_gen.go
- oas_response_decoders_gen.go
- oas_response_encoders_gen.go
- oas_router_gen.go
- oas_schemas_gen.go
- oas_server_gen.go
- oas_unimplemented_gen.go
- oas_validators_gen.go
- ogent.go
- responses.go