dto

package
v0.0.0-...-3db5ba0 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2018 License: GPL-3.0 Imports: 6 Imported by: 0

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

type ErrorDto struct {
	Code    string `json:",omitempty"`
	Message string `json:",omitempty"`
}

func (*ErrorDto) MarshalJSON

func (j *ErrorDto) MarshalJSON() ([]byte, error)

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

func (j *ErrorDto) UnmarshalJSON(input []byte) error

UnmarshalJSON umarshall json - template of ffjson

func (*ErrorDto) UnmarshalJSONFFLexer

func (j *ErrorDto) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error

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

func (j *GameDto) MarshalJSON() ([]byte, error)

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

func (j *GameDto) UnmarshalJSON(input []byte) error

UnmarshalJSON umarshall json - template of ffjson

func (*GameDto) UnmarshalJSONFFLexer

func (j *GameDto) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error

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

func (j *RivalDto) MarshalJSON() ([]byte, error)

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

func (j *RivalDto) UnmarshalJSON(input []byte) error

UnmarshalJSON umarshall json - template of ffjson

func (*RivalDto) UnmarshalJSONFFLexer

func (j *RivalDto) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error

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

Jump to

Keyboard shortcuts

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