Documentation ¶
Index ¶
Constants ¶
View Source
const ( Unknown = 1000 InvalidParse = 1001 NotFound = 1002 )
Variables ¶
This section is empty.
Functions ¶
func RunMigrations ¶
func RunMigrations(config MigrationConfig) error
Types ¶
type BusinessError ¶
type BusinessError struct { BusinessCode int `json:"code"` HTTPStatusCode int `json:"-"` Message string `json:"message"` ValidationErrors map[string]string `json:"validationErrors,omitempty"` Reason error `json:"-"` }
func NewBusinessError ¶
func NewBusinessError(businessCode int, httpStatusCode int, message string, reason error) *BusinessError
func (*BusinessError) Error ¶
func (b *BusinessError) Error() string
type DatabaseDriverType ¶
type DatabaseDriverType string
const (
PGDriver DatabaseDriverType = "postgres"
)
type MigrationConfig ¶
type MigrationConfig struct { Driver DatabaseDriverType DatabaseURL string FileDir string }
type ValidationTranslator ¶
type ValidationTranslator struct { Validate *validator.Validate // contains filtered or unexported fields }
func NewValidationTranslator ¶
func NewValidationTranslator(ginBindingValidator *validator.Validate, defaultLanguage string) (*ValidationTranslator, error)
Click to show internal directories.
Click to hide internal directories.