-
Notifications
You must be signed in to change notification settings - Fork 154
/
allowed_registry_spec.go
51 lines (41 loc) · 1.4 KB
/
allowed_registry_spec.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
39
40
41
42
43
44
45
46
47
48
49
50
51
// 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/strfmt"
"github.com/go-openapi/swag"
)
// AllowedRegistrySpec AllowedRegistrySpec specifies the data for allowed registry spec.
//
// swagger:model AllowedRegistrySpec
type AllowedRegistrySpec struct {
// RegistryPrefix contains the prefix of the registry which will be allowed. User clusters will be able to deploy
// only images which are prefixed with one of the allowed image registry prefixes.
RegistryPrefix string `json:"registryPrefix,omitempty"`
}
// Validate validates this allowed registry spec
func (m *AllowedRegistrySpec) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this allowed registry spec based on context it is used
func (m *AllowedRegistrySpec) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *AllowedRegistrySpec) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *AllowedRegistrySpec) UnmarshalBinary(b []byte) error {
var res AllowedRegistrySpec
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}