(stub *Stub)
| 83 | } |
| 84 | |
| 85 | func (instance *Instance) checkVersion(stub *Stub) *Version { |
| 86 | for _, version := range instance.DeprecatedVersions { |
| 87 | // We allow empty kinds to deprecate whole APIs. |
| 88 | if version.Kind == "" || version.Kind == stub.Kind { |
| 89 | if version.Name == stub.APIVersion { |
| 90 | if version.Kind == "" { |
| 91 | version.Kind = stub.Kind |
| 92 | } |
| 93 | return &version |
| 94 | } |
| 95 | } |
| 96 | } |
| 97 | return nil |
| 98 | } |
| 99 | |
| 100 | // IsVersioned returns a version if the file data sent |
| 101 | // can be unmarshaled into a stub and matches a known |
no outgoing calls