Documentation
¶
Overview ¶
Package api provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.6.0 DO NOT EDIT.
Index ¶
- Constants
- func GetSwagger() (swagger *openapi3.T, err error)
- func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error)
- func RegisterHandlers(router gin.IRouter, si ServerInterface)
- func RegisterHandlersWithOptions(router gin.IRouter, si ServerInterface, options GinServerOptions)
- type AuthResponse
- type AuthSuccessResponse
- type AuthSuccessResponseCode
- type AuthSuccessResponseMessage
- type CreateItem201JSONResponse
- type CreateItem201ResponseHeaders
- type CreateItem400JSONResponse
- type CreateItem400ResponseHeaders
- type CreateItem500JSONResponse
- type CreateItem500ResponseHeaders
- type CreateItemJSONRequestBody
- type CreateItemParams
- type CreateItemRequest
- type CreateItemRequestObject
- type CreateItemRequestStatus
- type CreateItemResponseObject
- type DeleteItem200JSONResponse
- type DeleteItem200ResponseHeaders
- type DeleteItem400JSONResponse
- type DeleteItem400ResponseHeaders
- type DeleteItem404JSONResponse
- type DeleteItem404ResponseHeaders
- type DeleteItem500JSONResponse
- type DeleteItem500ResponseHeaders
- type DeleteItemParams
- type DeleteItemRequestObject
- type DeleteItemResponseObject
- type EmptySuccessResponse
- type EmptySuccessResponseCode
- type EmptySuccessResponseMessage
- type ErrorResponse
- type ErrorResponseDetails0
- type ErrorResponseDetails1
- type ErrorResponseDetails2
- type ErrorResponse_Details
- func (t ErrorResponse_Details) AsErrorResponseDetails0() (ErrorResponseDetails0, error)
- func (t ErrorResponse_Details) AsErrorResponseDetails1() (ErrorResponseDetails1, error)
- func (t ErrorResponse_Details) AsErrorResponseDetails2() (ErrorResponseDetails2, error)
- func (t *ErrorResponse_Details) FromErrorResponseDetails0(v ErrorResponseDetails0) error
- func (t *ErrorResponse_Details) FromErrorResponseDetails1(v ErrorResponseDetails1) error
- func (t *ErrorResponse_Details) FromErrorResponseDetails2(v ErrorResponseDetails2) error
- func (t ErrorResponse_Details) MarshalJSON() ([]byte, error)
- func (t *ErrorResponse_Details) MergeErrorResponseDetails0(v ErrorResponseDetails0) error
- func (t *ErrorResponse_Details) MergeErrorResponseDetails1(v ErrorResponseDetails1) error
- func (t *ErrorResponse_Details) MergeErrorResponseDetails2(v ErrorResponseDetails2) error
- func (t *ErrorResponse_Details) UnmarshalJSON(b []byte) error
- type GetItem200JSONResponse
- type GetItem200ResponseHeaders
- type GetItem400JSONResponse
- type GetItem400ResponseHeaders
- type GetItem404JSONResponse
- type GetItem404ResponseHeaders
- type GetItem500JSONResponse
- type GetItem500ResponseHeaders
- type GetItemParams
- type GetItemRequestObject
- type GetItemResponseObject
- type GetProfile200JSONResponse
- type GetProfile200ResponseHeaders
- type GetProfile400JSONResponse
- type GetProfile400ResponseHeaders
- type GetProfile401JSONResponse
- type GetProfile401ResponseHeaders
- type GetProfile404JSONResponse
- type GetProfile404ResponseHeaders
- type GetProfile500JSONResponse
- type GetProfile500ResponseHeaders
- type GetProfileParams
- type GetProfileRequestObject
- type GetProfileResponseObject
- type GinServerOptions
- type ItemResponse
- type ItemSuccessResponse
- type ItemSuccessResponseCode
- type ItemSuccessResponseMessage
- type ListItems200JSONResponse
- type ListItems200ResponseHeaders
- type ListItems400JSONResponse
- type ListItems400ResponseHeaders
- type ListItems500JSONResponse
- type ListItems500ResponseHeaders
- type ListItemsParams
- type ListItemsParamsStatus
- type ListItemsRequestObject
- type ListItemsResponseObject
- type LoginRequest
- type LoginUser200JSONResponse
- type LoginUser200ResponseHeaders
- type LoginUser400JSONResponse
- type LoginUser400ResponseHeaders
- type LoginUser401JSONResponse
- type LoginUser401ResponseHeaders
- type LoginUser500JSONResponse
- type LoginUser500ResponseHeaders
- type LoginUserJSONRequestBody
- type LoginUserParams
- type LoginUserRequestObject
- type LoginUserResponseObject
- type MiddlewareFunc
- type PagedItemsResponse
- type PagedItemsSuccessResponse
- type PagedItemsSuccessResponseCode
- type PagedItemsSuccessResponseMessage
- type RefreshRequest
- type RefreshToken200JSONResponse
- type RefreshToken200ResponseHeaders
- type RefreshToken400JSONResponse
- type RefreshToken400ResponseHeaders
- type RefreshToken401JSONResponse
- type RefreshToken401ResponseHeaders
- type RefreshToken500JSONResponse
- type RefreshToken500ResponseHeaders
- type RefreshTokenJSONRequestBody
- type RefreshTokenParams
- type RefreshTokenRequestObject
- type RefreshTokenResponseObject
- type RegisterRequest
- type RegisterUser201JSONResponse
- type RegisterUser201ResponseHeaders
- type RegisterUser400JSONResponse
- type RegisterUser400ResponseHeaders
- type RegisterUser409JSONResponse
- type RegisterUser409ResponseHeaders
- type RegisterUser500JSONResponse
- type RegisterUser500ResponseHeaders
- type RegisterUserJSONRequestBody
- type RegisterUserParams
- type RegisterUserRequestObject
- type RegisterUserResponseObject
- type Server
- func (s *Server) CreateItem(ctx context.Context, request CreateItemRequestObject) (CreateItemResponseObject, error)
- func (s *Server) DeleteItem(ctx context.Context, request DeleteItemRequestObject) (DeleteItemResponseObject, error)
- func (s *Server) GetItem(ctx context.Context, request GetItemRequestObject) (GetItemResponseObject, error)
- func (s *Server) GetProfile(ctx context.Context, _ GetProfileRequestObject) (GetProfileResponseObject, error)
- func (s *Server) ListItems(ctx context.Context, request ListItemsRequestObject) (ListItemsResponseObject, error)
- func (s *Server) LoginUser(ctx context.Context, request LoginUserRequestObject) (LoginUserResponseObject, error)
- func (s *Server) RefreshToken(ctx context.Context, request RefreshTokenRequestObject) (RefreshTokenResponseObject, error)
- func (s *Server) RegisterUser(ctx context.Context, request RegisterUserRequestObject) (RegisterUserResponseObject, error)
- func (s *Server) UpdateItem(ctx context.Context, request UpdateItemRequestObject) (UpdateItemResponseObject, error)
- type ServerInterface
- type ServerInterfaceWrapper
- func (siw *ServerInterfaceWrapper) CreateItem(c *gin.Context)
- func (siw *ServerInterfaceWrapper) DeleteItem(c *gin.Context)
- func (siw *ServerInterfaceWrapper) GetItem(c *gin.Context)
- func (siw *ServerInterfaceWrapper) GetProfile(c *gin.Context)
- func (siw *ServerInterfaceWrapper) ListItems(c *gin.Context)
- func (siw *ServerInterfaceWrapper) LoginUser(c *gin.Context)
- func (siw *ServerInterfaceWrapper) RefreshToken(c *gin.Context)
- func (siw *ServerInterfaceWrapper) RegisterUser(c *gin.Context)
- func (siw *ServerInterfaceWrapper) UpdateItem(c *gin.Context)
- type StrictHandlerFunc
- type StrictMiddlewareFunc
- type StrictServerInterface
- type UpdateItem200JSONResponse
- type UpdateItem200ResponseHeaders
- type UpdateItem400JSONResponse
- type UpdateItem400ResponseHeaders
- type UpdateItem404JSONResponse
- type UpdateItem404ResponseHeaders
- type UpdateItem500JSONResponse
- type UpdateItem500ResponseHeaders
- type UpdateItemJSONRequestBody
- type UpdateItemParams
- type UpdateItemRequest
- type UpdateItemRequestObject
- type UpdateItemRequestStatus
- type UpdateItemResponseObject
- type UserResponse
- type UserSuccessResponse
- type UserSuccessResponseCode
- type UserSuccessResponseMessage
- type XRequestID
Constants ¶
const (
BearerAuthScopes = "BearerAuth.Scopes"
)
Variables ¶
This section is empty.
Functions ¶
func GetSwagger ¶
GetSwagger returns the Swagger specification corresponding to the generated code in this file. The external references of Swagger specification are resolved. The logic of resolving external references is tightly connected to "import-mapping" feature. Externally referenced files must be embedded in the corresponding golang packages. Urls can be supported but this task was out of the scope.
func PathToRawSpec ¶
Constructs a synthetic filesystem for resolving external references when loading openapi specifications.
func RegisterHandlers ¶
func RegisterHandlers(router gin.IRouter, si ServerInterface)
RegisterHandlers creates http.Handler with routing matching OpenAPI spec.
func RegisterHandlersWithOptions ¶
func RegisterHandlersWithOptions(router gin.IRouter, si ServerInterface, options GinServerOptions)
RegisterHandlersWithOptions creates http.Handler with additional options
Types ¶
type AuthResponse ¶
type AuthResponse struct {
AccessToken string `json:"access_token"`
RefreshToken string `json:"refresh_token"`
User UserResponse `json:"user"`
}
AuthResponse defines model for AuthResponse.
type AuthSuccessResponse ¶
type AuthSuccessResponse struct {
Code AuthSuccessResponseCode `json:"code"`
Data AuthResponse `json:"data"`
Message AuthSuccessResponseMessage `json:"message"`
}
AuthSuccessResponse defines model for AuthSuccessResponse.
type AuthSuccessResponseCode ¶
type AuthSuccessResponseCode int
AuthSuccessResponseCode defines model for AuthSuccessResponse.Code.
const (
AuthSuccessResponseCodeN0 AuthSuccessResponseCode = 0
)
Defines values for AuthSuccessResponseCode.
func (AuthSuccessResponseCode) Valid ¶
func (e AuthSuccessResponseCode) Valid() bool
Valid indicates whether the value is a known member of the AuthSuccessResponseCode enum.
type AuthSuccessResponseMessage ¶
type AuthSuccessResponseMessage string
AuthSuccessResponseMessage defines model for AuthSuccessResponse.Message.
const (
AuthSuccessResponseMessageSuccess AuthSuccessResponseMessage = "success"
)
Defines values for AuthSuccessResponseMessage.
func (AuthSuccessResponseMessage) Valid ¶
func (e AuthSuccessResponseMessage) Valid() bool
Valid indicates whether the value is a known member of the AuthSuccessResponseMessage enum.
type CreateItem201JSONResponse ¶
type CreateItem201JSONResponse struct {
Body ItemSuccessResponse
Headers CreateItem201ResponseHeaders
}
func (CreateItem201JSONResponse) VisitCreateItemResponse ¶
func (response CreateItem201JSONResponse) VisitCreateItemResponse(w http.ResponseWriter) error
type CreateItem201ResponseHeaders ¶
type CreateItem201ResponseHeaders struct {
XRequestID string
}
type CreateItem400JSONResponse ¶
type CreateItem400JSONResponse struct {
Body ErrorResponse
Headers CreateItem400ResponseHeaders
}
func (CreateItem400JSONResponse) VisitCreateItemResponse ¶
func (response CreateItem400JSONResponse) VisitCreateItemResponse(w http.ResponseWriter) error
type CreateItem400ResponseHeaders ¶
type CreateItem400ResponseHeaders struct {
XRequestID string
}
type CreateItem500JSONResponse ¶
type CreateItem500JSONResponse struct {
Body ErrorResponse
Headers CreateItem500ResponseHeaders
}
func (CreateItem500JSONResponse) VisitCreateItemResponse ¶
func (response CreateItem500JSONResponse) VisitCreateItemResponse(w http.ResponseWriter) error
type CreateItem500ResponseHeaders ¶
type CreateItem500ResponseHeaders struct {
XRequestID string
}
type CreateItemJSONRequestBody ¶
type CreateItemJSONRequestBody = CreateItemRequest
CreateItemJSONRequestBody defines body for CreateItem for application/json ContentType.
type CreateItemParams ¶
type CreateItemParams struct {
// XRequestID Optional caller-supplied request ID used for request/response log correlation.
XRequestID *XRequestID `json:"X-Request-ID,omitempty"`
}
CreateItemParams defines parameters for CreateItem.
type CreateItemRequest ¶
type CreateItemRequest struct {
Description *string `json:"description,omitempty"`
Status *CreateItemRequestStatus `json:"status,omitempty"`
Title string `json:"title"`
}
CreateItemRequest defines model for CreateItemRequest.
type CreateItemRequestObject ¶
type CreateItemRequestObject struct {
Params CreateItemParams
Body *CreateItemJSONRequestBody
}
type CreateItemRequestStatus ¶
type CreateItemRequestStatus string
CreateItemRequestStatus defines model for CreateItemRequest.Status.
const ( CreateItemRequestStatusActive CreateItemRequestStatus = "active" CreateItemRequestStatusInactive CreateItemRequestStatus = "inactive" )
Defines values for CreateItemRequestStatus.
func (CreateItemRequestStatus) Valid ¶
func (e CreateItemRequestStatus) Valid() bool
Valid indicates whether the value is a known member of the CreateItemRequestStatus enum.
type CreateItemResponseObject ¶
type CreateItemResponseObject interface {
VisitCreateItemResponse(w http.ResponseWriter) error
}
type DeleteItem200JSONResponse ¶
type DeleteItem200JSONResponse struct {
Body EmptySuccessResponse
Headers DeleteItem200ResponseHeaders
}
func (DeleteItem200JSONResponse) VisitDeleteItemResponse ¶
func (response DeleteItem200JSONResponse) VisitDeleteItemResponse(w http.ResponseWriter) error
type DeleteItem200ResponseHeaders ¶
type DeleteItem200ResponseHeaders struct {
XRequestID string
}
type DeleteItem400JSONResponse ¶
type DeleteItem400JSONResponse struct {
Body ErrorResponse
Headers DeleteItem400ResponseHeaders
}
func (DeleteItem400JSONResponse) VisitDeleteItemResponse ¶
func (response DeleteItem400JSONResponse) VisitDeleteItemResponse(w http.ResponseWriter) error
type DeleteItem400ResponseHeaders ¶
type DeleteItem400ResponseHeaders struct {
XRequestID string
}
type DeleteItem404JSONResponse ¶
type DeleteItem404JSONResponse struct {
Body ErrorResponse
Headers DeleteItem404ResponseHeaders
}
func (DeleteItem404JSONResponse) VisitDeleteItemResponse ¶
func (response DeleteItem404JSONResponse) VisitDeleteItemResponse(w http.ResponseWriter) error
type DeleteItem404ResponseHeaders ¶
type DeleteItem404ResponseHeaders struct {
XRequestID string
}
type DeleteItem500JSONResponse ¶
type DeleteItem500JSONResponse struct {
Body ErrorResponse
Headers DeleteItem500ResponseHeaders
}
func (DeleteItem500JSONResponse) VisitDeleteItemResponse ¶
func (response DeleteItem500JSONResponse) VisitDeleteItemResponse(w http.ResponseWriter) error
type DeleteItem500ResponseHeaders ¶
type DeleteItem500ResponseHeaders struct {
XRequestID string
}
type DeleteItemParams ¶
type DeleteItemParams struct {
// XRequestID Optional caller-supplied request ID used for request/response log correlation.
XRequestID *XRequestID `json:"X-Request-ID,omitempty"`
}
DeleteItemParams defines parameters for DeleteItem.
type DeleteItemRequestObject ¶
type DeleteItemRequestObject struct {
Id int `json:"id"`
Params DeleteItemParams
}
type DeleteItemResponseObject ¶
type DeleteItemResponseObject interface {
VisitDeleteItemResponse(w http.ResponseWriter) error
}
type EmptySuccessResponse ¶
type EmptySuccessResponse struct {
Code EmptySuccessResponseCode `json:"code"`
// Data Null for successful operations without a payload
Data interface{} `json:"data"`
Message EmptySuccessResponseMessage `json:"message"`
}
EmptySuccessResponse defines model for EmptySuccessResponse.
type EmptySuccessResponseCode ¶
type EmptySuccessResponseCode int
EmptySuccessResponseCode defines model for EmptySuccessResponse.Code.
const (
EmptySuccessResponseCodeN0 EmptySuccessResponseCode = 0
)
Defines values for EmptySuccessResponseCode.
func (EmptySuccessResponseCode) Valid ¶
func (e EmptySuccessResponseCode) Valid() bool
Valid indicates whether the value is a known member of the EmptySuccessResponseCode enum.
type EmptySuccessResponseMessage ¶
type EmptySuccessResponseMessage string
EmptySuccessResponseMessage defines model for EmptySuccessResponse.Message.
const (
EmptySuccessResponseMessageSuccess EmptySuccessResponseMessage = "success"
)
Defines values for EmptySuccessResponseMessage.
func (EmptySuccessResponseMessage) Valid ¶
func (e EmptySuccessResponseMessage) Valid() bool
Valid indicates whether the value is a known member of the EmptySuccessResponseMessage enum.
type ErrorResponse ¶
type ErrorResponse struct {
// Code Non-zero application error code
Code int `json:"code"`
// Details Optional structured diagnostics for error handling
Details *ErrorResponse_Details `json:"details,omitempty"`
// Message Human-readable error message
Message string `json:"message"`
// RequestId Request ID for backend log correlation
RequestId string `json:"request_id"`
}
ErrorResponse defines model for ErrorResponse.
type ErrorResponseDetails0 ¶
type ErrorResponseDetails0 map[string]interface{}
ErrorResponseDetails0 defines model for .
type ErrorResponseDetails1 ¶
type ErrorResponseDetails1 = []interface{}
ErrorResponseDetails1 defines model for .
type ErrorResponseDetails2 ¶
type ErrorResponseDetails2 = string
ErrorResponseDetails2 defines model for .
type ErrorResponse_Details ¶
type ErrorResponse_Details struct {
// contains filtered or unexported fields
}
ErrorResponse_Details Optional structured diagnostics for error handling
func (ErrorResponse_Details) AsErrorResponseDetails0 ¶
func (t ErrorResponse_Details) AsErrorResponseDetails0() (ErrorResponseDetails0, error)
AsErrorResponseDetails0 returns the union data inside the ErrorResponse_Details as a ErrorResponseDetails0
func (ErrorResponse_Details) AsErrorResponseDetails1 ¶
func (t ErrorResponse_Details) AsErrorResponseDetails1() (ErrorResponseDetails1, error)
AsErrorResponseDetails1 returns the union data inside the ErrorResponse_Details as a ErrorResponseDetails1
func (ErrorResponse_Details) AsErrorResponseDetails2 ¶
func (t ErrorResponse_Details) AsErrorResponseDetails2() (ErrorResponseDetails2, error)
AsErrorResponseDetails2 returns the union data inside the ErrorResponse_Details as a ErrorResponseDetails2
func (*ErrorResponse_Details) FromErrorResponseDetails0 ¶
func (t *ErrorResponse_Details) FromErrorResponseDetails0(v ErrorResponseDetails0) error
FromErrorResponseDetails0 overwrites any union data inside the ErrorResponse_Details as the provided ErrorResponseDetails0
func (*ErrorResponse_Details) FromErrorResponseDetails1 ¶
func (t *ErrorResponse_Details) FromErrorResponseDetails1(v ErrorResponseDetails1) error
FromErrorResponseDetails1 overwrites any union data inside the ErrorResponse_Details as the provided ErrorResponseDetails1
func (*ErrorResponse_Details) FromErrorResponseDetails2 ¶
func (t *ErrorResponse_Details) FromErrorResponseDetails2(v ErrorResponseDetails2) error
FromErrorResponseDetails2 overwrites any union data inside the ErrorResponse_Details as the provided ErrorResponseDetails2
func (ErrorResponse_Details) MarshalJSON ¶
func (t ErrorResponse_Details) MarshalJSON() ([]byte, error)
func (*ErrorResponse_Details) MergeErrorResponseDetails0 ¶
func (t *ErrorResponse_Details) MergeErrorResponseDetails0(v ErrorResponseDetails0) error
MergeErrorResponseDetails0 performs a merge with any union data inside the ErrorResponse_Details, using the provided ErrorResponseDetails0
func (*ErrorResponse_Details) MergeErrorResponseDetails1 ¶
func (t *ErrorResponse_Details) MergeErrorResponseDetails1(v ErrorResponseDetails1) error
MergeErrorResponseDetails1 performs a merge with any union data inside the ErrorResponse_Details, using the provided ErrorResponseDetails1
func (*ErrorResponse_Details) MergeErrorResponseDetails2 ¶
func (t *ErrorResponse_Details) MergeErrorResponseDetails2(v ErrorResponseDetails2) error
MergeErrorResponseDetails2 performs a merge with any union data inside the ErrorResponse_Details, using the provided ErrorResponseDetails2
func (*ErrorResponse_Details) UnmarshalJSON ¶
func (t *ErrorResponse_Details) UnmarshalJSON(b []byte) error
type GetItem200JSONResponse ¶
type GetItem200JSONResponse struct {
Body ItemSuccessResponse
Headers GetItem200ResponseHeaders
}
func (GetItem200JSONResponse) VisitGetItemResponse ¶
func (response GetItem200JSONResponse) VisitGetItemResponse(w http.ResponseWriter) error
type GetItem200ResponseHeaders ¶
type GetItem200ResponseHeaders struct {
XRequestID string
}
type GetItem400JSONResponse ¶
type GetItem400JSONResponse struct {
Body ErrorResponse
Headers GetItem400ResponseHeaders
}
func (GetItem400JSONResponse) VisitGetItemResponse ¶
func (response GetItem400JSONResponse) VisitGetItemResponse(w http.ResponseWriter) error
type GetItem400ResponseHeaders ¶
type GetItem400ResponseHeaders struct {
XRequestID string
}
type GetItem404JSONResponse ¶
type GetItem404JSONResponse struct {
Body ErrorResponse
Headers GetItem404ResponseHeaders
}
func (GetItem404JSONResponse) VisitGetItemResponse ¶
func (response GetItem404JSONResponse) VisitGetItemResponse(w http.ResponseWriter) error
type GetItem404ResponseHeaders ¶
type GetItem404ResponseHeaders struct {
XRequestID string
}
type GetItem500JSONResponse ¶
type GetItem500JSONResponse struct {
Body ErrorResponse
Headers GetItem500ResponseHeaders
}
func (GetItem500JSONResponse) VisitGetItemResponse ¶
func (response GetItem500JSONResponse) VisitGetItemResponse(w http.ResponseWriter) error
type GetItem500ResponseHeaders ¶
type GetItem500ResponseHeaders struct {
XRequestID string
}
type GetItemParams ¶
type GetItemParams struct {
// XRequestID Optional caller-supplied request ID used for request/response log correlation.
XRequestID *XRequestID `json:"X-Request-ID,omitempty"`
}
GetItemParams defines parameters for GetItem.
type GetItemRequestObject ¶
type GetItemRequestObject struct {
Id int `json:"id"`
Params GetItemParams
}
type GetItemResponseObject ¶
type GetItemResponseObject interface {
VisitGetItemResponse(w http.ResponseWriter) error
}
type GetProfile200JSONResponse ¶
type GetProfile200JSONResponse struct {
Body UserSuccessResponse
Headers GetProfile200ResponseHeaders
}
func (GetProfile200JSONResponse) VisitGetProfileResponse ¶
func (response GetProfile200JSONResponse) VisitGetProfileResponse(w http.ResponseWriter) error
type GetProfile200ResponseHeaders ¶
type GetProfile200ResponseHeaders struct {
XRequestID string
}
type GetProfile400JSONResponse ¶
type GetProfile400JSONResponse struct {
Body ErrorResponse
Headers GetProfile400ResponseHeaders
}
func (GetProfile400JSONResponse) VisitGetProfileResponse ¶
func (response GetProfile400JSONResponse) VisitGetProfileResponse(w http.ResponseWriter) error
type GetProfile400ResponseHeaders ¶
type GetProfile400ResponseHeaders struct {
XRequestID string
}
type GetProfile401JSONResponse ¶
type GetProfile401JSONResponse struct {
Body ErrorResponse
Headers GetProfile401ResponseHeaders
}
func (GetProfile401JSONResponse) VisitGetProfileResponse ¶
func (response GetProfile401JSONResponse) VisitGetProfileResponse(w http.ResponseWriter) error
type GetProfile401ResponseHeaders ¶
type GetProfile401ResponseHeaders struct {
XRequestID string
}
type GetProfile404JSONResponse ¶
type GetProfile404JSONResponse struct {
Body ErrorResponse
Headers GetProfile404ResponseHeaders
}
func (GetProfile404JSONResponse) VisitGetProfileResponse ¶
func (response GetProfile404JSONResponse) VisitGetProfileResponse(w http.ResponseWriter) error
type GetProfile404ResponseHeaders ¶
type GetProfile404ResponseHeaders struct {
XRequestID string
}
type GetProfile500JSONResponse ¶
type GetProfile500JSONResponse struct {
Body ErrorResponse
Headers GetProfile500ResponseHeaders
}
func (GetProfile500JSONResponse) VisitGetProfileResponse ¶
func (response GetProfile500JSONResponse) VisitGetProfileResponse(w http.ResponseWriter) error
type GetProfile500ResponseHeaders ¶
type GetProfile500ResponseHeaders struct {
XRequestID string
}
type GetProfileParams ¶
type GetProfileParams struct {
// XRequestID Optional caller-supplied request ID used for request/response log correlation.
XRequestID *XRequestID `json:"X-Request-ID,omitempty"`
}
GetProfileParams defines parameters for GetProfile.
type GetProfileRequestObject ¶
type GetProfileRequestObject struct {
Params GetProfileParams
}
type GetProfileResponseObject ¶
type GetProfileResponseObject interface {
VisitGetProfileResponse(w http.ResponseWriter) error
}
type GinServerOptions ¶
type GinServerOptions struct {
BaseURL string
Middlewares []MiddlewareFunc
ErrorHandler func(*gin.Context, error, int)
}
GinServerOptions provides options for the Gin server.
type ItemResponse ¶
type ItemResponse struct {
CreatedAt time.Time `json:"created_at"`
Description string `json:"description"`
Id int `json:"id"`
Status string `json:"status"`
Title string `json:"title"`
UpdatedAt time.Time `json:"updated_at"`
UserId int `json:"user_id"`
}
ItemResponse defines model for ItemResponse.
type ItemSuccessResponse ¶
type ItemSuccessResponse struct {
Code ItemSuccessResponseCode `json:"code"`
Data ItemResponse `json:"data"`
Message ItemSuccessResponseMessage `json:"message"`
}
ItemSuccessResponse defines model for ItemSuccessResponse.
type ItemSuccessResponseCode ¶
type ItemSuccessResponseCode int
ItemSuccessResponseCode defines model for ItemSuccessResponse.Code.
const (
ItemSuccessResponseCodeN0 ItemSuccessResponseCode = 0
)
Defines values for ItemSuccessResponseCode.
func (ItemSuccessResponseCode) Valid ¶
func (e ItemSuccessResponseCode) Valid() bool
Valid indicates whether the value is a known member of the ItemSuccessResponseCode enum.
type ItemSuccessResponseMessage ¶
type ItemSuccessResponseMessage string
ItemSuccessResponseMessage defines model for ItemSuccessResponse.Message.
const (
ItemSuccessResponseMessageSuccess ItemSuccessResponseMessage = "success"
)
Defines values for ItemSuccessResponseMessage.
func (ItemSuccessResponseMessage) Valid ¶
func (e ItemSuccessResponseMessage) Valid() bool
Valid indicates whether the value is a known member of the ItemSuccessResponseMessage enum.
type ListItems200JSONResponse ¶
type ListItems200JSONResponse struct {
Body PagedItemsSuccessResponse
Headers ListItems200ResponseHeaders
}
func (ListItems200JSONResponse) VisitListItemsResponse ¶
func (response ListItems200JSONResponse) VisitListItemsResponse(w http.ResponseWriter) error
type ListItems200ResponseHeaders ¶
type ListItems200ResponseHeaders struct {
XRequestID string
}
type ListItems400JSONResponse ¶
type ListItems400JSONResponse struct {
Body ErrorResponse
Headers ListItems400ResponseHeaders
}
func (ListItems400JSONResponse) VisitListItemsResponse ¶
func (response ListItems400JSONResponse) VisitListItemsResponse(w http.ResponseWriter) error
type ListItems400ResponseHeaders ¶
type ListItems400ResponseHeaders struct {
XRequestID string
}
type ListItems500JSONResponse ¶
type ListItems500JSONResponse struct {
Body ErrorResponse
Headers ListItems500ResponseHeaders
}
func (ListItems500JSONResponse) VisitListItemsResponse ¶
func (response ListItems500JSONResponse) VisitListItemsResponse(w http.ResponseWriter) error
type ListItems500ResponseHeaders ¶
type ListItems500ResponseHeaders struct {
XRequestID string
}
type ListItemsParams ¶
type ListItemsParams struct {
Page *int `form:"page,omitempty" json:"page,omitempty"`
PageSize *int `form:"page_size,omitempty" json:"page_size,omitempty"`
Keyword *string `form:"keyword,omitempty" json:"keyword,omitempty"`
Status *ListItemsParamsStatus `form:"status,omitempty" json:"status,omitempty"`
// XRequestID Optional caller-supplied request ID used for request/response log correlation.
XRequestID *XRequestID `json:"X-Request-ID,omitempty"`
}
ListItemsParams defines parameters for ListItems.
type ListItemsParamsStatus ¶
type ListItemsParamsStatus string
ListItemsParamsStatus defines parameters for ListItems.
const ( Active ListItemsParamsStatus = "active" Inactive ListItemsParamsStatus = "inactive" )
Defines values for ListItemsParamsStatus.
func (ListItemsParamsStatus) Valid ¶
func (e ListItemsParamsStatus) Valid() bool
Valid indicates whether the value is a known member of the ListItemsParamsStatus enum.
type ListItemsRequestObject ¶
type ListItemsRequestObject struct {
Params ListItemsParams
}
type ListItemsResponseObject ¶
type ListItemsResponseObject interface {
VisitListItemsResponse(w http.ResponseWriter) error
}
type LoginRequest ¶
type LoginRequest struct {
Email openapi_types.Email `json:"email"`
Password string `json:"password"`
}
LoginRequest defines model for LoginRequest.
type LoginUser200JSONResponse ¶
type LoginUser200JSONResponse struct {
Body AuthSuccessResponse
Headers LoginUser200ResponseHeaders
}
func (LoginUser200JSONResponse) VisitLoginUserResponse ¶
func (response LoginUser200JSONResponse) VisitLoginUserResponse(w http.ResponseWriter) error
type LoginUser200ResponseHeaders ¶
type LoginUser200ResponseHeaders struct {
XRequestID string
}
type LoginUser400JSONResponse ¶
type LoginUser400JSONResponse struct {
Body ErrorResponse
Headers LoginUser400ResponseHeaders
}
func (LoginUser400JSONResponse) VisitLoginUserResponse ¶
func (response LoginUser400JSONResponse) VisitLoginUserResponse(w http.ResponseWriter) error
type LoginUser400ResponseHeaders ¶
type LoginUser400ResponseHeaders struct {
XRequestID string
}
type LoginUser401JSONResponse ¶
type LoginUser401JSONResponse struct {
Body ErrorResponse
Headers LoginUser401ResponseHeaders
}
func (LoginUser401JSONResponse) VisitLoginUserResponse ¶
func (response LoginUser401JSONResponse) VisitLoginUserResponse(w http.ResponseWriter) error
type LoginUser401ResponseHeaders ¶
type LoginUser401ResponseHeaders struct {
XRequestID string
}
type LoginUser500JSONResponse ¶
type LoginUser500JSONResponse struct {
Body ErrorResponse
Headers LoginUser500ResponseHeaders
}
func (LoginUser500JSONResponse) VisitLoginUserResponse ¶
func (response LoginUser500JSONResponse) VisitLoginUserResponse(w http.ResponseWriter) error
type LoginUser500ResponseHeaders ¶
type LoginUser500ResponseHeaders struct {
XRequestID string
}
type LoginUserJSONRequestBody ¶
type LoginUserJSONRequestBody = LoginRequest
LoginUserJSONRequestBody defines body for LoginUser for application/json ContentType.
type LoginUserParams ¶
type LoginUserParams struct {
// XRequestID Optional caller-supplied request ID used for request/response log correlation.
XRequestID *XRequestID `json:"X-Request-ID,omitempty"`
}
LoginUserParams defines parameters for LoginUser.
type LoginUserRequestObject ¶
type LoginUserRequestObject struct {
Params LoginUserParams
Body *LoginUserJSONRequestBody
}
type LoginUserResponseObject ¶
type LoginUserResponseObject interface {
VisitLoginUserResponse(w http.ResponseWriter) error
}
type MiddlewareFunc ¶
type PagedItemsResponse ¶
type PagedItemsResponse struct {
Items []ItemResponse `json:"items"`
Page int `json:"page"`
PageSize int `json:"page_size"`
Total int `json:"total"`
TotalPages int `json:"total_pages"`
}
PagedItemsResponse defines model for PagedItemsResponse.
type PagedItemsSuccessResponse ¶
type PagedItemsSuccessResponse struct {
Code PagedItemsSuccessResponseCode `json:"code"`
Data PagedItemsResponse `json:"data"`
Message PagedItemsSuccessResponseMessage `json:"message"`
}
PagedItemsSuccessResponse defines model for PagedItemsSuccessResponse.
type PagedItemsSuccessResponseCode ¶
type PagedItemsSuccessResponseCode int
PagedItemsSuccessResponseCode defines model for PagedItemsSuccessResponse.Code.
const (
PagedItemsSuccessResponseCodeN0 PagedItemsSuccessResponseCode = 0
)
Defines values for PagedItemsSuccessResponseCode.
func (PagedItemsSuccessResponseCode) Valid ¶
func (e PagedItemsSuccessResponseCode) Valid() bool
Valid indicates whether the value is a known member of the PagedItemsSuccessResponseCode enum.
type PagedItemsSuccessResponseMessage ¶
type PagedItemsSuccessResponseMessage string
PagedItemsSuccessResponseMessage defines model for PagedItemsSuccessResponse.Message.
const (
PagedItemsSuccessResponseMessageSuccess PagedItemsSuccessResponseMessage = "success"
)
Defines values for PagedItemsSuccessResponseMessage.
func (PagedItemsSuccessResponseMessage) Valid ¶
func (e PagedItemsSuccessResponseMessage) Valid() bool
Valid indicates whether the value is a known member of the PagedItemsSuccessResponseMessage enum.
type RefreshRequest ¶
type RefreshRequest struct {
RefreshToken string `json:"refresh_token"`
}
RefreshRequest defines model for RefreshRequest.
type RefreshToken200JSONResponse ¶
type RefreshToken200JSONResponse struct {
Body AuthSuccessResponse
Headers RefreshToken200ResponseHeaders
}
func (RefreshToken200JSONResponse) VisitRefreshTokenResponse ¶
func (response RefreshToken200JSONResponse) VisitRefreshTokenResponse(w http.ResponseWriter) error
type RefreshToken200ResponseHeaders ¶
type RefreshToken200ResponseHeaders struct {
XRequestID string
}
type RefreshToken400JSONResponse ¶
type RefreshToken400JSONResponse struct {
Body ErrorResponse
Headers RefreshToken400ResponseHeaders
}
func (RefreshToken400JSONResponse) VisitRefreshTokenResponse ¶
func (response RefreshToken400JSONResponse) VisitRefreshTokenResponse(w http.ResponseWriter) error
type RefreshToken400ResponseHeaders ¶
type RefreshToken400ResponseHeaders struct {
XRequestID string
}
type RefreshToken401JSONResponse ¶
type RefreshToken401JSONResponse struct {
Body ErrorResponse
Headers RefreshToken401ResponseHeaders
}
func (RefreshToken401JSONResponse) VisitRefreshTokenResponse ¶
func (response RefreshToken401JSONResponse) VisitRefreshTokenResponse(w http.ResponseWriter) error
type RefreshToken401ResponseHeaders ¶
type RefreshToken401ResponseHeaders struct {
XRequestID string
}
type RefreshToken500JSONResponse ¶
type RefreshToken500JSONResponse struct {
Body ErrorResponse
Headers RefreshToken500ResponseHeaders
}
func (RefreshToken500JSONResponse) VisitRefreshTokenResponse ¶
func (response RefreshToken500JSONResponse) VisitRefreshTokenResponse(w http.ResponseWriter) error
type RefreshToken500ResponseHeaders ¶
type RefreshToken500ResponseHeaders struct {
XRequestID string
}
type RefreshTokenJSONRequestBody ¶
type RefreshTokenJSONRequestBody = RefreshRequest
RefreshTokenJSONRequestBody defines body for RefreshToken for application/json ContentType.
type RefreshTokenParams ¶
type RefreshTokenParams struct {
// XRequestID Optional caller-supplied request ID used for request/response log correlation.
XRequestID *XRequestID `json:"X-Request-ID,omitempty"`
}
RefreshTokenParams defines parameters for RefreshToken.
type RefreshTokenRequestObject ¶
type RefreshTokenRequestObject struct {
Params RefreshTokenParams
Body *RefreshTokenJSONRequestBody
}
type RefreshTokenResponseObject ¶
type RefreshTokenResponseObject interface {
VisitRefreshTokenResponse(w http.ResponseWriter) error
}
type RegisterRequest ¶
type RegisterRequest struct {
Email openapi_types.Email `json:"email"`
Password string `json:"password"`
Username string `json:"username"`
}
RegisterRequest defines model for RegisterRequest.
type RegisterUser201JSONResponse ¶
type RegisterUser201JSONResponse struct {
Body AuthSuccessResponse
Headers RegisterUser201ResponseHeaders
}
func (RegisterUser201JSONResponse) VisitRegisterUserResponse ¶
func (response RegisterUser201JSONResponse) VisitRegisterUserResponse(w http.ResponseWriter) error
type RegisterUser201ResponseHeaders ¶
type RegisterUser201ResponseHeaders struct {
XRequestID string
}
type RegisterUser400JSONResponse ¶
type RegisterUser400JSONResponse struct {
Body ErrorResponse
Headers RegisterUser400ResponseHeaders
}
func (RegisterUser400JSONResponse) VisitRegisterUserResponse ¶
func (response RegisterUser400JSONResponse) VisitRegisterUserResponse(w http.ResponseWriter) error
type RegisterUser400ResponseHeaders ¶
type RegisterUser400ResponseHeaders struct {
XRequestID string
}
type RegisterUser409JSONResponse ¶
type RegisterUser409JSONResponse struct {
Body ErrorResponse
Headers RegisterUser409ResponseHeaders
}
func (RegisterUser409JSONResponse) VisitRegisterUserResponse ¶
func (response RegisterUser409JSONResponse) VisitRegisterUserResponse(w http.ResponseWriter) error
type RegisterUser409ResponseHeaders ¶
type RegisterUser409ResponseHeaders struct {
XRequestID string
}
type RegisterUser500JSONResponse ¶
type RegisterUser500JSONResponse struct {
Body ErrorResponse
Headers RegisterUser500ResponseHeaders
}
func (RegisterUser500JSONResponse) VisitRegisterUserResponse ¶
func (response RegisterUser500JSONResponse) VisitRegisterUserResponse(w http.ResponseWriter) error
type RegisterUser500ResponseHeaders ¶
type RegisterUser500ResponseHeaders struct {
XRequestID string
}
type RegisterUserJSONRequestBody ¶
type RegisterUserJSONRequestBody = RegisterRequest
RegisterUserJSONRequestBody defines body for RegisterUser for application/json ContentType.
type RegisterUserParams ¶
type RegisterUserParams struct {
// XRequestID Optional caller-supplied request ID used for request/response log correlation.
XRequestID *XRequestID `json:"X-Request-ID,omitempty"`
}
RegisterUserParams defines parameters for RegisterUser.
type RegisterUserRequestObject ¶
type RegisterUserRequestObject struct {
Params RegisterUserParams
Body *RegisterUserJSONRequestBody
}
type RegisterUserResponseObject ¶
type RegisterUserResponseObject interface {
VisitRegisterUserResponse(w http.ResponseWriter) error
}
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server implements StrictServerInterface, bridging generated types to existing services.
func NewServer ¶
func NewServer(authService *service.AuthService, itemService *service.ItemService) *Server
NewServer creates a new Server.
func (*Server) CreateItem ¶
func (s *Server) CreateItem(ctx context.Context, request CreateItemRequestObject) (CreateItemResponseObject, error)
func (*Server) DeleteItem ¶
func (s *Server) DeleteItem(ctx context.Context, request DeleteItemRequestObject) (DeleteItemResponseObject, error)
func (*Server) GetItem ¶
func (s *Server) GetItem(ctx context.Context, request GetItemRequestObject) (GetItemResponseObject, error)
func (*Server) GetProfile ¶
func (s *Server) GetProfile(ctx context.Context, _ GetProfileRequestObject) (GetProfileResponseObject, error)
func (*Server) ListItems ¶
func (s *Server) ListItems(ctx context.Context, request ListItemsRequestObject) (ListItemsResponseObject, error)
func (*Server) LoginUser ¶
func (s *Server) LoginUser(ctx context.Context, request LoginUserRequestObject) (LoginUserResponseObject, error)
func (*Server) RefreshToken ¶
func (s *Server) RefreshToken(ctx context.Context, request RefreshTokenRequestObject) (RefreshTokenResponseObject, error)
func (*Server) RegisterUser ¶
func (s *Server) RegisterUser(ctx context.Context, request RegisterUserRequestObject) (RegisterUserResponseObject, error)
func (*Server) UpdateItem ¶
func (s *Server) UpdateItem(ctx context.Context, request UpdateItemRequestObject) (UpdateItemResponseObject, error)
type ServerInterface ¶
type ServerInterface interface {
// Login with credentials
// (POST /api/v1/auth/login)
LoginUser(c *gin.Context, params LoginUserParams)
// Get current user profile
// (GET /api/v1/auth/profile)
GetProfile(c *gin.Context, params GetProfileParams)
// Refresh access token
// (POST /api/v1/auth/refresh)
RefreshToken(c *gin.Context, params RefreshTokenParams)
// Register a new user
// (POST /api/v1/auth/register)
RegisterUser(c *gin.Context, params RegisterUserParams)
// List items with pagination
// (GET /api/v1/items)
ListItems(c *gin.Context, params ListItemsParams)
// Create a new item
// (POST /api/v1/items)
CreateItem(c *gin.Context, params CreateItemParams)
// Soft delete an item
// (DELETE /api/v1/items/{id})
DeleteItem(c *gin.Context, id int, params DeleteItemParams)
// Get item by ID
// (GET /api/v1/items/{id})
GetItem(c *gin.Context, id int, params GetItemParams)
// Update an item
// (PUT /api/v1/items/{id})
UpdateItem(c *gin.Context, id int, params UpdateItemParams)
}
ServerInterface represents all server handlers.
func NewStrictHandler ¶
func NewStrictHandler(ssi StrictServerInterface, middlewares []StrictMiddlewareFunc) ServerInterface
type ServerInterfaceWrapper ¶
type ServerInterfaceWrapper struct {
Handler ServerInterface
HandlerMiddlewares []MiddlewareFunc
ErrorHandler func(*gin.Context, error, int)
}
ServerInterfaceWrapper converts contexts to parameters.
func (*ServerInterfaceWrapper) CreateItem ¶
func (siw *ServerInterfaceWrapper) CreateItem(c *gin.Context)
CreateItem operation middleware
func (*ServerInterfaceWrapper) DeleteItem ¶
func (siw *ServerInterfaceWrapper) DeleteItem(c *gin.Context)
DeleteItem operation middleware
func (*ServerInterfaceWrapper) GetItem ¶
func (siw *ServerInterfaceWrapper) GetItem(c *gin.Context)
GetItem operation middleware
func (*ServerInterfaceWrapper) GetProfile ¶
func (siw *ServerInterfaceWrapper) GetProfile(c *gin.Context)
GetProfile operation middleware
func (*ServerInterfaceWrapper) ListItems ¶
func (siw *ServerInterfaceWrapper) ListItems(c *gin.Context)
ListItems operation middleware
func (*ServerInterfaceWrapper) LoginUser ¶
func (siw *ServerInterfaceWrapper) LoginUser(c *gin.Context)
LoginUser operation middleware
func (*ServerInterfaceWrapper) RefreshToken ¶
func (siw *ServerInterfaceWrapper) RefreshToken(c *gin.Context)
RefreshToken operation middleware
func (*ServerInterfaceWrapper) RegisterUser ¶
func (siw *ServerInterfaceWrapper) RegisterUser(c *gin.Context)
RegisterUser operation middleware
func (*ServerInterfaceWrapper) UpdateItem ¶
func (siw *ServerInterfaceWrapper) UpdateItem(c *gin.Context)
UpdateItem operation middleware
type StrictHandlerFunc ¶
type StrictHandlerFunc = strictgin.StrictGinHandlerFunc
type StrictMiddlewareFunc ¶
type StrictMiddlewareFunc = strictgin.StrictGinMiddlewareFunc
type StrictServerInterface ¶
type StrictServerInterface interface {
// Login with credentials
// (POST /api/v1/auth/login)
LoginUser(ctx context.Context, request LoginUserRequestObject) (LoginUserResponseObject, error)
// Get current user profile
// (GET /api/v1/auth/profile)
GetProfile(ctx context.Context, request GetProfileRequestObject) (GetProfileResponseObject, error)
// Refresh access token
// (POST /api/v1/auth/refresh)
RefreshToken(ctx context.Context, request RefreshTokenRequestObject) (RefreshTokenResponseObject, error)
// Register a new user
// (POST /api/v1/auth/register)
RegisterUser(ctx context.Context, request RegisterUserRequestObject) (RegisterUserResponseObject, error)
// List items with pagination
// (GET /api/v1/items)
ListItems(ctx context.Context, request ListItemsRequestObject) (ListItemsResponseObject, error)
// Create a new item
// (POST /api/v1/items)
CreateItem(ctx context.Context, request CreateItemRequestObject) (CreateItemResponseObject, error)
// Soft delete an item
// (DELETE /api/v1/items/{id})
DeleteItem(ctx context.Context, request DeleteItemRequestObject) (DeleteItemResponseObject, error)
// Get item by ID
// (GET /api/v1/items/{id})
GetItem(ctx context.Context, request GetItemRequestObject) (GetItemResponseObject, error)
// Update an item
// (PUT /api/v1/items/{id})
UpdateItem(ctx context.Context, request UpdateItemRequestObject) (UpdateItemResponseObject, error)
}
StrictServerInterface represents all server handlers.
type UpdateItem200JSONResponse ¶
type UpdateItem200JSONResponse struct {
Body ItemSuccessResponse
Headers UpdateItem200ResponseHeaders
}
func (UpdateItem200JSONResponse) VisitUpdateItemResponse ¶
func (response UpdateItem200JSONResponse) VisitUpdateItemResponse(w http.ResponseWriter) error
type UpdateItem200ResponseHeaders ¶
type UpdateItem200ResponseHeaders struct {
XRequestID string
}
type UpdateItem400JSONResponse ¶
type UpdateItem400JSONResponse struct {
Body ErrorResponse
Headers UpdateItem400ResponseHeaders
}
func (UpdateItem400JSONResponse) VisitUpdateItemResponse ¶
func (response UpdateItem400JSONResponse) VisitUpdateItemResponse(w http.ResponseWriter) error
type UpdateItem400ResponseHeaders ¶
type UpdateItem400ResponseHeaders struct {
XRequestID string
}
type UpdateItem404JSONResponse ¶
type UpdateItem404JSONResponse struct {
Body ErrorResponse
Headers UpdateItem404ResponseHeaders
}
func (UpdateItem404JSONResponse) VisitUpdateItemResponse ¶
func (response UpdateItem404JSONResponse) VisitUpdateItemResponse(w http.ResponseWriter) error
type UpdateItem404ResponseHeaders ¶
type UpdateItem404ResponseHeaders struct {
XRequestID string
}
type UpdateItem500JSONResponse ¶
type UpdateItem500JSONResponse struct {
Body ErrorResponse
Headers UpdateItem500ResponseHeaders
}
func (UpdateItem500JSONResponse) VisitUpdateItemResponse ¶
func (response UpdateItem500JSONResponse) VisitUpdateItemResponse(w http.ResponseWriter) error
type UpdateItem500ResponseHeaders ¶
type UpdateItem500ResponseHeaders struct {
XRequestID string
}
type UpdateItemJSONRequestBody ¶
type UpdateItemJSONRequestBody = UpdateItemRequest
UpdateItemJSONRequestBody defines body for UpdateItem for application/json ContentType.
type UpdateItemParams ¶
type UpdateItemParams struct {
// XRequestID Optional caller-supplied request ID used for request/response log correlation.
XRequestID *XRequestID `json:"X-Request-ID,omitempty"`
}
UpdateItemParams defines parameters for UpdateItem.
type UpdateItemRequest ¶
type UpdateItemRequest struct {
Description *string `json:"description,omitempty"`
Status *UpdateItemRequestStatus `json:"status,omitempty"`
Title *string `json:"title,omitempty"`
}
UpdateItemRequest defines model for UpdateItemRequest.
type UpdateItemRequestObject ¶
type UpdateItemRequestObject struct {
Id int `json:"id"`
Params UpdateItemParams
Body *UpdateItemJSONRequestBody
}
type UpdateItemRequestStatus ¶
type UpdateItemRequestStatus string
UpdateItemRequestStatus defines model for UpdateItemRequest.Status.
const ( UpdateItemRequestStatusActive UpdateItemRequestStatus = "active" UpdateItemRequestStatusInactive UpdateItemRequestStatus = "inactive" )
Defines values for UpdateItemRequestStatus.
func (UpdateItemRequestStatus) Valid ¶
func (e UpdateItemRequestStatus) Valid() bool
Valid indicates whether the value is a known member of the UpdateItemRequestStatus enum.
type UpdateItemResponseObject ¶
type UpdateItemResponseObject interface {
VisitUpdateItemResponse(w http.ResponseWriter) error
}
type UserResponse ¶
type UserResponse struct {
Email string `json:"email"`
Id int `json:"id"`
Role string `json:"role"`
Username string `json:"username"`
}
UserResponse defines model for UserResponse.
type UserSuccessResponse ¶
type UserSuccessResponse struct {
Code UserSuccessResponseCode `json:"code"`
Data UserResponse `json:"data"`
Message UserSuccessResponseMessage `json:"message"`
}
UserSuccessResponse defines model for UserSuccessResponse.
type UserSuccessResponseCode ¶
type UserSuccessResponseCode int
UserSuccessResponseCode defines model for UserSuccessResponse.Code.
const (
N0 UserSuccessResponseCode = 0
)
Defines values for UserSuccessResponseCode.
func (UserSuccessResponseCode) Valid ¶
func (e UserSuccessResponseCode) Valid() bool
Valid indicates whether the value is a known member of the UserSuccessResponseCode enum.
type UserSuccessResponseMessage ¶
type UserSuccessResponseMessage string
UserSuccessResponseMessage defines model for UserSuccessResponse.Message.
const (
Success UserSuccessResponseMessage = "success"
)
Defines values for UserSuccessResponseMessage.
func (UserSuccessResponseMessage) Valid ¶
func (e UserSuccessResponseMessage) Valid() bool
Valid indicates whether the value is a known member of the UserSuccessResponseMessage enum.