Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrUniqueViolation = &herodot.DefaultError{ CodeField: http.StatusConflict, StatusField: http.StatusText(http.StatusConflict), ErrorField: "Unable to insert or update resource because a resource with that value exists already", } ErrNoRows = &herodot.DefaultError{ CodeField: http.StatusNotFound, StatusField: http.StatusText(http.StatusNotFound), ErrorField: "Unable to locate the resource", } )
Functions ¶
func HandleError ¶
func HelpMessage ¶
func HelpMessage() string
func MigratorSQLCmd ¶
func MigratorSQLCmd(path, name string, logger logrus.FieldLogger, runners map[string]SchemaCreator) *cobra.Command
Types ¶
type SQLConnection ¶
type SQLConnection struct { URL *url.URL L logrus.FieldLogger // contains filtered or unexported fields }
func NewSQLConnection ¶
func NewSQLConnection(db string, l logrus.FieldLogger) (*SQLConnection, error)
func (*SQLConnection) GetDatabase ¶
func (c *SQLConnection) GetDatabase() *sqlx.DB
func (*SQLConnection) GetDatabaseRetry ¶
Click to show internal directories.
Click to hide internal directories.