Documentation ¶
Index ¶
- func CheckMockDB(t *testing.T, mock sqlmock.Sqlmock)
- func GenerateMockRows(headers []string, rows [][]driver.Value) *sqlmock.Rows
- func NewMockDB() (sqlmock.Sqlmock, *gorm.DB)
- func NewMockRepository(db *gorm.DB) database.Repository
- func Server() (*http.Client, *http.ServeMux, *httptest.Server)
- type TestsModel
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckMockDB ¶
func GenerateMockRows ¶
func NewMockRepository ¶
func NewMockRepository(db *gorm.DB) database.Repository
Types ¶
type TestsModel ¶
type TestsModel struct { ID int64 `gorm:"column:id"` TestInt int64 `gorm:"column:test_int"` TestString string `gorm:"column:test_string"` TestBool bool `gorm:"column:test_bool"` TestFloat float64 `gorm:"column:test_float"` TestTime time.Time `gorm:"column:test_time"` }
TestsModel Model for testing gorm database
func (TestsModel) TableName ¶
func (TestsModel) TableName() string
Click to show internal directories.
Click to hide internal directories.