Documentation
¶
Index ¶
- type Handler
- type UserFinder
- type VersusHandler
- func (h *VersusHandler) Accept(c *echo.Context) error
- func (h *VersusHandler) Cancel(c *echo.Context) error
- func (h *VersusHandler) Decline(c *echo.Context) error
- func (h *VersusHandler) History(c *echo.Context) error
- func (h *VersusHandler) Invitations(c *echo.Context) error
- func (h *VersusHandler) Invite(c *echo.Context) error
- func (h *VersusHandler) Report(c *echo.Context) error
- func (h *VersusHandler) SetPublic(c *echo.Context) error
- func (h *VersusHandler) SetRecords(records repository.BubbleVersusRepository, blocks bubbleversus.BlockChecker)
- func (h *VersusHandler) Show(c *echo.Context) error
- func (h *VersusHandler) ShowRecord(c *echo.Context) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler handles bubble-game/* endpoints.
func NewHandler ¶
func NewHandler(repo repository.BubbleGameRepository, idGen id.Generator, entityPacker *entity.Packer) *Handler
NewHandler creates a new bubble-game handler. entityPacker is the Packer this Handler packs entities with (#3794).
type UserFinder ¶
UserFinder resolves users for the versus endpoints.
type VersusHandler ¶
type VersusHandler struct {
// contains filtered or unexported fields
}
VersusHandler handles bubble-game/versus/* (#3230). mk-go 独自の endpoint (upstream にバブルゲームの対戦は無い)。
func NewVersusHandler ¶
func NewVersusHandler(svc *bubbleversus.Service, users UserFinder, entityPacker *entity.Packer) *VersusHandler
NewVersusHandler constructs a VersusHandler. entityPacker is the Packer this VersusHandler packs entities with (#3794); 無いとメディアの URL を生のまま返すので、 構築子の必須の引数で受ける (#3823)。
func (*VersusHandler) Accept ¶
func (h *VersusHandler) Accept(c *echo.Context) error
Accept handles POST /api/bubble-game/versus/accept.
func (*VersusHandler) Cancel ¶
func (h *VersusHandler) Cancel(c *echo.Context) error
Cancel handles POST /api/bubble-game/versus/cancel.
func (*VersusHandler) Decline ¶
func (h *VersusHandler) Decline(c *echo.Context) error
Decline handles POST /api/bubble-game/versus/decline.
func (*VersusHandler) History ¶
func (h *VersusHandler) History(c *echo.Context) error
History handles bubble-game/versus/history: finished matches of userId (default: the caller), newest first. Other users' history only contains matches the caller may see.
func (*VersusHandler) Invitations ¶
func (h *VersusHandler) Invitations(c *echo.Context) error
Invitations handles POST /api/bubble-game/versus/invitations.
func (*VersusHandler) Invite ¶
func (h *VersusHandler) Invite(c *echo.Context) error
Invite handles POST /api/bubble-game/versus/invite.
func (*VersusHandler) Report ¶
func (h *VersusHandler) Report(c *echo.Context) error
Report handles POST /api/bubble-game/versus/report.
func (*VersusHandler) SetPublic ¶
func (h *VersusHandler) SetPublic(c *echo.Context) error
SetPublic handles bubble-game/versus/set-public: the caller's own consent to show the match to others.
func (*VersusHandler) SetRecords ¶
func (h *VersusHandler) SetRecords(records repository.BubbleVersusRepository, blocks bubbleversus.BlockChecker)
SetRecords wires the match records and the block checker used to decide who may see them (#3232).
func (*VersusHandler) Show ¶
func (h *VersusHandler) Show(c *echo.Context) error
Show handles POST /api/bubble-game/versus/show.
func (*VersusHandler) ShowRecord ¶
func (h *VersusHandler) ShowRecord(c *echo.Context) error
ShowRecord handles bubble-game/versus/record: one stored match with both players' logs.