Documentation ¶
Overview ¶
Package handler is a generated GoMock package.
Index ¶
- Constants
- func CreateMigration(c *gofr.Context) (interface{}, error)
- func Migrate(c *gofr.Context) (interface{}, error)
- type Create
- func (c Create) Chdir(dir string) error
- func (c Create) Create(name string) (*os.File, error)
- func (c Create) Help() interface{}
- func (c Create) IsNotExist(err error) bool
- func (c Create) Mkdir(name string, perm os.FileMode) error
- func (c Create) OpenFile(name string, flag int, perm os.FileMode) (*os.File, error)
- func (c Create) ReadDir(dir string) ([]os.DirEntry, error)
- func (c Create) Stat(name string) (os.FileInfo, error)
- type FSCreate
- type FSMigrate
- type Handler
- func (h Handler) Chdir(dir string) error
- func (h Handler) Getwd() (string, error)
- func (h Handler) Help() interface{}
- func (h Handler) IsNotExist(err error) bool
- func (h Handler) Mkdir(name string, perm os.FileMode) error
- func (h Handler) OpenFile(name string, flag int, perm os.FileMode) (*os.File, error)
- func (h Handler) Stat(name string) (os.FileInfo, error)
- type MockFSCreate
- func (m *MockFSCreate) Chdir(dir string) error
- func (m *MockFSCreate) Create(name string) (*os.File, error)
- func (m *MockFSCreate) EXPECT() *MockFSCreateMockRecorder
- func (m *MockFSCreate) IsNotExist(err error) bool
- func (m *MockFSCreate) Mkdir(name string, perm os.FileMode) error
- func (m *MockFSCreate) OpenFile(name string, flag int, perm os.FileMode) (*os.File, error)
- func (m *MockFSCreate) ReadDir(dir string) ([]os.DirEntry, error)
- func (m *MockFSCreate) Stat(name string) (os.FileInfo, error)
- type MockFSCreateMockRecorder
- func (mr *MockFSCreateMockRecorder) Chdir(dir interface{}) *gomock.Call
- func (mr *MockFSCreateMockRecorder) Create(name interface{}) *gomock.Call
- func (mr *MockFSCreateMockRecorder) IsNotExist(err interface{}) *gomock.Call
- func (mr *MockFSCreateMockRecorder) Mkdir(name, perm interface{}) *gomock.Call
- func (mr *MockFSCreateMockRecorder) OpenFile(name, flag, perm interface{}) *gomock.Call
- func (mr *MockFSCreateMockRecorder) ReadDir(dir interface{}) *gomock.Call
- func (mr *MockFSCreateMockRecorder) Stat(name interface{}) *gomock.Call
- type MockFSMigrate
- func (m *MockFSMigrate) Chdir(dir string) error
- func (m *MockFSMigrate) EXPECT() *MockFSMigrateMockRecorder
- func (m *MockFSMigrate) Getwd() (string, error)
- func (m *MockFSMigrate) IsNotExist(err error) bool
- func (m *MockFSMigrate) Mkdir(name string, perm os.FileMode) error
- func (m *MockFSMigrate) OpenFile(name string, flag int, perm os.FileMode) (*os.File, error)
- func (m *MockFSMigrate) Stat(name string) (os.FileInfo, error)
- type MockFSMigrateMockRecorder
- func (mr *MockFSMigrateMockRecorder) Chdir(dir interface{}) *gomock.Call
- func (mr *MockFSMigrateMockRecorder) Getwd() *gomock.Call
- func (mr *MockFSMigrateMockRecorder) IsNotExist(err interface{}) *gomock.Call
- func (mr *MockFSMigrateMockRecorder) Mkdir(name, perm interface{}) *gomock.Call
- func (mr *MockFSMigrateMockRecorder) OpenFile(name, flag, perm interface{}) *gomock.Call
- func (mr *MockFSMigrateMockRecorder) Stat(name interface{}) *gomock.Call
Constants ¶
const ( DOWN = "DOWN" UP = "UP" )
Variables ¶
This section is empty.
Functions ¶
func CreateMigration ¶
CreateMigration generates a migration file with a timestamp prefix in the format YYYYMMDDHHIISS, followed by the provided name
Types ¶
type Create ¶
type Create struct { }
func (Create) Create ¶
Create creates or truncates the named file. If the file already exists, it is truncated
func (Create) Help ¶
func (c Create) Help() interface{}
Help returns a formatted string containing usage instructions, flags, examples and a description
func (Create) IsNotExist ¶
IsNotExist returns a boolean indicating whether the error is known to report that a file or directory does not exist
func (Create) Mkdir ¶
Mkdir creates a new directory with the specified name and permission bits (before umask)
type FSCreate ¶
type FSCreate interface { Chdir(dir string) error Mkdir(name string, perm os.FileMode) error OpenFile(name string, flag int, perm os.FileMode) (*os.File, error) ReadDir(dir string) ([]os.DirEntry, error) Create(name string) (*os.File, error) Stat(name string) (os.FileInfo, error) IsNotExist(err error) bool }
type Handler ¶
type Handler struct { }
func (Handler) Help ¶
func (h Handler) Help() interface{}
Help returns a formatted string containing usage instructions, flags, examples and a description
func (Handler) IsNotExist ¶
IsNotExist returns a boolean indicating whether the error is known to report that a file or directory does not exist
func (Handler) Mkdir ¶
Mkdir creates a new directory with the specified name and permission bits (before umask)
type MockFSCreate ¶
type MockFSCreate struct {
// contains filtered or unexported fields
}
MockFSCreate is a mock of FSCreate interface
func NewMockFSCreate ¶
func NewMockFSCreate(ctrl *gomock.Controller) *MockFSCreate
NewMockFSCreate creates a new mock instance
func (*MockFSCreate) Create ¶
func (m *MockFSCreate) Create(name string) (*os.File, error)
Create mocks base method
func (*MockFSCreate) EXPECT ¶
func (m *MockFSCreate) EXPECT() *MockFSCreateMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockFSCreate) IsNotExist ¶
func (m *MockFSCreate) IsNotExist(err error) bool
IsNotExist mocks base method
func (*MockFSCreate) Mkdir ¶
func (m *MockFSCreate) Mkdir(name string, perm os.FileMode) error
Mkdir mocks base method
type MockFSCreateMockRecorder ¶
type MockFSCreateMockRecorder struct {
// contains filtered or unexported fields
}
MockFSCreateMockRecorder is the mock recorder for MockFSCreate
func (*MockFSCreateMockRecorder) Chdir ¶
func (mr *MockFSCreateMockRecorder) Chdir(dir interface{}) *gomock.Call
Chdir indicates an expected call of Chdir
func (*MockFSCreateMockRecorder) Create ¶
func (mr *MockFSCreateMockRecorder) Create(name interface{}) *gomock.Call
Create indicates an expected call of Create
func (*MockFSCreateMockRecorder) IsNotExist ¶
func (mr *MockFSCreateMockRecorder) IsNotExist(err interface{}) *gomock.Call
IsNotExist indicates an expected call of IsNotExist
func (*MockFSCreateMockRecorder) Mkdir ¶
func (mr *MockFSCreateMockRecorder) Mkdir(name, perm interface{}) *gomock.Call
Mkdir indicates an expected call of Mkdir
func (*MockFSCreateMockRecorder) OpenFile ¶
func (mr *MockFSCreateMockRecorder) OpenFile(name, flag, perm interface{}) *gomock.Call
OpenFile indicates an expected call of OpenFile
func (*MockFSCreateMockRecorder) ReadDir ¶
func (mr *MockFSCreateMockRecorder) ReadDir(dir interface{}) *gomock.Call
ReadDir indicates an expected call of ReadDir
func (*MockFSCreateMockRecorder) Stat ¶
func (mr *MockFSCreateMockRecorder) Stat(name interface{}) *gomock.Call
Stat indicates an expected call of Stat
type MockFSMigrate ¶
type MockFSMigrate struct {
// contains filtered or unexported fields
}
MockFSMigrate is a mock of FSMigrate interface
func NewMockFSMigrate ¶
func NewMockFSMigrate(ctrl *gomock.Controller) *MockFSMigrate
NewMockFSMigrate creates a new mock instance
func (*MockFSMigrate) Chdir ¶
func (m *MockFSMigrate) Chdir(dir string) error
Chdir mocks base method
func (*MockFSMigrate) EXPECT ¶
func (m *MockFSMigrate) EXPECT() *MockFSMigrateMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockFSMigrate) Getwd ¶
func (m *MockFSMigrate) Getwd() (string, error)
Getwd mocks base method
func (*MockFSMigrate) IsNotExist ¶
func (m *MockFSMigrate) IsNotExist(err error) bool
IsNotExist mocks base method
func (*MockFSMigrate) Mkdir ¶
func (m *MockFSMigrate) Mkdir(name string, perm os.FileMode) error
Mkdir mocks base method
type MockFSMigrateMockRecorder ¶
type MockFSMigrateMockRecorder struct {
// contains filtered or unexported fields
}
MockFSMigrateMockRecorder is the mock recorder for MockFSMigrate
func (*MockFSMigrateMockRecorder) Chdir ¶
func (mr *MockFSMigrateMockRecorder) Chdir(dir interface{}) *gomock.Call
Chdir indicates an expected call of Chdir
func (*MockFSMigrateMockRecorder) Getwd ¶
func (mr *MockFSMigrateMockRecorder) Getwd() *gomock.Call
Getwd indicates an expected call of Getwd
func (*MockFSMigrateMockRecorder) IsNotExist ¶
func (mr *MockFSMigrateMockRecorder) IsNotExist(err interface{}) *gomock.Call
IsNotExist indicates an expected call of IsNotExist
func (*MockFSMigrateMockRecorder) Mkdir ¶
func (mr *MockFSMigrateMockRecorder) Mkdir(name, perm interface{}) *gomock.Call
Mkdir indicates an expected call of Mkdir
func (*MockFSMigrateMockRecorder) OpenFile ¶
func (mr *MockFSMigrateMockRecorder) OpenFile(name, flag, perm interface{}) *gomock.Call
OpenFile indicates an expected call of OpenFile
func (*MockFSMigrateMockRecorder) Stat ¶
func (mr *MockFSMigrateMockRecorder) Stat(name interface{}) *gomock.Call
Stat indicates an expected call of Stat