mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
phase 2: mattes/migrate -> migratex (#848)
* move mattes migrations to migratex * changes format of migrations to migratex format * updates test runner to use new interface (double checked this with printlns, the tests go fully down and then up, and work on pg/mysql) * remove mattes/migrate * update tests from deps * update readme * fix other file extensions
This commit is contained in:
45
vendor/github.com/fnproject/fn_go/models/app.go
generated
vendored
45
vendor/github.com/fnproject/fn_go/models/app.go
generated
vendored
@@ -10,6 +10,7 @@ import (
|
||||
|
||||
"github.com/go-openapi/errors"
|
||||
"github.com/go-openapi/swag"
|
||||
"github.com/go-openapi/validate"
|
||||
)
|
||||
|
||||
// App app
|
||||
@@ -19,21 +20,65 @@ type App struct {
|
||||
// Application configuration, applied to all routes.
|
||||
Config map[string]string `json:"config,omitempty"`
|
||||
|
||||
// Time when app was created. Always in UTC.
|
||||
// Read Only: true
|
||||
CreatedAt strfmt.DateTime `json:"created_at,omitempty"`
|
||||
|
||||
// Name of this app. Must be different than the image name. Can ony contain alphanumeric, -, and _.
|
||||
// Read Only: true
|
||||
Name string `json:"name,omitempty"`
|
||||
|
||||
// Most recent time that app was updated. Always in UTC.
|
||||
// Read Only: true
|
||||
UpdatedAt strfmt.DateTime `json:"updated_at,omitempty"`
|
||||
}
|
||||
|
||||
// Validate validates this app
|
||||
func (m *App) Validate(formats strfmt.Registry) error {
|
||||
var res []error
|
||||
|
||||
if err := m.validateCreatedAt(formats); err != nil {
|
||||
// prop
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if err := m.validateUpdatedAt(formats); err != nil {
|
||||
// prop
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *App) validateCreatedAt(formats strfmt.Registry) error {
|
||||
|
||||
if swag.IsZero(m.CreatedAt) { // not required
|
||||
return nil
|
||||
}
|
||||
|
||||
if err := validate.FormatOf("created_at", "body", "date-time", m.CreatedAt.String(), formats); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *App) validateUpdatedAt(formats strfmt.Registry) error {
|
||||
|
||||
if swag.IsZero(m.UpdatedAt) { // not required
|
||||
return nil
|
||||
}
|
||||
|
||||
if err := validate.FormatOf("updated_at", "body", "date-time", m.UpdatedAt.String(), formats); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// MarshalBinary interface implementation
|
||||
func (m *App) MarshalBinary() ([]byte, error) {
|
||||
if m == nil {
|
||||
|
||||
Reference in New Issue
Block a user