Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Dispatch ¶
func Dispatch(logger usecases.Logger, sqlHandler interfaces.SQLHandler)
Dispatch is handle routing
func NewSQLHandler ¶
func NewSQLHandler() (interfaces.SQLHandler, error)
NewSQLHandler returns connection and methos which is related to database handling.
Types ¶
type Logger ¶
type Logger struct{}
A Logger belong to the infrastructure layer.
type Result ¶
A Result belong to the infrastructure layer.
func (Result) LastInsertId ¶
LastInsertId returns results of a LastInsertId method.
func (Result) RowsAffected ¶
RowsAffected returns results of a RowsAffected method.
type SQLHandler ¶
A SQLHandler belong to the infrastructure layer.
func (*SQLHandler) Begin ¶
func (s *SQLHandler) Begin() (interfaces.Tx, error)
Begin is begin transaction
func (*SQLHandler) Exec ¶
func (s *SQLHandler) Exec(query string, args ...interface{}) (interfaces.Result, error)
Exec is execute statement
func (*SQLHandler) Query ¶
func (s *SQLHandler) Query(query string, args ...interface{}) (interfaces.Row, error)
Query returns results of a Query method.
Click to show internal directories.
Click to hide internal directories.