-
Notifications
You must be signed in to change notification settings - Fork 26
/
uuid.go
38 lines (29 loc) · 854 Bytes
/
uuid.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// Code generated by go-swagger; DO NOT EDIT.
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 (
"context"
"github.com/go-openapi/errors"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/validate"
)
// UUID UUID
//
// swagger:model UUID
type UUID strfmt.UUID4
// Validate validates this UUID
func (m UUID) Validate(formats strfmt.Registry) error {
var res []error
if err := validate.FormatOf("", "body", "uuid4", strfmt.UUID4(m).String(), formats); err != nil {
return err
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
// ContextValidate validates this UUID based on context it is used
func (m UUID) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}