initial commit on github

This commit is contained in:
2021-05-02 16:04:45 +03:00
commit 7babade475
37 changed files with 3271 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
package v1
import "time"
type Game struct {
ID int32 `json:"id"`
OriginalName string `json:"original_name" db:"original_name"`
LocalizedName string `json:"localized_name" db:"localized_name"`
Description string `json:"description"`
Image string `json:"image"`
ReleaseDate time.Time `json:"release_date" db:"release_date"`
}
func FetchGame(id int32) (Game, error) {
var game Game
err := database.Get(&game, "select * from games where id = $1 limit 1;", id)
return game, err
}