mocks

package
v0.5.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 7, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

type Context struct {
	mock.Mock
}

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

func (_m *Context) DecodeJSONBody(v interface{}) error

DecodeJSONBody provides a mock function with given fields: v

func (*Context) GetAllowedOrigins

func (_m *Context) GetAllowedOrigins() []string

GetAllowedOrigins provides a mock function with given fields:

func (*Context) GetCookie added in v0.4.0

func (_m *Context) GetCookie(name string) (*http.Cookie, error)

GetCookie provides a mock function with given fields: name

func (*Context) GetParam

func (_m *Context) GetParam(key string) string

GetParam provides a mock function with given fields: key

func (*Context) GetQueryParam

func (_m *Context) GetQueryParam(key string) string

GetQueryParam provides a mock function with given fields: key

func (*Context) GetRequest

func (_m *Context) GetRequest() *http.Request

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) Logger

func (_m *Context) Logger() *logrus.Logger

Logger provides a mock function with given fields:

func (*Context) RawResponse

func (_m *Context) RawResponse(raw []byte)

RawResponse provides a mock function with given fields: raw

func (*Context) SetCookie added in v0.4.0

func (_m *Context) SetCookie(cookie *http.Cookie)

SetCookie provides a mock function with given fields: cookie

func (*Context) SetHeader

func (_m *Context) SetHeader(_a0 string, _a1 string)

SetHeader provides a mock function with given fields: _a0, _a1

func (*Context) Status

func (_m *Context) Status(status int) gsk.Context

Status provides a mock function with given fields: status

type DatabaseRepo added in v0.4.0

type DatabaseRepo struct {
	mock.Mock
}

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

type FileRepo struct {
	mock.Mock
}

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

func (_m *FileRepo) CreateMigrationFile(migration *migrator.Migration) error

CreateMigrationFile provides a mock function with given fields: migration

func (*FileRepo) DeleteMigrationDirectory added in v0.4.0

func (_m *FileRepo) DeleteMigrationDirectory() error

DeleteMigrationDirectory provides a mock function with given fields:

func (*FileRepo) DeleteMigrationFile added in v0.4.0

func (_m *FileRepo) DeleteMigrationFile(migration *migrator.Migration) error

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

func (_m *FileRepo) LoadMigrationQuery(migration *migrator.Migration) error

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

func (_m *FileRepo) OpenDirectory() error

OpenDirectory provides a mock function with given fields:

func (*FileRepo) WriteMigrationToFile added in v0.4.0

func (_m *FileRepo) WriteMigrationToFile(migration *migrator.Migration) error

WriteMigrationToFile provides a mock function with given fields: migration

type HandlerFunc

type HandlerFunc struct {
	mock.Mock
}

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

type Middleware struct {
	mock.Mock
}

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL