Documentation ¶
Index ¶
- type Context
- func (_m *Context) DecodeJSONBody(v interface{}) error
- func (_m *Context) GetAllowedOrigins() []string
- func (_m *Context) GetCookie(name string) (*http.Cookie, error)
- func (_m *Context) GetParam(key string) string
- func (_m *Context) GetQueryParam(key string) string
- func (_m *Context) GetRequest() *http.Request
- func (_m *Context) GetWriter() http.ResponseWriter
- func (_m *Context) JSONResponse(data interface{})
- func (_m *Context) Logger() *logrus.Logger
- func (_m *Context) RawResponse(raw []byte)
- func (_m *Context) SetCookie(cookie *http.Cookie)
- func (_m *Context) SetHeader(_a0 string, _a1 string)
- func (_m *Context) Status(status int) gsk.Context
- type DatabaseRepo
- func (_m *DatabaseRepo) ApplyMigration(migration *migrator.Migration) error
- func (_m *DatabaseRepo) CreateMigrationTableIfNotExists() error
- func (_m *DatabaseRepo) DeleteMigrationTable() error
- func (_m *DatabaseRepo) GetLastAppliedMigration() (*migrator.Migration, error)
- func (_m *DatabaseRepo) LoadLastAppliedMigration() (*migrator.Migration, error)
- func (_m *DatabaseRepo) LoadMigrations() ([]*migrator.Migration, error)
- type FileRepo
- func (_m *FileRepo) CreateMigrationFile(migration *migrator.Migration) error
- func (_m *FileRepo) DeleteMigrationDirectory() error
- func (_m *FileRepo) DeleteMigrationFile(migration *migrator.Migration) error
- func (_m *FileRepo) GetMigrationFilePathsByType(migrationType migrator.MigrationType) ([]string, error)
- func (_m *FileRepo) LoadMigrationQuery(migration *migrator.Migration) error
- func (_m *FileRepo) LoadMigrationsFromFile(migrationType migrator.MigrationType) ([]*migrator.Migration, error)
- func (_m *FileRepo) OpenDirectory() error
- func (_m *FileRepo) WriteMigrationToFile(migration *migrator.Migration) error
- type HandlerFunc
- type Middleware
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Context ¶
Context is an autogenerated mock type for the Context type
func NewContext ¶
func NewContext(t mockConstructorTestingTNewContext) *Context
NewContext creates a new instance of Context. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*Context) DecodeJSONBody ¶
DecodeJSONBody provides a mock function with given fields: v
func (*Context) GetAllowedOrigins ¶
GetAllowedOrigins provides a mock function with given fields:
func (*Context) GetCookie ¶ added in v0.4.0
GetCookie provides a mock function with given fields: name
func (*Context) GetQueryParam ¶
GetQueryParam provides a mock function with given fields: key
func (*Context) GetRequest ¶
GetRequest provides a mock function with given fields:
func (*Context) GetWriter ¶
func (_m *Context) GetWriter() http.ResponseWriter
GetWriter provides a mock function with given fields:
func (*Context) JSONResponse ¶
func (_m *Context) JSONResponse(data interface{})
JSONResponse provides a mock function with given fields: data
func (*Context) RawResponse ¶
RawResponse provides a mock function with given fields: raw
func (*Context) SetCookie ¶ added in v0.4.0
SetCookie provides a mock function with given fields: cookie
type DatabaseRepo ¶ added in v0.4.0
DatabaseRepo is an autogenerated mock type for the DatabaseRepo type
func NewDatabaseRepo ¶ added in v0.4.0
func NewDatabaseRepo(t mockConstructorTestingTNewDatabaseRepo) *DatabaseRepo
NewDatabaseRepo creates a new instance of DatabaseRepo. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*DatabaseRepo) ApplyMigration ¶ added in v0.4.0
func (_m *DatabaseRepo) ApplyMigration(migration *migrator.Migration) error
ApplyMigration provides a mock function with given fields: migration
func (*DatabaseRepo) CreateMigrationTableIfNotExists ¶ added in v0.4.0
func (_m *DatabaseRepo) CreateMigrationTableIfNotExists() error
CreateMigrationTableIfNotExists provides a mock function with given fields:
func (*DatabaseRepo) DeleteMigrationTable ¶ added in v0.4.0
func (_m *DatabaseRepo) DeleteMigrationTable() error
DeleteMigrationTable provides a mock function with given fields:
func (*DatabaseRepo) GetLastAppliedMigration ¶ added in v0.4.0
func (_m *DatabaseRepo) GetLastAppliedMigration() (*migrator.Migration, error)
GetLastAppliedMigration provides a mock function with given fields:
func (*DatabaseRepo) LoadLastAppliedMigration ¶ added in v0.4.0
func (_m *DatabaseRepo) LoadLastAppliedMigration() (*migrator.Migration, error)
LoadLastAppliedMigration provides a mock function with given fields:
func (*DatabaseRepo) LoadMigrations ¶ added in v0.4.0
func (_m *DatabaseRepo) LoadMigrations() ([]*migrator.Migration, error)
LoadMigrations provides a mock function with given fields:
type FileRepo ¶ added in v0.4.0
FileRepo is an autogenerated mock type for the FileRepo type
func NewFileRepo ¶ added in v0.4.0
func NewFileRepo(t mockConstructorTestingTNewFileRepo) *FileRepo
NewFileRepo creates a new instance of FileRepo. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*FileRepo) CreateMigrationFile ¶ added in v0.4.0
CreateMigrationFile provides a mock function with given fields: migration
func (*FileRepo) DeleteMigrationDirectory ¶ added in v0.4.0
DeleteMigrationDirectory provides a mock function with given fields:
func (*FileRepo) DeleteMigrationFile ¶ added in v0.4.0
DeleteMigrationFile provides a mock function with given fields: migration
func (*FileRepo) GetMigrationFilePathsByType ¶ added in v0.4.0
func (_m *FileRepo) GetMigrationFilePathsByType(migrationType migrator.MigrationType) ([]string, error)
GetMigrationFilePathsByType provides a mock function with given fields: migrationType
func (*FileRepo) LoadMigrationQuery ¶ added in v0.4.0
LoadMigrationQuery provides a mock function with given fields: migration
func (*FileRepo) LoadMigrationsFromFile ¶ added in v0.4.0
func (_m *FileRepo) LoadMigrationsFromFile(migrationType migrator.MigrationType) ([]*migrator.Migration, error)
LoadMigrationsFromFile provides a mock function with given fields: migrationType
func (*FileRepo) OpenDirectory ¶ added in v0.4.0
OpenDirectory provides a mock function with given fields:
type HandlerFunc ¶
HandlerFunc is an autogenerated mock type for the HandlerFunc type
func NewHandlerFunc ¶
func NewHandlerFunc(t mockConstructorTestingTNewHandlerFunc) *HandlerFunc
NewHandlerFunc creates a new instance of HandlerFunc. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*HandlerFunc) Execute ¶
func (_m *HandlerFunc) Execute(_a0 gsk.Context)
Execute provides a mock function with given fields: _a0
type Middleware ¶
Middleware is an autogenerated mock type for the Middleware type
func NewMiddleware ¶
func NewMiddleware(t mockConstructorTestingTNewMiddleware) *Middleware
NewMiddleware creates a new instance of Middleware. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*Middleware) Execute ¶
func (_m *Middleware) Execute(_a0 gsk.HandlerFunc) gsk.HandlerFunc
Execute provides a mock function with given fields: _a0