model

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
	EventId int32   `json:"event_id"`
	Name    string  `json:"name"`
	Fights  []Fight `json:"fights"`
	IsDone  bool    `json:"is_done"`
}

Event represents a event struct with []Fights

func ServiceEventToGatewayEvent

func ServiceEventToGatewayEvent(event *eventmodel.Event, fightersList map[int32]*fightersmodel.Fighter) *Event

type EventsResponse

type EventsResponse struct {
	Count  int32    `json:"count"`
	Events []*Event `json:"events"`
}

EventResponse represents a event response with []Event

type Fight

type Fight struct {
	FightId     int32                 `json:"fight_id"`
	EventId     int32                 `json:"event_id,omitempty"`
	FighterRed  fightersmodel.Fighter `json:"fighter_red"`
	FighterBlue fightersmodel.Fighter `json:"fighter_blue"`
	IsDone      bool                  `json:"is_done"`
	IsDraw      bool                  `json:"is_draw"`
	IsCanceled  bool                  `json:"is_canceled"`
	NotContest  bool                  `json:"not_contest"`
	Winner_id   int32                 `json:"winner_id,omitempty"`
	CreatedAt   time.Time             `json:"created_at"`
	FightDate   sql.NullTime          `json:"fight_date,omitempty"`
}

Fight is a structure with information about the fight and contains the structures of the participating fighters

type HealthStatus

type HealthStatus struct {
	AppDevVersion string `json:"app_dev_version"`
	AppName       string `json:"app_name"`
	AppRunDate    int64  `json:"app_run_date"`
	AppTimeAlive  int64  `json:"app_time_alive"`
	Healthy       bool   `json:"healthy"`
	Message       string `json:"message"`
	Timestamp     string `json:"timestamp"`
}

func HealthStatusFromProto

func HealthStatusFromProto(req *gen.HealthResponse) *HealthStatus

Jump to

Keyboard shortcuts

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