Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
func NewController ¶
func NewController(rs Service) *Controller
func (*Controller) CreateBulk ¶
func (rc *Controller) CreateBulk(w http.ResponseWriter, r *http.Request) error
func (*Controller) Delete ¶
func (rc *Controller) Delete(w http.ResponseWriter, r *http.Request) error
func (*Controller) FindByFilter ¶
func (rc *Controller) FindByFilter(w http.ResponseWriter, r *http.Request) error
type CreateRequest ¶
type CreateRequest struct {
Robots []CreateSingleRequest `json:"robots"`
}
func (CreateRequest) Validate ¶
func (robots CreateRequest) Validate() error
type CreateSingleRequest ¶
type CreateSingleRequest struct { TestClassId string `json:"testClassId"` Scores string `json:"scores"` Difficulty string `json:"difficulty"` Type RobotType `json:"type"` }
func (CreateSingleRequest) Validate ¶
func (r CreateSingleRequest) Validate() error
type CustomString ¶
type CustomString string
func (CustomString) AsString ¶
func (s CustomString) AsString() string
func (CustomString) Parse ¶
func (CustomString) Parse(s string) (CustomString, error)
CustomString is a dummy type that implements Convertable and Validable interfaces
func (CustomString) Validate ¶
func (CustomString) Validate() error
type RobotStorage ¶
type RobotStorage struct {
// contains filtered or unexported fields
}
func NewRobotStorage ¶
func NewRobotStorage(db *gorm.DB) *RobotStorage
func (*RobotStorage) CreateBulk ¶
func (rs *RobotStorage) CreateBulk(r *CreateRequest) (int, error)
func (*RobotStorage) DeleteByTestClass ¶
func (rs *RobotStorage) DeleteByTestClass(testClassId string) error
func (*RobotStorage) FindByFilter ¶
type RobotType ¶
type RobotType int8
func (RobotType) MarshalJSON ¶
func (*RobotType) UnmarshalJSON ¶
type UpdateRequest ¶
func (UpdateRequest) Validate ¶
func (UpdateRequest) Validate() error
Click to show internal directories.
Click to hide internal directories.