openapi

package
v0.0.0-...-d942281 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

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

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

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

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

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

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSpec

func GetSpec() (swagger *openapi3.T, err error)

GetSpec returns the OpenAPI specification corresponding to the generated code in this file. External references in the spec are resolved through PathToRawSpec; externally-referenced files must be embedded in their corresponding Go packages (via the import-mapping feature). URL-based external refs are not supported.

func GetSpecJSON

func GetSpecJSON() ([]byte, error)

GetSpecJSON returns the raw JSON bytes of the embedded OpenAPI specification: decompressed but not unmarshaled. External references are not resolved here; the bytes are the spec exactly as embedded by codegen. The result is cached at package init time, so repeated calls are cheap.

func GetSwagger deprecated

func GetSwagger() (*openapi3.T, error)

GetSwagger returns the OpenAPI specification corresponding to the generated code in this file.

Deprecated: GetSwagger predates kin-openapi renaming openapi3.Swagger to openapi3.T. Use GetSpec instead. This wrapper is retained for backwards compatibility.

func PathToRawSpec

func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error)

Constructs a synthetic filesystem for resolving external references when loading openapi specifications.

func RegisterHandlers

func RegisterHandlers(router EchoRouter, si ServerInterface)

RegisterHandlers adds each server route to the EchoRouter.

func RegisterHandlersWithBaseURL

func RegisterHandlersWithBaseURL(router EchoRouter, si ServerInterface, baseURL string)

RegisterHandlersWithBaseURL registers handlers and prepends BaseURL to the paths so the API can be served under a prefix.

func RegisterHandlersWithOptions

func RegisterHandlersWithOptions(router EchoRouter, si ServerInterface, options RegisterHandlersOptions)

RegisterHandlersWithOptions registers handlers using the supplied options, including any per-operation middleware.

Types

type BorrowReply

type BorrowReply struct {
	// Answer Example: true
	Answer bool `json:"answer"`

	// Comment Example: 2/20に部室に置きます
	Comment string `json:"comment"`
}

BorrowReply defines model for borrowReply.

type BorrowRequest

type BorrowRequest struct {
	// BorrowInClubRoom Example: true
	BorrowInClubRoom bool `json:"borrowInClubRoom"`

	// DueDate Example: 2024-02-16
	DueDate openapi_types.Date `json:"dueDate"`

	// Propose Example: 読みたかったから。
	Propose *string `json:"propose,omitempty"`
}

BorrowRequest defines model for borrowRequest.

type BorrowRequestEquipment

type BorrowRequestEquipment struct {
	// BorrowInClubRoom Example: true
	BorrowInClubRoom bool `json:"borrowInClubRoom"`

	// Count Example: 1
	Count *int `json:"count,omitempty"`

	// DueDate Example: 2024-02-16
	DueDate openapi_types.Date `json:"dueDate"`

	// Propose Example: 読みたかったから。
	Propose *string `json:"propose,omitempty"`
}

BorrowRequestEquipment defines model for borrowRequestEquipment.

type BorrowReturn

type BorrowReturn struct {
	// Text Example: ありがとうございました。面白かったです
	Text string `json:"text"`
}

BorrowReturn defines model for borrowReturn.

type Borrowing

type Borrowing struct {
	// BorrowInClubRoom Example: true
	BorrowInClubRoom bool `json:"borrowInClubRoom"`

	// DueDate Example: 2024-02-16
	DueDate openapi_types.Date `json:"dueDate"`

	// Id Example: 1
	Id int `json:"id"`

	// Propose Example: 読みたかったから。
	Propose *string `json:"propose,omitempty"`
}

Borrowing defines model for borrowing.

type BorrowingIdInPath

type BorrowingIdInPath = int

BorrowingIdInPath defines model for borrowingIdInPath.

type Comment

type Comment struct {
	// CreatedAt Example: 2019-07-28T22:00:00Z
	CreatedAt *time.Time `json:"createdAt,omitempty"`

	// DeletedAt Example: 2019-07-28T22:00:00Z
	DeletedAt nullable.Nullable[time.Time] `json:"deletedAt,omitempty"`

	// Id Example: 1
	Id   *int         `json:"id,omitempty"`
	Item *ItemSummary `json:"item,omitempty"`

	// ItemId Example: 1
	ItemId *int `json:"itemId,omitempty"`

	// Text Example: 小説版は夏美の心理描写がよく描かれていて、映画版を補完するものになっている。あとがきと解説だけでも読む価値はあると思います。
	Text string `json:"text"`

	// UpdatedAt Example: 2019-07-28T22:00:00Z
	UpdatedAt *time.Time `json:"updatedAt,omitempty"`

	// UserId Example: s9
	UserId *string `json:"userId,omitempty"`
}

Comment defines model for comment.

type EchoRouter

type EchoRouter interface {
	CONNECT(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	DELETE(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	GET(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	HEAD(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	OPTIONS(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	PATCH(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	POST(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	PUT(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	TRACE(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
}

This is a simple interface which specifies echo.Route addition functions which are present on both echo.Echo and echo.Group, since we want to allow using either of them for path registration

type EditItemJSONRequestBody

type EditItemJSONRequestBody = ItemPostRequest

EditItemJSONRequestBody defines body for EditItem for application/json ContentType.

type EditItemOwnersJSONRequestBody

type EditItemOwnersJSONRequestBody = PostOwnership

EditItemOwnersJSONRequestBody defines body for EditItemOwners for application/json ContentType.

type File

type File struct {
	// Id ファイルID
	//
	// Example: 1
	Id int `json:"id"`

	// Url ファイルURL
	//
	// Example: /api/files/1
	Url string `json:"url"`
}

File defines model for file.

type FileIdInPath

type FileIdInPath = int

FileIdInPath defines model for fileIdInPath.

type GetItemsParams

type GetItemsParams struct {
	// UserId 指定したユーザーの所有する物品一覧を取得します。
	UserId *string `form:"userId,omitempty" json:"userId,omitempty"`

	// Search 名称が部分一致する物品一覧を取得します。
	Search *string `form:"search,omitempty" json:"search,omitempty"`

	// Rental 指定したユーザーの借りている物品一覧を取得します。
	Rental *string `form:"rental,omitempty" json:"rental,omitempty"`

	// Limit 取得したい件数を指定します。リクエストした件数が全部の件数より多い場合は全部の一覧になります。
	Limit *int `form:"limit,omitempty" json:"limit,omitempty"`

	// Offset 取得したいデータの開始場所を指定します。リクエストした件数が全部の件数より多い場合は空の配列が返ってきます。
	Offset *int `form:"offset,omitempty" json:"offset,omitempty"`

	// Tag リクエストしたタグのついている物品一覧を取得します。
	Tag *[]string `form:"tag,omitempty" json:"tag,omitempty"`

	// TagExclude リクエストしたタグのついている物品一覧を除外します
	TagExclude *[]string `form:"tag-exclude,omitempty" json:"tag-exclude,omitempty"`

	// Sortby 何の要素でソートするか
	Sortby *string `form:"sortby,omitempty" json:"sortby,omitempty"`
}

GetItemsParams defines parameters for GetItems.

type IsBook

type IsBook = bool

IsBook アイテム種別 本でない/本

type IsEquipment

type IsEquipment = bool

IsEquipment アイテム種別 個人所有/備品

type Item

type Item struct {
	// Code Example: 9784041026403
	Code     *string    `json:"code,omitempty"`
	Comments *[]Comment `json:"comments,omitempty"`

	// Count Example: 100
	Count *int `json:"count,omitempty"`

	// CreatedAt Example: 2019-07-28T22:00:00Z
	CreatedAt time.Time `json:"createdAt"`

	// DeletedAt Example: 2019-07-28T22:00:00Z
	DeletedAt nullable.Nullable[time.Time] `json:"deletedAt"`

	// Description Example: 高校1年の夏、帆高(ほだか)は離島から家出し、東京にやってきた。連日降り続ける雨の中、雑踏ひしめく都会の片隅で、帆高は不思議な能力を持つ少女・陽菜(ひな)に出会う。「ねぇ、今から晴れるよ」。それは祈るだけで、空を晴れに出来る力だった――。天候の調和が狂っていく時代に、運命に翻弄される少年と少女が自らの生き方を「選択」する物語。長編アニメーション映画『天気の子』の、新海誠監督自身が執筆した原作小説。
	Description string `json:"description"`

	// Id Example: 1
	Id int `json:"id"`

	// ImgUrl Example: https://cover.openbd.jp/9784041026403.jpg
	ImgUrl string `json:"imgUrl"`

	// IsBook アイテム種別 本でない/本
	IsBook IsBook `json:"isBook"`

	// IsTrapItem アイテム種別 個人所有/備品
	IsTrapItem IsEquipment `json:"isTrapItem"`

	// Name Example: 小説 天気の子
	Name string `json:"name"`
	Tags *[]Tag `json:"tags,omitempty"`

	// UpdatedAt Example: 2019-07-28T22:00:00Z
	UpdatedAt time.Time `json:"updatedAt"`
	// contains filtered or unexported fields
}

Item defines model for item.

func (Item) AsItem0

func (t Item) AsItem0() (Item0, error)

AsItem0 returns the union data inside the Item as a Item0

func (Item) AsItem1

func (t Item) AsItem1() (Item1, error)

AsItem1 returns the union data inside the Item as a Item1

func (*Item) FromItem0

func (t *Item) FromItem0(v Item0) error

FromItem0 overwrites any union data inside the Item as the provided Item0

func (*Item) FromItem1

func (t *Item) FromItem1(v Item1) error

FromItem1 overwrites any union data inside the Item as the provided Item1

func (Item) MarshalJSON

func (t Item) MarshalJSON() ([]byte, error)

func (*Item) MergeItem0

func (t *Item) MergeItem0(v Item0) error

MergeItem0 performs a merge with any union data inside the Item, using the provided Item0

func (*Item) MergeItem1

func (t *Item) MergeItem1(v Item1) error

MergeItem1 performs a merge with any union data inside the Item, using the provided Item1

func (*Item) UnmarshalJSON

func (t *Item) UnmarshalJSON(b []byte) error

type Item0

type Item0 struct {
	Count    int `json:"count"`
	CountMax int `json:"countMax"`
}

Item0 defines model for Item.0.

type Item1

type Item1 struct {
	Ownerships []Ownership `json:"ownerships"`
}

Item1 defines model for Item.1.

type ItemDetail

type ItemDetail struct {
	// Code Example: 9784041026403
	Code     *string    `json:"code,omitempty"`
	Comments *[]Comment `json:"comments,omitempty"`

	// Count Example: 100
	Count *int `json:"count,omitempty"`

	// CreatedAt Example: 2019-07-28T22:00:00Z
	CreatedAt time.Time `json:"createdAt"`

	// DeletedAt Example: 2019-07-28T22:00:00Z
	DeletedAt nullable.Nullable[time.Time] `json:"deletedAt"`

	// Description Example: 高校1年の夏、帆高(ほだか)は離島から家出し、東京にやってきた。連日降り続ける雨の中、雑踏ひしめく都会の片隅で、帆高は不思議な能力を持つ少女・陽菜(ひな)に出会う。「ねぇ、今から晴れるよ」。それは祈るだけで、空を晴れに出来る力だった――。天候の調和が狂っていく時代に、運命に翻弄される少年と少女が自らの生き方を「選択」する物語。長編アニメーション映画『天気の子』の、新海誠監督自身が執筆した原作小説。
	Description string `json:"description"`

	// Id Example: 1
	Id int `json:"id"`

	// ImgUrl Example: https://cover.openbd.jp/9784041026403.jpg
	ImgUrl string `json:"imgUrl"`

	// IsBook アイテム種別 本でない/本
	IsBook IsBook `json:"isBook"`

	// IsTrapItem アイテム種別 個人所有/備品
	IsTrapItem   IsEquipment `json:"isTrapItem"`
	LikesByUsers *[]string   `json:"likesByUsers,omitempty"`

	// Name Example: 小説 天気の子
	Name string `json:"name"`
	Tags *[]Tag `json:"tags,omitempty"`

	// UpdatedAt Example: 2019-07-28T22:00:00Z
	UpdatedAt time.Time `json:"updatedAt"`
	// contains filtered or unexported fields
}

ItemDetail defines model for itemDetail.

func (ItemDetail) AsItemDetail0

func (t ItemDetail) AsItemDetail0() (ItemDetail0, error)

AsItemDetail0 returns the union data inside the ItemDetail as a ItemDetail0

func (ItemDetail) AsItemDetail1

func (t ItemDetail) AsItemDetail1() (ItemDetail1, error)

AsItemDetail1 returns the union data inside the ItemDetail as a ItemDetail1

func (ItemDetail) AsItemDetail2

func (t ItemDetail) AsItemDetail2() (ItemDetail2, error)

AsItemDetail2 returns the union data inside the ItemDetail as a ItemDetail2

func (ItemDetail) AsItemDetail3

func (t ItemDetail) AsItemDetail3() (ItemDetail3, error)

AsItemDetail3 returns the union data inside the ItemDetail as a ItemDetail3

func (*ItemDetail) FromItemDetail0

func (t *ItemDetail) FromItemDetail0(v ItemDetail0) error

FromItemDetail0 overwrites any union data inside the ItemDetail as the provided ItemDetail0

func (*ItemDetail) FromItemDetail1

func (t *ItemDetail) FromItemDetail1(v ItemDetail1) error

FromItemDetail1 overwrites any union data inside the ItemDetail as the provided ItemDetail1

func (*ItemDetail) FromItemDetail2

func (t *ItemDetail) FromItemDetail2(v ItemDetail2) error

FromItemDetail2 overwrites any union data inside the ItemDetail as the provided ItemDetail2

func (*ItemDetail) FromItemDetail3

func (t *ItemDetail) FromItemDetail3(v ItemDetail3) error

FromItemDetail3 overwrites any union data inside the ItemDetail as the provided ItemDetail3

func (ItemDetail) MarshalJSON

func (t ItemDetail) MarshalJSON() ([]byte, error)

func (*ItemDetail) MergeItemDetail0

func (t *ItemDetail) MergeItemDetail0(v ItemDetail0) error

MergeItemDetail0 performs a merge with any union data inside the ItemDetail, using the provided ItemDetail0

func (*ItemDetail) MergeItemDetail1

func (t *ItemDetail) MergeItemDetail1(v ItemDetail1) error

MergeItemDetail1 performs a merge with any union data inside the ItemDetail, using the provided ItemDetail1

func (*ItemDetail) MergeItemDetail2

func (t *ItemDetail) MergeItemDetail2(v ItemDetail2) error

MergeItemDetail2 performs a merge with any union data inside the ItemDetail, using the provided ItemDetail2

func (*ItemDetail) MergeItemDetail3

func (t *ItemDetail) MergeItemDetail3(v ItemDetail3) error

MergeItemDetail3 performs a merge with any union data inside the ItemDetail, using the provided ItemDetail3

func (*ItemDetail) UnmarshalJSON

func (t *ItemDetail) UnmarshalJSON(b []byte) error

type ItemDetail0

type ItemDetail0 struct {
	TransactionsEquipment []TransactionEquipment `json:"transactionsEquipment"`
}

ItemDetail0 defines model for ItemDetail.0.

type ItemDetail1

type ItemDetail1 struct {
	Transactions []Transaction `json:"transactions"`
}

ItemDetail1 defines model for ItemDetail.1.

type ItemDetail2

type ItemDetail2 struct {
	Count    int `json:"count"`
	CountMax int `json:"countMax"`
}

ItemDetail2 defines model for ItemDetail.2.

type ItemDetail3

type ItemDetail3 struct {
	Ownerships []Ownership `json:"ownerships"`
}

ItemDetail3 defines model for ItemDetail.3.

type ItemIdInPath

type ItemIdInPath = int

ItemIdInPath defines model for itemIdInPath.

type ItemPostRequest

type ItemPostRequest struct {
	// Code Example: 9784041026403
	Code *string `json:"code,omitempty"`

	// Count Example: 100
	Count *int `json:"count,omitempty"`

	// Description Example: 高校1年の夏、帆高(ほだか)は離島から家出し、東京にやってきた。連日降り続ける雨の中、雑踏ひしめく都会の片隅で、帆高は不思議な能力を持つ少女・陽菜(ひな)に出会う。「ねぇ、今から晴れるよ」。それは祈るだけで、空を晴れに出来る力だった――。天候の調和が狂っていく時代に、運命に翻弄される少年と少女が自らの生き方を「選択」する物語。長編アニメーション映画『天気の子』の、新海誠監督自身が執筆した原作小説。
	Description string `json:"description"`

	// ImgUrl Example: https://cover.openbd.jp/9784041026403.jpg
	ImgUrl string `json:"imgUrl"`

	// IsBook アイテム種別 本でない/本
	IsBook IsBook `json:"isBook"`

	// IsTrapItem アイテム種別 個人所有/備品
	IsTrapItem IsEquipment `json:"isTrapItem"`

	// Name Example: 小説 天気の子
	Name string    `json:"name"`
	Tags *[]string `json:"tags,omitempty"`
}

ItemPostRequest defines model for itemPostRequest.

type ItemPosted

type ItemPosted struct {
	// Code Example: 9784041026403
	Code *string `json:"code,omitempty"`

	// Count Example: 100
	Count *int `json:"count,omitempty"`

	// CreatedAt Example: 2019-07-28T22:00:00Z
	CreatedAt time.Time `json:"createdAt"`

	// DeletedAt Example: 2019-07-28T22:00:00Z
	DeletedAt nullable.Nullable[time.Time] `json:"deletedAt"`

	// Description Example: 高校1年の夏、帆高(ほだか)は離島から家出し、東京にやってきた。連日降り続ける雨の中、雑踏ひしめく都会の片隅で、帆高は不思議な能力を持つ少女・陽菜(ひな)に出会う。「ねぇ、今から晴れるよ」。それは祈るだけで、空を晴れに出来る力だった――。天候の調和が狂っていく時代に、運命に翻弄される少年と少女が自らの生き方を「選択」する物語。長編アニメーション映画『天気の子』の、新海誠監督自身が執筆した原作小説。
	Description string `json:"description"`

	// Id Example: 1
	Id int `json:"id"`

	// ImgUrl Example: https://cover.openbd.jp/9784041026403.jpg
	ImgUrl string `json:"imgUrl"`

	// IsBook アイテム種別 本でない/本
	IsBook IsBook `json:"isBook"`

	// IsTrapItem アイテム種別 個人所有/備品
	IsTrapItem IsEquipment `json:"isTrapItem"`

	// Name Example: 小説 天気の子
	Name string    `json:"name"`
	Tags *[]string `json:"tags,omitempty"`

	// UpdatedAt Example: 2019-07-28T22:00:00Z
	UpdatedAt time.Time `json:"updatedAt"`
}

ItemPosted defines model for itemPosted.

type ItemSummary

type ItemSummary struct {
	// Code Example: 9784041026403
	Code     *string    `json:"code,omitempty"`
	Comments *[]Comment `json:"comments,omitempty"`

	// Count Example: 100
	Count *int `json:"count,omitempty"`

	// CreatedAt Example: 2019-07-28T22:00:00Z
	CreatedAt time.Time `json:"createdAt"`

	// DeletedAt Example: 2019-07-28T22:00:00Z
	DeletedAt nullable.Nullable[time.Time] `json:"deletedAt"`

	// Description Example: 高校1年の夏、帆高(ほだか)は離島から家出し、東京にやってきた。連日降り続ける雨の中、雑踏ひしめく都会の片隅で、帆高は不思議な能力を持つ少女・陽菜(ひな)に出会う。「ねぇ、今から晴れるよ」。それは祈るだけで、空を晴れに出来る力だった――。天候の調和が狂っていく時代に、運命に翻弄される少年と少女が自らの生き方を「選択」する物語。長編アニメーション映画『天気の子』の、新海誠監督自身が執筆した原作小説。
	Description string `json:"description"`

	// Id Example: 1
	Id int `json:"id"`

	// ImgUrl Example: https://cover.openbd.jp/9784041026403.jpg
	ImgUrl string `json:"imgUrl"`

	// IsBook アイテム種別 本でない/本
	IsBook IsBook `json:"isBook"`

	// IsLiked Example: true
	IsLiked *bool `json:"isLiked,omitempty"`

	// IsTrapItem アイテム種別 個人所有/備品
	IsTrapItem IsEquipment `json:"isTrapItem"`

	// LikeCounts Example: 1
	LikeCounts *int `json:"likeCounts,omitempty"`

	// Name Example: 小説 天気の子
	Name string `json:"name"`
	Tags *[]Tag `json:"tags,omitempty"`

	// UpdatedAt Example: 2019-07-28T22:00:00Z
	UpdatedAt time.Time `json:"updatedAt"`
	// contains filtered or unexported fields
}

ItemSummary defines model for itemSummary.

func (ItemSummary) AsItemSummary0

func (t ItemSummary) AsItemSummary0() (ItemSummary0, error)

AsItemSummary0 returns the union data inside the ItemSummary as a ItemSummary0

func (ItemSummary) AsItemSummary1

func (t ItemSummary) AsItemSummary1() (ItemSummary1, error)

AsItemSummary1 returns the union data inside the ItemSummary as a ItemSummary1

func (*ItemSummary) FromItemSummary0

func (t *ItemSummary) FromItemSummary0(v ItemSummary0) error

FromItemSummary0 overwrites any union data inside the ItemSummary as the provided ItemSummary0

func (*ItemSummary) FromItemSummary1

func (t *ItemSummary) FromItemSummary1(v ItemSummary1) error

FromItemSummary1 overwrites any union data inside the ItemSummary as the provided ItemSummary1

func (ItemSummary) MarshalJSON

func (t ItemSummary) MarshalJSON() ([]byte, error)

func (*ItemSummary) MergeItemSummary0

func (t *ItemSummary) MergeItemSummary0(v ItemSummary0) error

MergeItemSummary0 performs a merge with any union data inside the ItemSummary, using the provided ItemSummary0

func (*ItemSummary) MergeItemSummary1

func (t *ItemSummary) MergeItemSummary1(v ItemSummary1) error

MergeItemSummary1 performs a merge with any union data inside the ItemSummary, using the provided ItemSummary1

func (*ItemSummary) UnmarshalJSON

func (t *ItemSummary) UnmarshalJSON(b []byte) error

type ItemSummary0

type ItemSummary0 struct {
	Count    int `json:"count"`
	CountMax int `json:"countMax"`
}

ItemSummary0 defines model for ItemSummary.0.

type ItemSummary1

type ItemSummary1 struct {
	Ownerships []Ownership `json:"ownerships"`
}

ItemSummary1 defines model for ItemSummary.1.

type Owner

type Owner struct {
	// Count Example: 1
	Count int `json:"count"`

	// CreatedAt Example: 2019-07-28T22:00:00Z
	CreatedAt time.Time `json:"createdAt"`

	// DeletedAt Example: 2019-07-28T22:00:00Z
	DeletedAt time.Time `json:"deletedAt"`

	// Id Example: 1
	Id int `json:"id"`

	// OwnerId Example: 1
	OwnerId int `json:"ownerId"`

	// Rentalable Example: true
	Rentalable bool `json:"rentalable"`

	// UpdatedAt Example: 2019-07-28T22:00:00Z
	UpdatedAt time.Time `json:"updatedAt"`

	// UserId Example: s9
	UserId string `json:"userId"`
}

Owner defines model for owner.

type Ownership

type Ownership struct {
	// Id Example: 1
	Id *int `json:"id,omitempty"`

	// ItemId Example: 1
	ItemId *int `json:"itemId,omitempty"`

	// Memo Example: おもしろいのでぜひ読んでください
	Memo string `json:"memo"`

	// Rentalable Example: true
	Rentalable  bool         `json:"rentalable"`
	Transaction *Transaction `json:"transaction,omitempty"`

	// UserId Example: s9
	UserId string `json:"userId"`
}

Ownership defines model for ownership.

type OwnershipIdInPath

type OwnershipIdInPath = int

OwnershipIdInPath defines model for ownershipIdInPath.

type PostBorrowEquipmentJSONRequestBody

type PostBorrowEquipmentJSONRequestBody = BorrowRequestEquipment

PostBorrowEquipmentJSONRequestBody defines body for PostBorrowEquipment for application/json ContentType.

type PostBorrowEquipmentReturnJSONRequestBody

type PostBorrowEquipmentReturnJSONRequestBody = BorrowReturn

PostBorrowEquipmentReturnJSONRequestBody defines body for PostBorrowEquipmentReturn for application/json ContentType.

type PostBorrowJSONRequestBody

type PostBorrowJSONRequestBody = BorrowRequest

PostBorrowJSONRequestBody defines body for PostBorrow for application/json ContentType.

type PostBorrowReplyJSONRequestBody

type PostBorrowReplyJSONRequestBody = BorrowReply

PostBorrowReplyJSONRequestBody defines body for PostBorrowReply for application/json ContentType.

type PostComment

type PostComment struct {
	// Text Example: 小説版は夏美の心理描写がよく描かれていて、映画版を補完するものになっている。あとがきと解説だけでも読む価値はあると思います。
	Text string `json:"text"`
}

PostComment defines model for postComment.

type PostCommentJSONRequestBody

type PostCommentJSONRequestBody = PostComment

PostCommentJSONRequestBody defines body for PostComment for application/json ContentType.

type PostFileMultipartBody

type PostFileMultipartBody struct {
	// File 3MBまでのJPG, PNGファイル
	File *openapi_types.File `json:"file,omitempty"`
}

PostFileMultipartBody defines parameters for PostFile.

type PostFileMultipartRequestBody

type PostFileMultipartRequestBody PostFileMultipartBody

PostFileMultipartRequestBody defines body for PostFile for multipart/form-data ContentType.

type PostItemJSONBody

type PostItemJSONBody = []ItemPostRequest

PostItemJSONBody defines parameters for PostItem.

type PostItemJSONRequestBody

type PostItemJSONRequestBody = PostItemJSONBody

PostItemJSONRequestBody defines body for PostItem for application/json ContentType.

type PostItemOwnersJSONRequestBody

type PostItemOwnersJSONRequestBody = PostOwnership

PostItemOwnersJSONRequestBody defines body for PostItemOwners for application/json ContentType.

type PostOwnership

type PostOwnership struct {
	// Memo Example: 読んでください
	Memo string `json:"memo"`

	// Rentalable Example: true
	Rentalable bool `json:"rentalable"`

	// UserId Example: s9
	UserId string `json:"userId"`
}

PostOwnership defines model for postOwnership.

type PostReturnJSONRequestBody

type PostReturnJSONRequestBody = BorrowReturn

PostReturnJSONRequestBody defines body for PostReturn for application/json ContentType.

type RegisterHandlersOptions

type RegisterHandlersOptions struct {
	// BaseURL is prepended to every registered path so the API can be served
	// under a prefix.
	BaseURL string
	// OperationMiddlewares lets the caller attach per-operation middleware at
	// registration time. The map key is the OpenAPI `operationId` value as it
	// appears in the spec (the raw, un-normalized form). Operations that have
	// no entry are registered with no extra middleware. A nil map disables
	// per-operation middleware entirely.
	OperationMiddlewares map[string][]echo.MiddlewareFunc
}

RegisterHandlersOptions configures RegisterHandlersWithOptions.

type ServerInterface

type ServerInterface interface {
	// PostFile 画像ファイルをアップロードします。
	// (POST /files)
	PostFile(ctx echo.Context) error
	// GetFile 画像ファイルをダウンロードします。
	// (GET /files/{fileId})
	GetFile(ctx echo.Context, fileId FileIdInPath) error
	// GetItems 物品の一覧を取得します。
	// (GET /items)
	GetItems(ctx echo.Context, params GetItemsParams) error
	// PostItem 物品を新しく登録します。
	// (POST /items)
	PostItem(ctx echo.Context) error
	// DeleteItem 物品を削除します。
	// (DELETE /items/{itemId})
	DeleteItem(ctx echo.Context, itemId ItemIdInPath) error
	// GetItem 物品の詳細情報を取得します。
	// (GET /items/{itemId})
	GetItem(ctx echo.Context, itemId ItemIdInPath) error
	// EditItem 物品の情報を変更します。
	// (PATCH /items/{itemId})
	EditItem(ctx echo.Context, itemId ItemIdInPath) error
	// PostBorrowEquipment 備品を借ります。
	// (POST /items/{itemId}/borrowing/equipment)
	PostBorrowEquipment(ctx echo.Context, itemId ItemIdInPath) error
	// PostBorrowEquipmentReturn 備品を返します。
	// (POST /items/{itemId}/borrowing/equipment/{borrowingId}/return)
	PostBorrowEquipmentReturn(ctx echo.Context, itemId ItemIdInPath, borrowingId BorrowingIdInPath) error
	// PostComment コメントを新規作成します。
	// (POST /items/{itemId}/comments)
	PostComment(ctx echo.Context, itemId ItemIdInPath) error
	// RemoveLike 物品のいいねを取り消します。
	// (DELETE /items/{itemId}/likes)
	RemoveLike(ctx echo.Context, itemId ItemIdInPath) error
	// AddLike 物品にいいねをつけます。
	// (POST /items/{itemId}/likes)
	AddLike(ctx echo.Context, itemId ItemIdInPath) error
	// PostItemOwners 物品の所有者を追加します。
	// (POST /items/{itemId}/owners)
	PostItemOwners(ctx echo.Context, itemId ItemIdInPath) error
	// DeleteItemOwners 物品の所有者を削除します
	// (DELETE /items/{itemId}/owners/{ownershipId})
	DeleteItemOwners(ctx echo.Context, itemId ItemIdInPath, ownershipId OwnershipIdInPath) error
	// EditItemOwners 物品の所有者を編集します。(所有者と管理者のみ)
	// (PATCH /items/{itemId}/owners/{ownershipId})
	EditItemOwners(ctx echo.Context, itemId ItemIdInPath, ownershipId OwnershipIdInPath) error
	// PostBorrow 個人所有物を「借りたい」と意見表明します。
	// (POST /items/{itemId}/owners/{ownershipId}/borrowings)
	PostBorrow(ctx echo.Context, itemId ItemIdInPath, ownershipId OwnershipIdInPath) error
	// GetBorrowingById 個人所有物を借りたいという要望を取得します。 (○○日に借りたい、○○日に返す予定、など)
	// (GET /items/{itemId}/owners/{ownershipId}/borrowings/{borrowingId})
	GetBorrowingById(ctx echo.Context, itemId ItemIdInPath, ownershipId OwnershipIdInPath, borrowingId BorrowingIdInPath) error
	// PostBorrowReply 個人所有物を○○日まで借りたいという要望に対して返答します。
	// (POST /items/{itemId}/owners/{ownershipId}/borrowings/{borrowingId}/reply)
	PostBorrowReply(ctx echo.Context, itemId ItemIdInPath, ownershipId OwnershipIdInPath, borrowingId BorrowingIdInPath) error
	// PostReturn 個人所有物を返します。
	// (POST /items/{itemId}/owners/{ownershipId}/borrowings/{borrowingId}/return)
	PostReturn(ctx echo.Context, itemId ItemIdInPath, ownershipId OwnershipIdInPath, borrowingId BorrowingIdInPath) error
}

ServerInterface represents all server handlers.

type ServerInterfaceWrapper

type ServerInterfaceWrapper struct {
	Handler ServerInterface
}

ServerInterfaceWrapper converts echo contexts to parameters.

func (*ServerInterfaceWrapper) AddLike

func (w *ServerInterfaceWrapper) AddLike(ctx echo.Context) error

AddLike converts echo context to params.

func (*ServerInterfaceWrapper) DeleteItem

func (w *ServerInterfaceWrapper) DeleteItem(ctx echo.Context) error

DeleteItem converts echo context to params.

func (*ServerInterfaceWrapper) DeleteItemOwners

func (w *ServerInterfaceWrapper) DeleteItemOwners(ctx echo.Context) error

DeleteItemOwners converts echo context to params.

func (*ServerInterfaceWrapper) EditItem

func (w *ServerInterfaceWrapper) EditItem(ctx echo.Context) error

EditItem converts echo context to params.

func (*ServerInterfaceWrapper) EditItemOwners

func (w *ServerInterfaceWrapper) EditItemOwners(ctx echo.Context) error

EditItemOwners converts echo context to params.

func (*ServerInterfaceWrapper) GetBorrowingById

func (w *ServerInterfaceWrapper) GetBorrowingById(ctx echo.Context) error

GetBorrowingById converts echo context to params.

func (*ServerInterfaceWrapper) GetFile

func (w *ServerInterfaceWrapper) GetFile(ctx echo.Context) error

GetFile converts echo context to params.

func (*ServerInterfaceWrapper) GetItem

func (w *ServerInterfaceWrapper) GetItem(ctx echo.Context) error

GetItem converts echo context to params.

func (*ServerInterfaceWrapper) GetItems

func (w *ServerInterfaceWrapper) GetItems(ctx echo.Context) error

GetItems converts echo context to params.

func (*ServerInterfaceWrapper) PostBorrow

func (w *ServerInterfaceWrapper) PostBorrow(ctx echo.Context) error

PostBorrow converts echo context to params.

func (*ServerInterfaceWrapper) PostBorrowEquipment

func (w *ServerInterfaceWrapper) PostBorrowEquipment(ctx echo.Context) error

PostBorrowEquipment converts echo context to params.

func (*ServerInterfaceWrapper) PostBorrowEquipmentReturn

func (w *ServerInterfaceWrapper) PostBorrowEquipmentReturn(ctx echo.Context) error

PostBorrowEquipmentReturn converts echo context to params.

func (*ServerInterfaceWrapper) PostBorrowReply

func (w *ServerInterfaceWrapper) PostBorrowReply(ctx echo.Context) error

PostBorrowReply converts echo context to params.

func (*ServerInterfaceWrapper) PostComment

func (w *ServerInterfaceWrapper) PostComment(ctx echo.Context) error

PostComment converts echo context to params.

func (*ServerInterfaceWrapper) PostFile

func (w *ServerInterfaceWrapper) PostFile(ctx echo.Context) error

PostFile converts echo context to params.

func (*ServerInterfaceWrapper) PostItem

func (w *ServerInterfaceWrapper) PostItem(ctx echo.Context) error

PostItem converts echo context to params.

func (*ServerInterfaceWrapper) PostItemOwners

func (w *ServerInterfaceWrapper) PostItemOwners(ctx echo.Context) error

PostItemOwners converts echo context to params.

func (*ServerInterfaceWrapper) PostReturn

func (w *ServerInterfaceWrapper) PostReturn(ctx echo.Context) error

PostReturn converts echo context to params.

func (*ServerInterfaceWrapper) RemoveLike

func (w *ServerInterfaceWrapper) RemoveLike(ctx echo.Context) error

RemoveLike converts echo context to params.

type Tag

type Tag struct {
	// Name Example: 小説
	Name string `json:"name"`
}

Tag defines model for tag.

type TagIdInPath

type TagIdInPath = int

TagIdInPath defines model for tagIdInPath.

type Transaction

type Transaction struct {
	// CheckoutDate Example: 2024-02-16
	CheckoutDate openapi_types.Date `json:"checkout_date"`

	// CreatedAt Example: 2019-07-28T22:00:00Z
	CreatedAt *time.Time `json:"createdAt,omitempty"`

	// DeletedAt Example: 2019-07-28T22:00:00Z
	DeletedAt nullable.Nullable[time.Time] `json:"deletedAt,omitempty"`

	// DueDate Example: 2024-02-16
	DueDate openapi_types.Date `json:"due_date"`

	// Id Example: 1
	Id *int `json:"id,omitempty"`

	// Message Example: 2/17に部室でお貸しします
	Message string `json:"message"`

	// OwnershipId Example: 1
	OwnershipId *int `json:"ownershipId,omitempty"`

	// Purpose Example: 読みたかったから。
	Purpose *string `json:"purpose,omitempty"`

	// ReturnMessage Example: ずっと読みたかったんですよね。ありがとう!
	ReturnMessage string `json:"returnMessage"`

	// ReturnDate Example: 2024-02-16
	ReturnDate openapi_types.Date `json:"return_date"`

	// Status 0=リクエスト済み、1=貸し出し中、2=返却済み、3=貸し出し拒否
	//
	// Example: 1
	Status *int `json:"status,omitempty"`

	// UpdatedAt Example: 2019-07-28T22:00:00Z
	UpdatedAt *time.Time `json:"updatedAt,omitempty"`

	// UserId Example: s9
	UserId *string `json:"userId,omitempty"`
}

Transaction defines model for transaction.

type TransactionEquipment

type TransactionEquipment struct {
	// CreatedAt Example: 2019-07-28T22:00:00Z
	CreatedAt *time.Time `json:"createdAt,omitempty"`

	// DeletedAt Example: 2019-07-28T22:00:00Z
	DeletedAt nullable.Nullable[time.Time] `json:"deletedAt,omitempty"`

	// DueDate Example: 2024-02-16
	DueDate openapi_types.Date `json:"due_date"`

	// Id Example: 1
	Id *int `json:"id,omitempty"`

	// ItemId Example: 1
	ItemId *int `json:"itemId,omitempty"`

	// Purpose Example: 読みたかったから。
	Purpose *string `json:"purpose,omitempty"`

	// ReturnDate Example: 2024-02-16
	ReturnDate openapi_types.Date `json:"return_date"`

	// Status 0=リクエスト済み、1=貸し出し中、2=返却済み、3=貸し出し拒否
	//
	// Example: 1
	Status *int `json:"status,omitempty"`

	// UpdatedAt Example: 2019-07-28T22:00:00Z
	UpdatedAt *time.Time `json:"updatedAt,omitempty"`

	// UserId Example: s9
	UserId *string `json:"userId,omitempty"`
}

TransactionEquipment defines model for transactionEquipment.

Jump to

Keyboard shortcuts

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