Documentation
¶
Index ¶
- Constants
- func Run()
- func SetCacheControlPrivate(next echo.HandlerFunc) echo.HandlerFunc
- type BillingHandlerResult
- type BillingReport
- type CompetitionDetail
- type CompetitionRank
- type CompetitionRankingHandlerResult
- type CompetitionRow
- type CompetitionsAddHandlerResult
- type CompetitionsHandlerResult
- type FailureResult
- type InitializeHandlerResult
- type JSONSerializer
- type MeHandlerResult
- type PlayerDetail
- type PlayerDisqualifiedHandlerResult
- type PlayerHandlerResult
- type PlayerRow
- type PlayerScoreDetail
- type PlayerScoreRow
- type PlayersAddHandlerResult
- type PlayersListHandlerResult
- type ScoreHandlerResult
- type SuccessResult
- type TenantDetail
- type TenantRow
- type TenantWithBilling
- type TenantsAddHandlerResult
- type TenantsBillingHandlerResult
- type Viewer
- type VisitHistoryRow
- type VisitHistorySummaryRow
Constants ¶
View Source
const ( RoleAdmin = "admin" RoleOrganizer = "organizer" RolePlayer = "player" RoleNone = "none" )
Variables ¶
This section is empty.
Functions ¶
func SetCacheControlPrivate ¶
func SetCacheControlPrivate(next echo.HandlerFunc) echo.HandlerFunc
全APIにCache-Control: privateを設定する
Types ¶
type BillingHandlerResult ¶
type BillingHandlerResult struct {
Reports []BillingReport `json:"reports"`
}
type BillingReport ¶
type BillingReport struct { CompetitionID string `json:"competition_id" db:"competition_id"` CompetitionTitle string `json:"competition_title" db:"competition_title"` PlayerCount int64 `json:"player_count" db:"player_count"` // スコアを登録した参加者数 VisitorCount int64 `json:"visitor_count" db:"visitor_count"` // ランキングを閲覧だけした(スコアを登録していない)参加者数 BillingPlayerYen int64 `json:"billing_player_yen" db:"billing_player_yen"` // 請求金額 スコアを登録した参加者分 BillingVisitorYen int64 `json:"billing_visitor_yen" db:"billing_visitor_yen"` // 請求金額 ランキングを閲覧だけした(スコアを登録していない)参加者分 BillingYen int64 `json:"billing_yen" db:"billing_yen"` // 合計請求金額 }
type CompetitionDetail ¶
type CompetitionRank ¶
type CompetitionRank struct { CompetitionID string `json:"-" db:"competition_id"` Rank int64 `json:"rank" db:"rank"` Score int64 `json:"score" db:"score"` PlayerID string `json:"player_id" db:"player_id"` PlayerDisplayName string `json:"player_display_name" db:"player_display_name"` RowNum int64 `json:"-"` // APIレスポンスのJSONには含まれない }
type CompetitionRankingHandlerResult ¶
type CompetitionRankingHandlerResult struct { Competition CompetitionDetail `json:"competition"` Ranks []CompetitionRank `json:"ranks"` }
type CompetitionRow ¶
type CompetitionsAddHandlerResult ¶
type CompetitionsAddHandlerResult struct {
Competition CompetitionDetail `json:"competition"`
}
type CompetitionsHandlerResult ¶
type CompetitionsHandlerResult struct {
Competitions []CompetitionDetail `json:"competitions"`
}
type FailureResult ¶
type InitializeHandlerResult ¶
type InitializeHandlerResult struct {
Lang string `json:"lang"`
}
type JSONSerializer ¶
type JSONSerializer struct{}
func (*JSONSerializer) Deserialize ¶
func (j *JSONSerializer) Deserialize(c echo.Context, i interface{}) error
func (*JSONSerializer) Serialize ¶
func (j *JSONSerializer) Serialize(c echo.Context, i interface{}, indent string) error
type MeHandlerResult ¶
type MeHandlerResult struct { Tenant *TenantDetail `json:"tenant"` Me *PlayerDetail `json:"me"` Role string `json:"role"` LoggedIn bool `json:"logged_in"` }
type PlayerDetail ¶
type PlayerDisqualifiedHandlerResult ¶
type PlayerDisqualifiedHandlerResult struct {
Player PlayerDetail `json:"player"`
}
type PlayerHandlerResult ¶
type PlayerHandlerResult struct { Player PlayerDetail `json:"player"` Scores []PlayerScoreDetail `json:"scores"` }
type PlayerScoreDetail ¶
type PlayerScoreRow ¶
type PlayersAddHandlerResult ¶
type PlayersAddHandlerResult struct {
Players []PlayerDetail `json:"players"`
}
type PlayersListHandlerResult ¶
type PlayersListHandlerResult struct {
Players []PlayerDetail `json:"players"`
}
type ScoreHandlerResult ¶
type ScoreHandlerResult struct {
Rows int64 `json:"rows"`
}
type SuccessResult ¶
type TenantDetail ¶
type TenantWithBilling ¶
type TenantsAddHandlerResult ¶
type TenantsAddHandlerResult struct {
Tenant TenantWithBilling `json:"tenant"`
}
type TenantsBillingHandlerResult ¶
type TenantsBillingHandlerResult struct {
Tenants []TenantWithBilling `json:"tenants"`
}
type VisitHistoryRow ¶
type VisitHistorySummaryRow ¶
Click to show internal directories.
Click to hide internal directories.