Documentation ¶ Index ¶ type Config func (c Config) Validate() error type Storage func New(cfg Config) (*Storage, error) func (s *Storage) GetBattle(ctx context.Context, gameID string) (*entity.Battle, error) func (s *Storage) SaveBattle(ctx context.Context, b entity.Battle) error Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type Config ¶ type Config struct { SQLClient *sqlx.DB `validate:"nonnil"` } func (Config) Validate ¶ func (c Config) Validate() error type Storage ¶ type Storage struct { // contains filtered or unexported fields } func New ¶ func New(cfg Config) (*Storage, error) func (*Storage) GetBattle ¶ func (s *Storage) GetBattle(ctx context.Context, gameID string) (*entity.Battle, error) func (*Storage) SaveBattle ¶ func (s *Storage) SaveBattle(ctx context.Context, b entity.Battle) error Source Files ¶ View all Source files model.go storage.go Click to show internal directories. Click to hide internal directories.