Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthResponse ¶
type AuthResponse struct { Token string User UserBriefState }
func (*AuthResponse) MarshalJSON ¶
func (j *AuthResponse) MarshalJSON() ([]byte, error)
MarshalJSON marshal bytes to json - template
func (*AuthResponse) MarshalJSONBuf ¶
func (j *AuthResponse) MarshalJSONBuf(buf fflib.EncodingBuffer) error
MarshalJSONBuf marshal buff to json - template
func (*AuthResponse) UnmarshalJSON ¶
func (j *AuthResponse) UnmarshalJSON(input []byte) error
UnmarshalJSON umarshall json - template of ffjson
func (*AuthResponse) UnmarshalJSONFFLexer ¶
func (j *AuthResponse) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error
UnmarshalJSONFFLexer fast json unmarshall - template ffjson
type BidResponse ¶
type BidResponse struct { UserBalance int `json:",omitempty"` Battle *models.Battle `json:",omitempty"` Error *ErrorDto `json:",omitempty"` }
func (*BidResponse) MarshalJSON ¶
func (j *BidResponse) MarshalJSON() ([]byte, error)
MarshalJSON marshal bytes to json - template
func (*BidResponse) MarshalJSONBuf ¶
func (j *BidResponse) MarshalJSONBuf(buf fflib.EncodingBuffer) error
MarshalJSONBuf marshal buff to json - template
func (*BidResponse) UnmarshalJSON ¶
func (j *BidResponse) UnmarshalJSON(input []byte) error
UnmarshalJSON umarshall json - template of ffjson
func (*BidResponse) UnmarshalJSONFFLexer ¶
func (j *BidResponse) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error
UnmarshalJSONFFLexer fast json unmarshall - template ffjson
type ErrorDto ¶
func (*ErrorDto) MarshalJSON ¶
MarshalJSON marshal bytes to json - template
func (*ErrorDto) MarshalJSONBuf ¶
func (j *ErrorDto) MarshalJSONBuf(buf fflib.EncodingBuffer) error
MarshalJSONBuf marshal buff to json - template
func (*ErrorDto) UnmarshalJSON ¶
UnmarshalJSON umarshall json - template of ffjson
func (*ErrorDto) UnmarshalJSONFFLexer ¶
UnmarshalJSONFFLexer fast json unmarshall - template ffjson
type GameDto ¶
type GameDto struct { ID string `json:",omitempty"` Status string `json:",omitempty"` UserBid int `json:",omitempty"` Prize int `json:",omitempty"` Rival *RivalDto `json:",omitempty"` }
func (*GameDto) MarshalJSON ¶
MarshalJSON marshal bytes to json - template
func (*GameDto) MarshalJSONBuf ¶
func (j *GameDto) MarshalJSONBuf(buf fflib.EncodingBuffer) error
MarshalJSONBuf marshal buff to json - template
func (*GameDto) UnmarshalJSON ¶
UnmarshalJSON umarshall json - template of ffjson
func (*GameDto) UnmarshalJSONFFLexer ¶
UnmarshalJSONFFLexer fast json unmarshall - template ffjson
type RivalDto ¶
type RivalDto struct { Bid int `json:",omitempty"` ID string `json:",omitempty"` Name string `json:",omitempty"` Nick string `json:",omitempty"` Balance int `json:",omitempty"` // Balance of games between user and the rival, not the rival's balance }
func (*RivalDto) MarshalJSON ¶
MarshalJSON marshal bytes to json - template
func (*RivalDto) MarshalJSONBuf ¶
func (j *RivalDto) MarshalJSONBuf(buf fflib.EncodingBuffer) error
MarshalJSONBuf marshal buff to json - template
func (*RivalDto) UnmarshalJSON ¶
UnmarshalJSON umarshall json - template of ffjson
func (*RivalDto) UnmarshalJSONFFLexer ¶
UnmarshalJSONFFLexer fast json unmarshall - template ffjson
type SponsorDto ¶
type SponsorDto struct { Name string Text string `json:",omitempty"` PrizeValue int PrizeCurrency string }
func (*SponsorDto) MarshalJSON ¶
func (j *SponsorDto) MarshalJSON() ([]byte, error)
MarshalJSON marshal bytes to json - template
func (*SponsorDto) MarshalJSONBuf ¶
func (j *SponsorDto) MarshalJSONBuf(buf fflib.EncodingBuffer) error
MarshalJSONBuf marshal buff to json - template
func (*SponsorDto) UnmarshalJSON ¶
func (j *SponsorDto) UnmarshalJSON(input []byte) error
UnmarshalJSON umarshall json - template of ffjson
func (*SponsorDto) UnmarshalJSONFFLexer ¶
func (j *SponsorDto) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error
UnmarshalJSONFFLexer fast json unmarshall - template ffjson
type TournamentDto ¶
type TournamentDto struct { ID string `json:",omitempty"` Name string Status string Created time.Time Starts time.Time Ends time.Time ContestantsCount int `json:",omitempty"` Sponsor *SponsorDto `json:",omitempty"` }
func (*TournamentDto) MarshalJSON ¶
func (j *TournamentDto) MarshalJSON() ([]byte, error)
MarshalJSON marshal bytes to json - template
func (*TournamentDto) MarshalJSONBuf ¶
func (j *TournamentDto) MarshalJSONBuf(buf fflib.EncodingBuffer) error
MarshalJSONBuf marshal buff to json - template
func (*TournamentDto) UnmarshalJSON ¶
func (j *TournamentDto) UnmarshalJSON(input []byte) error
UnmarshalJSON umarshall json - template of ffjson
func (*TournamentDto) UnmarshalJSONFFLexer ¶
func (j *TournamentDto) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error
UnmarshalJSONFFLexer fast json unmarshall - template ffjson
type UserBriefState ¶
type UserBriefState struct {
Balance int
}
func (*UserBriefState) MarshalJSON ¶
func (j *UserBriefState) MarshalJSON() ([]byte, error)
MarshalJSON marshal bytes to json - template
func (*UserBriefState) MarshalJSONBuf ¶
func (j *UserBriefState) MarshalJSONBuf(buf fflib.EncodingBuffer) error
MarshalJSONBuf marshal buff to json - template
func (*UserBriefState) UnmarshalJSON ¶
func (j *UserBriefState) UnmarshalJSON(input []byte) error
UnmarshalJSON umarshall json - template of ffjson
func (*UserBriefState) UnmarshalJSONFFLexer ¶
func (j *UserBriefState) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error
UnmarshalJSONFFLexer fast json unmarshall - template ffjson
type UserFullState ¶
type UserFullState struct { UserBriefState Battles json.RawMessage `json:",omitempty"` Tournaments map[string]TournamentDto `json:",omitempty"` }
func (*UserFullState) MarshalJSON ¶
func (j *UserFullState) MarshalJSON() ([]byte, error)
MarshalJSON marshal bytes to json - template
func (*UserFullState) MarshalJSONBuf ¶
func (j *UserFullState) MarshalJSONBuf(buf fflib.EncodingBuffer) error
MarshalJSONBuf marshal buff to json - template
func (*UserFullState) UnmarshalJSON ¶
func (j *UserFullState) UnmarshalJSON(input []byte) error
UnmarshalJSON umarshall json - template of ffjson
func (*UserFullState) UnmarshalJSONFFLexer ¶
func (j *UserFullState) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error
UnmarshalJSONFFLexer fast json unmarshall - template ffjson