Documentation ¶
Index ¶
Constants ¶
View Source
const (
COOKIE_NAME string = "battleboats-session"
)
Variables ¶
View Source
var AppCookie = securecookie.New(hashKey, blockKey)
Functions ¶
This section is empty.
Types ¶
type Enum ¶
type Enum interface {
// contains filtered or unexported methods
}
* Enum for ship direction
type GamePlayer ¶
type PlayerSession ¶
type Ship ¶
type Ship struct { ShipType *string `json:"ship_type,omitempty"` Size *int64 `json:"size,omitempty"` Hits *[]bool `json:"hits,omitempty"` Origin *Point `json:"origin,omitempty"` Orientation *Direction `json:"orientation,omitempty"` Sight *int64 `json:"-"` Range *int64 `json:"-"` MoveCap *int64 `json:"-"` IsUsingSpecial *bool `json:"is_using_special,omitempty"` }
type Turn ¶
type Turn struct { Id *int64 `db:"turn_id" json:"id,omitempty"` MatchId *int64 `db:"match_id" json:"match_id,omitempty"` PlayerId *int64 `db:"player_id" json:"player_id,omitempty"` TurnNumber *int64 `db:"turn_number" json:"turn_number,omitempty"` Board *Json `db:"gameboard" json:"gameboard,omitempty"` }
type TypeConverter ¶
type TypeConverter struct{}
TypeConverter Interface for gorp
func (TypeConverter) FromDb ¶
func (c TypeConverter) FromDb(target interface{}) (gorp.CustomScanner, bool)
FromDb returns a CustomScanner appropriate for this type. This will be used to hold values returned from SELECT queries.
In particular the CustomScanner returned should implement a Binder function appropriate for the Go type you wish to convert the db value to
If bool==false, then no custom scanner will be used for this field.
func (TypeConverter) ToDb ¶
func (c TypeConverter) ToDb(val interface{}) (interface{}, error)
ToDb converts val to another type. Called before INSERT/UPDATE operations
Click to show internal directories.
Click to hide internal directories.