gen

package
v0.0.0-...-ba19b16 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package gen provides primitives to interact with the openapi HTTP API.

Code generated by github.com/deepmap/oapi-codegen version v1.16.3 DO NOT EDIT.

Package gen provides primitives to interact with the openapi HTTP API.

Code generated by github.com/deepmap/oapi-codegen version v1.16.3 DO NOT EDIT.

Index

Constants

View Source
const (
	BearerAuthScopes = "bearerAuth.Scopes"
)

Variables

This section is empty.

Functions

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 CreateUser201JSONResponse

type CreateUser201JSONResponse struct {
	UserId int64 `json:"userId"`
}

func (CreateUser201JSONResponse) VisitCreateUserResponse

func (response CreateUser201JSONResponse) VisitCreateUserResponse(w http.ResponseWriter) error

type CreateUser400JSONResponse

type CreateUser400JSONResponse struct{ N400ErrorJSONResponse }

func (CreateUser400JSONResponse) VisitCreateUserResponse

func (response CreateUser400JSONResponse) VisitCreateUserResponse(w http.ResponseWriter) error

type CreateUser401JSONResponse

type CreateUser401JSONResponse struct {
	N401UnauthorizedErrorJSONResponse
}

func (CreateUser401JSONResponse) VisitCreateUserResponse

func (response CreateUser401JSONResponse) VisitCreateUserResponse(w http.ResponseWriter) error

type CreateUser404JSONResponse

type CreateUser404JSONResponse struct{ N404ErrorJSONResponse }

func (CreateUser404JSONResponse) VisitCreateUserResponse

func (response CreateUser404JSONResponse) VisitCreateUserResponse(w http.ResponseWriter) error

type CreateUser500JSONResponse

type CreateUser500JSONResponse struct{ N500ErrorJSONResponse }

func (CreateUser500JSONResponse) VisitCreateUserResponse

func (response CreateUser500JSONResponse) VisitCreateUserResponse(w http.ResponseWriter) error

type CreateUserJSONBody

type CreateUserJSONBody struct {
	FamilyName     string `json:"familyName"`
	FamilyNameKana string `json:"familyNameKana"`
	FirstName      string `json:"firstName"`
	FirstNameKana  string `json:"firstNameKana"`
}

CreateUserJSONBody defines parameters for CreateUser.

type CreateUserJSONRequestBody

type CreateUserJSONRequestBody CreateUserJSONBody

CreateUserJSONRequestBody defines body for CreateUser for application/json ContentType.

type CreateUserRequestObject

type CreateUserRequestObject struct {
	Body *CreateUserJSONRequestBody
}

type CreateUserResponseObject

type CreateUserResponseObject interface {
	VisitCreateUserResponse(w http.ResponseWriter) error
}

type Error

type Error struct {
	Message string `json:"message"`
}

Error defines model for Error.

type GetUserByID200JSONResponse

type GetUserByID200JSONResponse struct {
	FamilyName     string  `json:"familyName"`
	FamilyNameKana string  `json:"familyNameKana"`
	FirstName      string  `json:"firstName"`
	FirstNameKana  string  `json:"firstNameKana"`
	UserId         float32 `json:"userId"`
}

func (GetUserByID200JSONResponse) VisitGetUserByIDResponse

func (response GetUserByID200JSONResponse) VisitGetUserByIDResponse(w http.ResponseWriter) error

type GetUserByID404JSONResponse

type GetUserByID404JSONResponse struct{ N404ErrorJSONResponse }

func (GetUserByID404JSONResponse) VisitGetUserByIDResponse

func (response GetUserByID404JSONResponse) VisitGetUserByIDResponse(w http.ResponseWriter) error

type GetUserByID500JSONResponse

type GetUserByID500JSONResponse struct{ N500ErrorJSONResponse }

func (GetUserByID500JSONResponse) VisitGetUserByIDResponse

func (response GetUserByID500JSONResponse) VisitGetUserByIDResponse(w http.ResponseWriter) error

type GetUserByIDRequestObject

type GetUserByIDRequestObject struct {
	UserId int `json:"userId"`
}

type GetUserByIDResponseObject

type GetUserByIDResponseObject interface {
	VisitGetUserByIDResponse(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 MiddlewareFunc

type MiddlewareFunc func(c *gin.Context)

type N400Error

type N400Error = Error

N400Error defines model for 400Error.

type N400ErrorJSONResponse

type N400ErrorJSONResponse Error

type N401UnauthorizedError

type N401UnauthorizedError = Error

N401UnauthorizedError defines model for 401UnauthorizedError.

type N401UnauthorizedErrorJSONResponse

type N401UnauthorizedErrorJSONResponse Error

type N404Error

type N404Error = Error

N404Error defines model for 404Error.

type N404ErrorJSONResponse

type N404ErrorJSONResponse Error

type N500Error

type N500Error = Error

N500Error defines model for 500Error.

type N500ErrorJSONResponse

type N500ErrorJSONResponse Error

type ServerInterface

type ServerInterface interface {
	// ユーザー登録
	// (POST /users)
	CreateUser(c *gin.Context)
	// ユーザー情報取得
	// (GET /users/{userId})
	GetUserByID(c *gin.Context, userId int)
	// ユーザー情報更新
	// (PUT /users/{userId})
	UpdateUserByID(c *gin.Context, userId int)
}

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) CreateUser

func (siw *ServerInterfaceWrapper) CreateUser(c *gin.Context)

CreateUser operation middleware

func (*ServerInterfaceWrapper) GetUserByID

func (siw *ServerInterfaceWrapper) GetUserByID(c *gin.Context)

GetUserByID operation middleware

func (*ServerInterfaceWrapper) UpdateUserByID

func (siw *ServerInterfaceWrapper) UpdateUserByID(c *gin.Context)

UpdateUserByID operation middleware

type StrictHandlerFunc

type StrictHandlerFunc = strictgin.StrictGinHandlerFunc

type StrictMiddlewareFunc

type StrictMiddlewareFunc = strictgin.StrictGinMiddlewareFunc

type StrictServerInterface

type StrictServerInterface interface {
	// ユーザー登録
	// (POST /users)
	CreateUser(ctx *gin.Context, request CreateUserRequestObject) (CreateUserResponseObject, error)
	// ユーザー情報取得
	// (GET /users/{userId})
	GetUserByID(ctx *gin.Context, request GetUserByIDRequestObject) (GetUserByIDResponseObject, error)
	// ユーザー情報更新
	// (PUT /users/{userId})
	UpdateUserByID(ctx *gin.Context, request UpdateUserByIDRequestObject) (UpdateUserByIDResponseObject, error)
}

StrictServerInterface represents all server handlers.

type UpdateUserByID200JSONResponse

type UpdateUserByID200JSONResponse struct {
	Status string `json:"status"`
}

func (UpdateUserByID200JSONResponse) VisitUpdateUserByIDResponse

func (response UpdateUserByID200JSONResponse) VisitUpdateUserByIDResponse(w http.ResponseWriter) error

type UpdateUserByID400JSONResponse

type UpdateUserByID400JSONResponse struct{ N400ErrorJSONResponse }

func (UpdateUserByID400JSONResponse) VisitUpdateUserByIDResponse

func (response UpdateUserByID400JSONResponse) VisitUpdateUserByIDResponse(w http.ResponseWriter) error

type UpdateUserByID401JSONResponse

type UpdateUserByID401JSONResponse struct {
	N401UnauthorizedErrorJSONResponse
}

func (UpdateUserByID401JSONResponse) VisitUpdateUserByIDResponse

func (response UpdateUserByID401JSONResponse) VisitUpdateUserByIDResponse(w http.ResponseWriter) error

type UpdateUserByID404JSONResponse

type UpdateUserByID404JSONResponse struct{ N404ErrorJSONResponse }

func (UpdateUserByID404JSONResponse) VisitUpdateUserByIDResponse

func (response UpdateUserByID404JSONResponse) VisitUpdateUserByIDResponse(w http.ResponseWriter) error

type UpdateUserByID500JSONResponse

type UpdateUserByID500JSONResponse struct{ N500ErrorJSONResponse }

func (UpdateUserByID500JSONResponse) VisitUpdateUserByIDResponse

func (response UpdateUserByID500JSONResponse) VisitUpdateUserByIDResponse(w http.ResponseWriter) error

type UpdateUserByIDJSONBody

type UpdateUserByIDJSONBody struct {
	FamilyName     string `json:"familyName"`
	FamilyNameKana string `json:"familyNameKana"`
	FirstName      string `json:"firstName"`
	FirstNameKana  string `json:"firstNameKana"`
}

UpdateUserByIDJSONBody defines parameters for UpdateUserByID.

type UpdateUserByIDJSONRequestBody

type UpdateUserByIDJSONRequestBody UpdateUserByIDJSONBody

UpdateUserByIDJSONRequestBody defines body for UpdateUserByID for application/json ContentType.

type UpdateUserByIDRequestObject

type UpdateUserByIDRequestObject struct {
	UserId int `json:"userId"`
	Body   *UpdateUserByIDJSONRequestBody
}

type UpdateUserByIDResponseObject

type UpdateUserByIDResponseObject interface {
	VisitUpdateUserByIDResponse(w http.ResponseWriter) error
}

Jump to

Keyboard shortcuts

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