gen

package
v0.0.0-...-2ff099c Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

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

Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.4.1 DO NOT EDIT.

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

Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.4.1 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 Error

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

Error defines model for Error.

type GetAccount200JSONResponse

type GetAccount200JSONResponse struct {
	// AcquisitionPoint 保有ポイント
	AcquisitionPoint int    `json:"acquisitionPoint"`
	Email            string `json:"email"`
	FamilyName       string `json:"familyName"`
	FamilyNameKana   string `json:"familyNameKana"`
	FirstName        string `json:"firstName"`
	FirstNameKana    string `json:"firstNameKana"`

	// SendablePoint 送信可能ポイント
	SendablePoint int     `json:"sendablePoint"`
	UserId        float32 `json:"userId"`
}

func (GetAccount200JSONResponse) VisitGetAccountResponse

func (response GetAccount200JSONResponse) VisitGetAccountResponse(w http.ResponseWriter) error

type GetAccount401JSONResponse

type GetAccount401JSONResponse struct {
	N401UnauthorizedErrorJSONResponse
}

func (GetAccount401JSONResponse) VisitGetAccountResponse

func (response GetAccount401JSONResponse) VisitGetAccountResponse(w http.ResponseWriter) error

type GetAccount500JSONResponse

type GetAccount500JSONResponse struct{ N500ErrorJSONResponse }

func (GetAccount500JSONResponse) VisitGetAccountResponse

func (response GetAccount500JSONResponse) VisitGetAccountResponse(w http.ResponseWriter) error

type GetAccountRequestObject

type GetAccountRequestObject struct {
}

type GetAccountResponseObject

type GetAccountResponseObject interface {
	VisitGetAccountResponse(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 PutAccount201JSONResponse

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

func (PutAccount201JSONResponse) VisitPutAccountResponse

func (response PutAccount201JSONResponse) VisitPutAccountResponse(w http.ResponseWriter) error

type PutAccount400JSONResponse

type PutAccount400JSONResponse struct{ N400ErrorJSONResponse }

func (PutAccount400JSONResponse) VisitPutAccountResponse

func (response PutAccount400JSONResponse) VisitPutAccountResponse(w http.ResponseWriter) error

type PutAccount401JSONResponse

type PutAccount401JSONResponse struct {
	N401UnauthorizedErrorJSONResponse
}

func (PutAccount401JSONResponse) VisitPutAccountResponse

func (response PutAccount401JSONResponse) VisitPutAccountResponse(w http.ResponseWriter) error

type PutAccount404JSONResponse

type PutAccount404JSONResponse struct{ N404ErrorJSONResponse }

func (PutAccount404JSONResponse) VisitPutAccountResponse

func (response PutAccount404JSONResponse) VisitPutAccountResponse(w http.ResponseWriter) error

type PutAccount500JSONResponse

type PutAccount500JSONResponse struct{ N500ErrorJSONResponse }

func (PutAccount500JSONResponse) VisitPutAccountResponse

func (response PutAccount500JSONResponse) VisitPutAccountResponse(w http.ResponseWriter) error

type PutAccountJSONBody

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

PutAccountJSONBody defines parameters for PutAccount.

type PutAccountJSONRequestBody

type PutAccountJSONRequestBody PutAccountJSONBody

PutAccountJSONRequestBody defines body for PutAccount for application/json ContentType.

type PutAccountRequestObject

type PutAccountRequestObject struct {
	Body *PutAccountJSONRequestBody
}

type PutAccountResponseObject

type PutAccountResponseObject interface {
	VisitPutAccountResponse(w http.ResponseWriter) error
}

type ServerInterface

type ServerInterface interface {
	// アカウント情報取得
	// (GET /account)
	GetAccount(c *gin.Context)
	// アカウント情報更新
	// (PUT /account)
	PutAccount(c *gin.Context)
}

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

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

GetAccount operation middleware

func (*ServerInterfaceWrapper) PutAccount

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

PutAccount operation middleware

type StrictHandlerFunc

type StrictHandlerFunc = strictgin.StrictGinHandlerFunc

type StrictMiddlewareFunc

type StrictMiddlewareFunc = strictgin.StrictGinMiddlewareFunc

type StrictServerInterface

type StrictServerInterface interface {
	// アカウント情報取得
	// (GET /account)
	GetAccount(ctx *gin.Context, request GetAccountRequestObject) (GetAccountResponseObject, error)
	// アカウント情報更新
	// (PUT /account)
	PutAccount(ctx *gin.Context, request PutAccountRequestObject) (PutAccountResponseObject, error)
}

StrictServerInterface represents all server handlers.

Jump to

Keyboard shortcuts

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