controller

package
v0.0.0-...-4f46f81 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2025 License: BSD-3-Clause Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommunityController

type CommunityController struct {
	// contains filtered or unexported fields
}

func NewCommunityController

func NewCommunityController(
	uc *usecase.CommunityUsecase,
) *CommunityController

func (*CommunityController) CreateCommunity

func (cc *CommunityController) CreateCommunity(
	c *gin.Context,
)

POST /communities

func (*CommunityController) DeleteCommunity

func (cc *CommunityController) DeleteCommunity(
	c *gin.Context,
)

DELETE /communities/:id

func (*CommunityController) GetCommunities

func (cc *CommunityController) GetCommunities(
	c *gin.Context,
)

コミュニティ一覧をJSONで返す

func (*CommunityController) GetCommunity

func (cc *CommunityController) GetCommunity(
	c *gin.Context,
)

GET /communities/:id

type DiplomacyController

type DiplomacyController struct {
	// contains filtered or unexported fields
}

func NewDiplomacyController

func NewDiplomacyController(
	uc *usecase.DiplomacyUsecase,
) *DiplomacyController

func (*DiplomacyController) SimulateDiplomacy

func (dc *DiplomacyController) SimulateDiplomacy(
	c *gin.Context,
)

POST /simulate/diplomacy?commA=...&commB=...

type GenerateImageRequest

type GenerateImageRequest struct {
	Style string `json:"style,omitempty"`
}

リクエストボディ用の構造体

type ImageController

type ImageController struct {
	// contains filtered or unexported fields
}

文化(Culture)テキストを画像生成APIに渡して画像を返却するコントローラ

func NewImageController

func NewImageController(
	cu usecase.CommunityUsecase,
) *ImageController

func (*ImageController) GenerateImage

func (ic *ImageController) GenerateImage(
	c *gin.Context,
)

POST /communities/:communityID/generateImage

type InterferenceController

type InterferenceController struct {
	// contains filtered or unexported fields
}

コミュニティ同士の干渉を行うコントローラ

func (*InterferenceController) SimulateInterferenceBetweenCommunities

func (ic *InterferenceController) SimulateInterferenceBetweenCommunities(
	c *gin.Context,
)

POST /simulate/interference?commA=xxx&commB=yyy

type InterferenceRequest

type InterferenceRequest struct {
	CommA     string `json:"commA"`
	CommB     string `json:"commB"`
	UserInput string `json:"userInput"`
}

リクエストボディの構造体

type SimulateController

type SimulateController struct {
	// contains filtered or unexported fields
}

func (*SimulateController) SetupRoutes

func (sc *SimulateController) SetupRoutes(r *gin.Engine)

ルーティング設定

func (*SimulateController) Simulate

func (sc *SimulateController) Simulate(
	c *gin.Context,
)

POST /simulate/:communityID

type SimulationController

type SimulationController struct {
	// contains filtered or unexported fields
}

func (*SimulationController) GetSimulationHistory

func (sc *SimulationController) GetSimulationHistory(c *gin.Context)

Jump to

Keyboard shortcuts

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