peridot/vendor/github.com/ory/hydra-client-go/models/uuid.go

39 lines
854 B
Go
Raw Normal View History

2022-07-07 20:11:50 +00:00
// 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
}