api: Rename detector type to DType

Rename detector type to DType because all reserved key words should be
avoided used as type name or variable name.
This commit is contained in:
Sida Chen 2018-10-08 14:12:00 -04:00
parent a3e9b5b55d
commit 69c0c84348
4 changed files with 125 additions and 125 deletions

View File

@ -50,29 +50,29 @@ var _ = math.Inf
// proto package needs to be updated. // proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
type Detector_Type int32 type Detector_DType int32
const ( const (
Detector_DETECTOR_TYPE_INVALID Detector_Type = 0 Detector_DETECTOR_D_TYPE_INVALID Detector_DType = 0
Detector_DETECTOR_TYPE_NAMESPACE Detector_Type = 1 Detector_DETECTOR_D_TYPE_NAMESPACE Detector_DType = 1
Detector_DETECTOR_TYPE_FEATURE Detector_Type = 2 Detector_DETECTOR_D_TYPE_FEATURE Detector_DType = 2
) )
var Detector_Type_name = map[int32]string{ var Detector_DType_name = map[int32]string{
0: "DETECTOR_TYPE_INVALID", 0: "DETECTOR_D_TYPE_INVALID",
1: "DETECTOR_TYPE_NAMESPACE", 1: "DETECTOR_D_TYPE_NAMESPACE",
2: "DETECTOR_TYPE_FEATURE", 2: "DETECTOR_D_TYPE_FEATURE",
} }
var Detector_Type_value = map[string]int32{ var Detector_DType_value = map[string]int32{
"DETECTOR_TYPE_INVALID": 0, "DETECTOR_D_TYPE_INVALID": 0,
"DETECTOR_TYPE_NAMESPACE": 1, "DETECTOR_D_TYPE_NAMESPACE": 1,
"DETECTOR_TYPE_FEATURE": 2, "DETECTOR_D_TYPE_FEATURE": 2,
} }
func (x Detector_Type) String() string { func (x Detector_DType) String() string {
return proto.EnumName(Detector_Type_name, int32(x)) return proto.EnumName(Detector_DType_name, int32(x))
} }
func (Detector_Type) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{1, 0} } func (Detector_DType) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{1, 0} }
type Vulnerability struct { type Vulnerability struct {
// The name of the vulnerability. // The name of the vulnerability.
@ -162,7 +162,7 @@ type Detector struct {
// The version of the detector. // The version of the detector.
Version string `protobuf:"bytes,2,opt,name=version" json:"version,omitempty"` Version string `protobuf:"bytes,2,opt,name=version" json:"version,omitempty"`
// The type of the detector. // The type of the detector.
Type Detector_Type `protobuf:"varint,3,opt,name=type,enum=coreos.clair.Detector_Type" json:"type,omitempty"` Dtype Detector_DType `protobuf:"varint,3,opt,name=dtype,enum=coreos.clair.Detector_DType" json:"dtype,omitempty"`
} }
func (m *Detector) Reset() { *m = Detector{} } func (m *Detector) Reset() { *m = Detector{} }
@ -184,11 +184,11 @@ func (m *Detector) GetVersion() string {
return "" return ""
} }
func (m *Detector) GetType() Detector_Type { func (m *Detector) GetDtype() Detector_DType {
if m != nil { if m != nil {
return m.Type return m.Dtype
} }
return Detector_DETECTOR_TYPE_INVALID return Detector_DETECTOR_D_TYPE_INVALID
} }
type Namespace struct { type Namespace struct {
@ -809,7 +809,7 @@ func init() {
proto.RegisterType((*MarkNotificationAsReadResponse)(nil), "coreos.clair.MarkNotificationAsReadResponse") proto.RegisterType((*MarkNotificationAsReadResponse)(nil), "coreos.clair.MarkNotificationAsReadResponse")
proto.RegisterType((*GetStatusRequest)(nil), "coreos.clair.GetStatusRequest") proto.RegisterType((*GetStatusRequest)(nil), "coreos.clair.GetStatusRequest")
proto.RegisterType((*GetStatusResponse)(nil), "coreos.clair.GetStatusResponse") proto.RegisterType((*GetStatusResponse)(nil), "coreos.clair.GetStatusResponse")
proto.RegisterEnum("coreos.clair.Detector_Type", Detector_Type_name, Detector_Type_value) proto.RegisterEnum("coreos.clair.Detector_DType", Detector_DType_name, Detector_DType_value)
} }
// Reference imports to suppress errors if they are not otherwise used. // Reference imports to suppress errors if they are not otherwise used.
@ -1091,89 +1091,89 @@ var _StatusService_serviceDesc = grpc.ServiceDesc{
func init() { proto.RegisterFile("api/v3/clairpb/clair.proto", fileDescriptor0) } func init() { proto.RegisterFile("api/v3/clairpb/clair.proto", fileDescriptor0) }
var fileDescriptor0 = []byte{ var fileDescriptor0 = []byte{
// 1334 bytes of a gzipped FileDescriptorProto // 1336 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x57, 0x4d, 0x6f, 0x1b, 0xc5, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x57, 0x4b, 0x6f, 0x1b, 0x55,
0x1b, 0xff, 0xaf, 0x13, 0xc7, 0xf6, 0x63, 0x3b, 0x71, 0x27, 0x69, 0xe2, 0x6c, 0xfe, 0x6d, 0x93, 0x14, 0x66, 0x9c, 0x3a, 0xb6, 0x8f, 0xed, 0xc4, 0xbd, 0x49, 0x13, 0x67, 0xd2, 0x47, 0x32, 0x50,
0x85, 0x8a, 0x52, 0x90, 0x2d, 0xdc, 0x22, 0xb5, 0xe5, 0x80, 0xdc, 0xc4, 0x09, 0x91, 0xda, 0x10, 0x51, 0x0a, 0xb2, 0x85, 0x5b, 0xa4, 0xb6, 0x2c, 0x90, 0x9b, 0x38, 0x21, 0x52, 0x1b, 0xa2, 0x49,
0x6d, 0xd2, 0x48, 0x05, 0x21, 0x6b, 0xe2, 0x7d, 0x9c, 0xac, 0xb2, 0xde, 0x5d, 0x76, 0xc7, 0x49, 0x1a, 0x09, 0x10, 0x32, 0x37, 0x9e, 0xe3, 0x64, 0x94, 0xf1, 0xcc, 0x30, 0x73, 0x9d, 0xd4, 0xaa,
0xad, 0xaa, 0x1c, 0xb8, 0x71, 0x43, 0x70, 0xe0, 0xc4, 0x07, 0xe0, 0x82, 0xf8, 0x0e, 0xf0, 0x09, 0xca, 0x82, 0x1d, 0x3b, 0x04, 0x0b, 0x56, 0xfc, 0x00, 0x36, 0x88, 0xff, 0xc0, 0x9e, 0x05, 0x6c,
0xe0, 0x0a, 0x37, 0x0e, 0x7c, 0x01, 0xee, 0x68, 0x66, 0x67, 0x36, 0xbb,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0x86, 0xac, 0x3b, 0xf4, 0x2d, 0xca, 0xb0, 0xcb, 0x1f, 0xe7, 0x25, 0x7a, 0xa2, 0x48, 0x56, 0xa1, 0xe6, 0xd0, 0x90, 0x75, 0x87, 0xbe, 0x45, 0x19, 0x76,
0xba, 0x2c, 0xae, 0xde, 0x88, 0x1e, 0x79, 0x43, 0x4d, 0x81, 0xc6, 0xae, 0x9a, 0x02, 0xe6, 0x34, 0xf9, 0x93, 0x57, 0xcd, 0xd5, 0x1b, 0xf2, 0xb9, 0x37, 0xa2, 0x79, 0xd0, 0xd8, 0x89, 0xe6, 0x81,
0xd7, 0x79, 0x26, 0x54, 0x38, 0xd1, 0x78, 0x08, 0x64, 0x03, 0x59, 0xdb, 0xed, 0x61, 0xc8, 0x82, 0x39, 0xc5, 0x6d, 0x9e, 0x09, 0x13, 0xce, 0x34, 0x1e, 0x02, 0x59, 0x47, 0xd6, 0x76, 0x7b, 0x18,
0x91, 0x89, 0x5f, 0x0e, 0x31, 0x64, 0xe4, 0x2d, 0xa8, 0x52, 0x49, 0xea, 0x26, 0xda, 0x59, 0x51, 0xb2, 0x60, 0x64, 0xe2, 0x57, 0x43, 0x0c, 0x19, 0x79, 0x13, 0xaa, 0x54, 0xb1, 0xba, 0x89, 0xeb,
0x44, 0xde, 0x2f, 0xe3, 0x97, 0x09, 0x98, 0x4d, 0xe9, 0x86, 0xbe, 0xe7, 0x86, 0x48, 0xd6, 0xa1, 0xac, 0x44, 0x4c, 0x7e, 0x5f, 0xc6, 0xaf, 0x13, 0x30, 0x93, 0xb2, 0x0d, 0x7d, 0xcf, 0x0d, 0x91,
0xa8, 0xe4, 0x84, 0x5e, 0xb9, 0x75, 0x37, 0x9d, 0x4d, 0x86, 0x52, 0x23, 0x26, 0xc4, 0xba, 0xe4, 0xac, 0x41, 0x31, 0xd2, 0x13, 0x76, 0xe5, 0xd6, 0xdd, 0x74, 0x35, 0x19, 0x46, 0x8d, 0x98, 0x11,
0x03, 0x98, 0x0a, 0x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xaa, 0x7e, 0xeb, 0x5c, 0xb9, 0x8a, 0x3e, 0x2d, 0xa2,
0xa1, 0x19, 0x61, 0xf2, 0xf1, 0x4d, 0x98, 0xed, 0x79, 0x83, 0xb4, 0x9a, 0xbf, 0xff, 0x59, 0x41, 0x97, 0x48, 0xa1, 0x29, 0x31, 0xf9, 0xf8, 0x26, 0xcc, 0xf4, 0xbc, 0x41, 0xda, 0xcc, 0xdf, 0xfb,
0xfe, 0x5f, 0xdd, 0x9f, 0x12, 0x1f, 0xa2, 0xf7, 0xfe, 0x0b, 0x00, 0x00, 0xff, 0xff, 0x9f, 0xd1, 0xac, 0xa0, 0xfe, 0xb9, 0xee, 0x4d, 0x8a, 0x0f, 0xd1, 0x7b, 0xff, 0x07, 0x00, 0x00, 0xff, 0xff,
0xa1, 0x1f, 0xc8, 0x0e, 0x00, 0x00, 0xcb, 0x5c, 0xce, 0x34, 0xd2, 0x0e, 0x00, 0x00,
} }

View File

@ -45,17 +45,17 @@ message Vulnerability {
} }
message Detector { message Detector {
enum Type { enum DType {
DETECTOR_TYPE_INVALID = 0; DETECTOR_D_TYPE_INVALID = 0;
DETECTOR_TYPE_NAMESPACE = 1; DETECTOR_D_TYPE_NAMESPACE = 1;
DETECTOR_TYPE_FEATURE = 2; DETECTOR_D_TYPE_FEATURE = 2;
} }
// The name of the detector. // The name of the detector.
string name = 1; string name = 1;
// The version of the detector. // The version of the detector.
string version = 2; string version = 2;
// The type of the detector. // The type of the detector.
Type type = 3; DType dtype = 3;
} }
message Namespace { message Namespace {

View File

@ -156,6 +156,15 @@
} }
}, },
"definitions": { "definitions": {
"DetectorDType": {
"type": "string",
"enum": [
"DETECTOR_D_TYPE_INVALID",
"DETECTOR_D_TYPE_NAMESPACE",
"DETECTOR_D_TYPE_FEATURE"
],
"default": "DETECTOR_D_TYPE_INVALID"
},
"GetAncestryResponseAncestry": { "GetAncestryResponseAncestry": {
"type": "object", "type": "object",
"properties": { "properties": {
@ -286,21 +295,12 @@
"type": "string", "type": "string",
"description": "The version of the detector." "description": "The version of the detector."
}, },
"type": { "dtype": {
"$ref": "#/definitions/clairDetectorType", "$ref": "#/definitions/DetectorDType",
"description": "The type of the detector." "description": "The type of the detector."
} }
} }
}, },
"clairDetectorType": {
"type": "string",
"enum": [
"DETECTOR_TYPE_INVALID",
"DETECTOR_TYPE_NAMESPACE",
"DETECTOR_TYPE_FEATURE"
],
"default": "DETECTOR_TYPE_INVALID"
},
"clairFeature": { "clairFeature": {
"type": "object", "type": "object",
"properties": { "properties": {

View File

@ -24,9 +24,9 @@ import (
// DatabaseDetectorTypeMapping maps the database detector type to the integer // DatabaseDetectorTypeMapping maps the database detector type to the integer
// enum proto. // enum proto.
var DatabaseDetectorTypeMapping = map[database.DetectorType]Detector_Type{ var DatabaseDetectorTypeMapping = map[database.DetectorType]Detector_DType{
database.NamespaceDetectorType: Detector_Type(1), database.NamespaceDetectorType: Detector_DType(1),
database.FeatureDetectorType: Detector_Type(2), database.FeatureDetectorType: Detector_DType(2),
} }
// PagedVulnerableAncestriesFromDatabaseModel converts database // PagedVulnerableAncestriesFromDatabaseModel converts database
@ -152,7 +152,7 @@ func DetectorFromDatabaseModel(detector database.Detector) *Detector {
return &Detector{ return &Detector{
Name: detector.Name, Name: detector.Name,
Version: detector.Version, Version: detector.Version,
Type: DatabaseDetectorTypeMapping[detector.DType], Dtype: DatabaseDetectorTypeMapping[detector.DType],
} }
} }