mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
Initial work on async functions
This commit is contained in:
48
api/models/groups_wrapper.go
Normal file
48
api/models/groups_wrapper.go
Normal file
@@ -0,0 +1,48 @@
|
||||
package models
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
strfmt "github.com/go-openapi/strfmt"
|
||||
|
||||
"github.com/go-openapi/errors"
|
||||
"github.com/go-openapi/validate"
|
||||
)
|
||||
|
||||
/*GroupsWrapper groups wrapper
|
||||
|
||||
swagger:model GroupsWrapper
|
||||
*/
|
||||
type GroupsWrapper struct {
|
||||
|
||||
/* groups
|
||||
|
||||
Required: true
|
||||
*/
|
||||
Groups []*Group `json:"groups"`
|
||||
}
|
||||
|
||||
// Validate validates this groups wrapper
|
||||
func (m *GroupsWrapper) Validate(formats strfmt.Registry) error {
|
||||
var res []error
|
||||
|
||||
if err := m.validateGroups(formats); err != nil {
|
||||
// prop
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *GroupsWrapper) validateGroups(formats strfmt.Registry) error {
|
||||
|
||||
if err := validate.Required("groups", "body", m.Groups); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
Reference in New Issue
Block a user