Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GormSession ¶
type GormSession struct {
// contains filtered or unexported fields
}
GormSession is a type definition for GormSession
func NewGormSession ¶
func NewGormSession(dbms, connect string) (*GormSession, error)
NewGormSession creates a GormSession
func (*GormSession) CreateProduct ¶
func (s *GormSession) CreateProduct(p *entity.Product) error
CreateProduct ...
func (*GormSession) ReadProduct ¶
func (s *GormSession) ReadProduct(id string) (*entity.Product, error)
ReadProduct ...
func (*GormSession) ReadProducts ¶
func (s *GormSession) ReadProducts() ([]entity.Product, error)
ReadProducts ...
type MockSession ¶
type MockSession struct {
// contains filtered or unexported fields
}
MockSession for test
func NewMockSession ¶
func NewMockSession() (*MockSession, error)
NewMockSession creates a MockSession
func (*MockSession) CreateProduct ¶
func (s *MockSession) CreateProduct(p *entity.Product) error
CreateProduct ...
func (*MockSession) ReadProduct ¶
func (s *MockSession) ReadProduct(id string) (*entity.Product, error)
ReadProduct ...
func (*MockSession) ReadProducts ¶
func (s *MockSession) ReadProducts() ([]entity.Product, error)
ReadProducts ...
Click to show internal directories.
Click to hide internal directories.