diff --git a/components/automate-gateway/api/iam/v2/request/teams.pb.go b/components/automate-gateway/api/iam/v2/request/teams.pb.go index 196aeff57cf7..eb0a1d9eeb5b 100644 --- a/components/automate-gateway/api/iam/v2/request/teams.pb.go +++ b/components/automate-gateway/api/iam/v2/request/teams.pb.go @@ -21,6 +21,37 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package +type GetVersionReq struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetVersionReq) Reset() { *m = GetVersionReq{} } +func (m *GetVersionReq) String() string { return proto.CompactTextString(m) } +func (*GetVersionReq) ProtoMessage() {} +func (*GetVersionReq) Descriptor() ([]byte, []int) { + return fileDescriptor_b5377b66d36621f2, []int{0} +} + +func (m *GetVersionReq) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetVersionReq.Unmarshal(m, b) +} +func (m *GetVersionReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetVersionReq.Marshal(b, m, deterministic) +} +func (m *GetVersionReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetVersionReq.Merge(m, src) +} +func (m *GetVersionReq) XXX_Size() int { + return xxx_messageInfo_GetVersionReq.Size(m) +} +func (m *GetVersionReq) XXX_DiscardUnknown() { + xxx_messageInfo_GetVersionReq.DiscardUnknown(m) +} + +var xxx_messageInfo_GetVersionReq proto.InternalMessageInfo + type ListTeamsReq struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -31,7 +62,7 @@ func (m *ListTeamsReq) Reset() { *m = ListTeamsReq{} } func (m *ListTeamsReq) String() string { return proto.CompactTextString(m) } func (*ListTeamsReq) ProtoMessage() {} func (*ListTeamsReq) Descriptor() ([]byte, []int) { - return fileDescriptor_b5377b66d36621f2, []int{0} + return fileDescriptor_b5377b66d36621f2, []int{1} } func (m *ListTeamsReq) XXX_Unmarshal(b []byte) error { @@ -63,7 +94,7 @@ func (m *GetTeamReq) Reset() { *m = GetTeamReq{} } func (m *GetTeamReq) String() string { return proto.CompactTextString(m) } func (*GetTeamReq) ProtoMessage() {} func (*GetTeamReq) Descriptor() ([]byte, []int) { - return fileDescriptor_b5377b66d36621f2, []int{1} + return fileDescriptor_b5377b66d36621f2, []int{2} } func (m *GetTeamReq) XXX_Unmarshal(b []byte) error { @@ -104,7 +135,7 @@ func (m *CreateTeamReq) Reset() { *m = CreateTeamReq{} } func (m *CreateTeamReq) String() string { return proto.CompactTextString(m) } func (*CreateTeamReq) ProtoMessage() {} func (*CreateTeamReq) Descriptor() ([]byte, []int) { - return fileDescriptor_b5377b66d36621f2, []int{2} + return fileDescriptor_b5377b66d36621f2, []int{3} } func (m *CreateTeamReq) XXX_Unmarshal(b []byte) error { @@ -159,7 +190,7 @@ func (m *UpdateTeamReq) Reset() { *m = UpdateTeamReq{} } func (m *UpdateTeamReq) String() string { return proto.CompactTextString(m) } func (*UpdateTeamReq) ProtoMessage() {} func (*UpdateTeamReq) Descriptor() ([]byte, []int) { - return fileDescriptor_b5377b66d36621f2, []int{3} + return fileDescriptor_b5377b66d36621f2, []int{4} } func (m *UpdateTeamReq) XXX_Unmarshal(b []byte) error { @@ -212,7 +243,7 @@ func (m *DeleteTeamReq) Reset() { *m = DeleteTeamReq{} } func (m *DeleteTeamReq) String() string { return proto.CompactTextString(m) } func (*DeleteTeamReq) ProtoMessage() {} func (*DeleteTeamReq) Descriptor() ([]byte, []int) { - return fileDescriptor_b5377b66d36621f2, []int{4} + return fileDescriptor_b5377b66d36621f2, []int{5} } func (m *DeleteTeamReq) XXX_Unmarshal(b []byte) error { @@ -252,7 +283,7 @@ func (m *AddTeamMembersReq) Reset() { *m = AddTeamMembersReq{} } func (m *AddTeamMembersReq) String() string { return proto.CompactTextString(m) } func (*AddTeamMembersReq) ProtoMessage() {} func (*AddTeamMembersReq) Descriptor() ([]byte, []int) { - return fileDescriptor_b5377b66d36621f2, []int{5} + return fileDescriptor_b5377b66d36621f2, []int{6} } func (m *AddTeamMembersReq) XXX_Unmarshal(b []byte) error { @@ -298,7 +329,7 @@ func (m *GetTeamMembershipReq) Reset() { *m = GetTeamMembershipReq{} } func (m *GetTeamMembershipReq) String() string { return proto.CompactTextString(m) } func (*GetTeamMembershipReq) ProtoMessage() {} func (*GetTeamMembershipReq) Descriptor() ([]byte, []int) { - return fileDescriptor_b5377b66d36621f2, []int{6} + return fileDescriptor_b5377b66d36621f2, []int{7} } func (m *GetTeamMembershipReq) XXX_Unmarshal(b []byte) error { @@ -338,7 +369,7 @@ func (m *RemoveTeamMembersReq) Reset() { *m = RemoveTeamMembersReq{} } func (m *RemoveTeamMembersReq) String() string { return proto.CompactTextString(m) } func (*RemoveTeamMembersReq) ProtoMessage() {} func (*RemoveTeamMembersReq) Descriptor() ([]byte, []int) { - return fileDescriptor_b5377b66d36621f2, []int{7} + return fileDescriptor_b5377b66d36621f2, []int{8} } func (m *RemoveTeamMembersReq) XXX_Unmarshal(b []byte) error { @@ -384,7 +415,7 @@ func (m *GetTeamsForMemberReq) Reset() { *m = GetTeamsForMemberReq{} } func (m *GetTeamsForMemberReq) String() string { return proto.CompactTextString(m) } func (*GetTeamsForMemberReq) ProtoMessage() {} func (*GetTeamsForMemberReq) Descriptor() ([]byte, []int) { - return fileDescriptor_b5377b66d36621f2, []int{8} + return fileDescriptor_b5377b66d36621f2, []int{9} } func (m *GetTeamsForMemberReq) XXX_Unmarshal(b []byte) error { @@ -422,7 +453,7 @@ func (m *ApplyV2DataMigrationsReq) Reset() { *m = ApplyV2DataMigrationsR func (m *ApplyV2DataMigrationsReq) String() string { return proto.CompactTextString(m) } func (*ApplyV2DataMigrationsReq) ProtoMessage() {} func (*ApplyV2DataMigrationsReq) Descriptor() ([]byte, []int) { - return fileDescriptor_b5377b66d36621f2, []int{9} + return fileDescriptor_b5377b66d36621f2, []int{10} } func (m *ApplyV2DataMigrationsReq) XXX_Unmarshal(b []byte) error { @@ -453,7 +484,7 @@ func (m *ResetAllTeamProjectsReq) Reset() { *m = ResetAllTeamProjectsReq func (m *ResetAllTeamProjectsReq) String() string { return proto.CompactTextString(m) } func (*ResetAllTeamProjectsReq) ProtoMessage() {} func (*ResetAllTeamProjectsReq) Descriptor() ([]byte, []int) { - return fileDescriptor_b5377b66d36621f2, []int{10} + return fileDescriptor_b5377b66d36621f2, []int{11} } func (m *ResetAllTeamProjectsReq) XXX_Unmarshal(b []byte) error { @@ -475,6 +506,7 @@ func (m *ResetAllTeamProjectsReq) XXX_DiscardUnknown() { var xxx_messageInfo_ResetAllTeamProjectsReq proto.InternalMessageInfo func init() { + proto.RegisterType((*GetVersionReq)(nil), "chef.automate.api.iam.v2.GetVersionReq") proto.RegisterType((*ListTeamsReq)(nil), "chef.automate.api.iam.v2.ListTeamsReq") proto.RegisterType((*GetTeamReq)(nil), "chef.automate.api.iam.v2.GetTeamReq") proto.RegisterType((*CreateTeamReq)(nil), "chef.automate.api.iam.v2.CreateTeamReq") @@ -493,30 +525,31 @@ func init() { } var fileDescriptor_b5377b66d36621f2 = []byte{ - // 397 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x53, 0xd1, 0x6a, 0xd4, 0x40, - 0x14, 0x25, 0xa9, 0xda, 0xf6, 0xd2, 0x2e, 0x36, 0x54, 0x4c, 0xf7, 0xa9, 0xe4, 0x69, 0x41, 0x37, - 0x03, 0xf1, 0x2d, 0x6f, 0xd1, 0x62, 0x29, 0x58, 0x90, 0x60, 0x45, 0x7c, 0x91, 0x9b, 0xcc, 0x35, - 0x3b, 0x92, 0xc9, 0x4c, 0x66, 0x26, 0x5b, 0xfa, 0x1b, 0xfb, 0x69, 0xfd, 0x22, 0xc9, 0x6c, 0x5c, - 0x10, 0x2c, 0xc5, 0x87, 0xbe, 0xdd, 0x13, 0x4e, 0xce, 0x39, 0x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xc7, - 0x5f, 0x87, 0xbe, 0x81, 0x93, 0x82, 0xf3, 0x91, 0x79, 0x4d, 0xb2, 0x22, 0x63, 0xff, 0x15, 0xea, - 0x0c, 0x0e, 0x06, 0x4b, 0xe6, 0x87, 0xe0, 0x36, 0x0e, 0x7d, 0x80, 0xfd, 0x11, 0x5f, 0x71, 0x9b, - 0xbf, 0xda, 0x14, 0x11, 0xbc, 0x9c, 0xfc, 0x77, 0xac, 0x24, 0x83, 0xd3, 0xe9, 0xd6, 0x27, 0xd9, - 0x95, 0xd0, 0x8f, 0x45, 0xf9, 0x06, 0xa7, 0x25, 0x49, 0xb5, 0xa6, 0x27, 0x4c, 0x63, 0x3f, 0x2a, - 0xb3, 0x95, 0x7e, 0x2c, 0xcd, 0x1c, 0xe2, 0x42, 0xeb, 0xf6, 0xee, 0x6b, 0x76, 0x81, 0x0e, 0xaf, - 0x45, 0x63, 0xb6, 0x35, 0x1b, 0x3b, 0x75, 0x06, 0xaf, 0x4b, 0xb2, 0xe4, 0x8a, 0xb6, 0x1d, 0x45, - 0x3f, 0x4f, 0x8f, 0x51, 0x52, 0xff, 0xfe, 0xea, 0xfb, 0x65, 0x23, 0xdc, 0x6a, 0xa8, 0xd2, 0x5a, - 0x49, 0x36, 0x76, 0x7a, 0xb7, 0x09, 0xec, 0xff, 0xb6, 0xa3, 0x7a, 0xe1, 0x0b, 0xfd, 0xee, 0x77, - 0x00, 0x00, 0x00, 0xff, 0xff, 0x1e, 0x7a, 0xb9, 0x91, 0x56, 0x03, 0x00, 0x00, + // 408 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x53, 0x5d, 0x6b, 0x13, 0x41, + 0x14, 0x25, 0x5b, 0xb5, 0xed, 0xa5, 0x89, 0x76, 0xa9, 0xb8, 0xcd, 0x53, 0xc9, 0x53, 0x40, 0xb3, + 0x03, 0xf1, 0x2d, 0x6f, 0xab, 0xc5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 0x9f, 0x9a, 0x67, 0x03, 0x00, 0x00, } diff --git a/components/automate-gateway/api/iam/v2/request/teams.proto b/components/automate-gateway/api/iam/v2/request/teams.proto index 12d54bfe6e4a..4c260e878df4 100644 --- a/components/automate-gateway/api/iam/v2/request/teams.proto +++ b/components/automate-gateway/api/iam/v2/request/teams.proto @@ -5,6 +5,8 @@ option go_package = "github.com/chef/automate/components/automate-gateway/api/ia import "protoc-gen-swagger/options/annotations.proto"; +message GetVersionReq {} + message ListTeamsReq {} message GetTeamReq { diff --git a/components/automate-gateway/api/iam/v2/response/teams.pb.go b/components/automate-gateway/api/iam/v2/response/teams.pb.go index 99bbc25a00c0..a93adf308ab5 100644 --- a/components/automate-gateway/api/iam/v2/response/teams.pb.go +++ b/components/automate-gateway/api/iam/v2/response/teams.pb.go @@ -21,6 +21,45 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package +type GetVersionResp struct { + Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetVersionResp) Reset() { *m = GetVersionResp{} } +func (m *GetVersionResp) String() string { return proto.CompactTextString(m) } +func (*GetVersionResp) ProtoMessage() {} +func (*GetVersionResp) Descriptor() ([]byte, []int) { + return fileDescriptor_6a0fc0626d013215, []int{0} +} + +func (m *GetVersionResp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetVersionResp.Unmarshal(m, b) +} +func (m *GetVersionResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetVersionResp.Marshal(b, m, deterministic) +} +func (m *GetVersionResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetVersionResp.Merge(m, src) +} +func (m *GetVersionResp) XXX_Size() int { + return xxx_messageInfo_GetVersionResp.Size(m) +} +func (m *GetVersionResp) XXX_DiscardUnknown() { + xxx_messageInfo_GetVersionResp.DiscardUnknown(m) +} + +var xxx_messageInfo_GetVersionResp proto.InternalMessageInfo + +func (m *GetVersionResp) GetVersion() string { + if m != nil { + return m.Version + } + return "" +} + type GetTeamResp struct { Team *common.Team `protobuf:"bytes,1,opt,name=team,proto3" json:"team,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` @@ -32,7 +71,7 @@ func (m *GetTeamResp) Reset() { *m = GetTeamResp{} } func (m *GetTeamResp) String() string { return proto.CompactTextString(m) } func (*GetTeamResp) ProtoMessage() {} func (*GetTeamResp) Descriptor() ([]byte, []int) { - return fileDescriptor_6a0fc0626d013215, []int{0} + return fileDescriptor_6a0fc0626d013215, []int{1} } func (m *GetTeamResp) XXX_Unmarshal(b []byte) error { @@ -71,7 +110,7 @@ func (m *ListTeamsResp) Reset() { *m = ListTeamsResp{} } func (m *ListTeamsResp) String() string { return proto.CompactTextString(m) } func (*ListTeamsResp) ProtoMessage() {} func (*ListTeamsResp) Descriptor() ([]byte, []int) { - return fileDescriptor_6a0fc0626d013215, []int{1} + return fileDescriptor_6a0fc0626d013215, []int{2} } func (m *ListTeamsResp) XXX_Unmarshal(b []byte) error { @@ -110,7 +149,7 @@ func (m *CreateTeamResp) Reset() { *m = CreateTeamResp{} } func (m *CreateTeamResp) String() string { return proto.CompactTextString(m) } func (*CreateTeamResp) ProtoMessage() {} func (*CreateTeamResp) Descriptor() ([]byte, []int) { - return fileDescriptor_6a0fc0626d013215, []int{2} + return fileDescriptor_6a0fc0626d013215, []int{3} } func (m *CreateTeamResp) XXX_Unmarshal(b []byte) error { @@ -149,7 +188,7 @@ func (m *UpdateTeamResp) Reset() { *m = UpdateTeamResp{} } func (m *UpdateTeamResp) String() string { return proto.CompactTextString(m) } func (*UpdateTeamResp) ProtoMessage() {} func (*UpdateTeamResp) Descriptor() ([]byte, []int) { - return fileDescriptor_6a0fc0626d013215, []int{3} + return fileDescriptor_6a0fc0626d013215, []int{4} } func (m *UpdateTeamResp) XXX_Unmarshal(b []byte) error { @@ -188,7 +227,7 @@ func (m *DeleteTeamResp) Reset() { *m = DeleteTeamResp{} } func (m *DeleteTeamResp) String() string { return proto.CompactTextString(m) } func (*DeleteTeamResp) ProtoMessage() {} func (*DeleteTeamResp) Descriptor() ([]byte, []int) { - return fileDescriptor_6a0fc0626d013215, []int{4} + return fileDescriptor_6a0fc0626d013215, []int{5} } func (m *DeleteTeamResp) XXX_Unmarshal(b []byte) error { @@ -227,7 +266,7 @@ func (m *AddTeamMembersResp) Reset() { *m = AddTeamMembersResp{} } func (m *AddTeamMembersResp) String() string { return proto.CompactTextString(m) } func (*AddTeamMembersResp) ProtoMessage() {} func (*AddTeamMembersResp) Descriptor() ([]byte, []int) { - return fileDescriptor_6a0fc0626d013215, []int{5} + return fileDescriptor_6a0fc0626d013215, []int{6} } func (m *AddTeamMembersResp) XXX_Unmarshal(b []byte) error { @@ -266,7 +305,7 @@ func (m *GetTeamMembershipResp) Reset() { *m = GetTeamMembershipResp{} } func (m *GetTeamMembershipResp) String() string { return proto.CompactTextString(m) } func (*GetTeamMembershipResp) ProtoMessage() {} func (*GetTeamMembershipResp) Descriptor() ([]byte, []int) { - return fileDescriptor_6a0fc0626d013215, []int{6} + return fileDescriptor_6a0fc0626d013215, []int{7} } func (m *GetTeamMembershipResp) XXX_Unmarshal(b []byte) error { @@ -305,7 +344,7 @@ func (m *RemoveTeamMembersResp) Reset() { *m = RemoveTeamMembersResp{} } func (m *RemoveTeamMembersResp) String() string { return proto.CompactTextString(m) } func (*RemoveTeamMembersResp) ProtoMessage() {} func (*RemoveTeamMembersResp) Descriptor() ([]byte, []int) { - return fileDescriptor_6a0fc0626d013215, []int{7} + return fileDescriptor_6a0fc0626d013215, []int{8} } func (m *RemoveTeamMembersResp) XXX_Unmarshal(b []byte) error { @@ -344,7 +383,7 @@ func (m *GetTeamsForMemberResp) Reset() { *m = GetTeamsForMemberResp{} } func (m *GetTeamsForMemberResp) String() string { return proto.CompactTextString(m) } func (*GetTeamsForMemberResp) ProtoMessage() {} func (*GetTeamsForMemberResp) Descriptor() ([]byte, []int) { - return fileDescriptor_6a0fc0626d013215, []int{8} + return fileDescriptor_6a0fc0626d013215, []int{9} } func (m *GetTeamsForMemberResp) XXX_Unmarshal(b []byte) error { @@ -382,7 +421,7 @@ func (m *ApplyV2DataMigrationsResp) Reset() { *m = ApplyV2DataMigrations func (m *ApplyV2DataMigrationsResp) String() string { return proto.CompactTextString(m) } func (*ApplyV2DataMigrationsResp) ProtoMessage() {} func (*ApplyV2DataMigrationsResp) Descriptor() ([]byte, []int) { - return fileDescriptor_6a0fc0626d013215, []int{9} + return fileDescriptor_6a0fc0626d013215, []int{10} } func (m *ApplyV2DataMigrationsResp) XXX_Unmarshal(b []byte) error { @@ -413,7 +452,7 @@ func (m *ResetAllTeamProjectsResp) Reset() { *m = ResetAllTeamProjectsRe func (m *ResetAllTeamProjectsResp) String() string { return proto.CompactTextString(m) } func (*ResetAllTeamProjectsResp) ProtoMessage() {} func (*ResetAllTeamProjectsResp) Descriptor() ([]byte, []int) { - return fileDescriptor_6a0fc0626d013215, []int{10} + return fileDescriptor_6a0fc0626d013215, []int{11} } func (m *ResetAllTeamProjectsResp) XXX_Unmarshal(b []byte) error { @@ -435,6 +474,7 @@ func (m *ResetAllTeamProjectsResp) XXX_DiscardUnknown() { var xxx_messageInfo_ResetAllTeamProjectsResp proto.InternalMessageInfo func init() { + proto.RegisterType((*GetVersionResp)(nil), "chef.automate.api.iam.v2.GetVersionResp") proto.RegisterType((*GetTeamResp)(nil), "chef.automate.api.iam.v2.GetTeamResp") proto.RegisterType((*ListTeamsResp)(nil), "chef.automate.api.iam.v2.ListTeamsResp") proto.RegisterType((*CreateTeamResp)(nil), "chef.automate.api.iam.v2.CreateTeamResp") @@ -453,26 +493,28 @@ func init() { } var fileDescriptor_6a0fc0626d013215 = []byte{ - // 329 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x93, 0xcb, 0x4b, 0xc3, 0x40, - 0x10, 0xc6, 0x29, 0xbe, 0xb7, 0xd8, 0x43, 0x41, 0x48, 0x2b, 0x48, 0xc9, 0xc9, 0x8b, 0xbb, 0x10, - 0xbd, 0x88, 0xa7, 0x68, 0x7c, 0x62, 0x41, 0x82, 0x7a, 0xf0, 0x22, 0xd3, 0x64, 0x6c, 0x57, 0xb2, - 0xd9, 0x65, 0x77, 0x5a, 0xe9, 0x7f, 0x2f, 0xd9, 0xd4, 0xe2, 0x45, 0x68, 0x89, 0xc7, 0xdd, 0x99, - 0xef, 0xf7, 0x0d, 0xf3, 0x60, 0x17, 0x99, 0x56, 0x46, 0x97, 0x58, 0x92, 0x13, 0x30, 0x25, 0xad, - 0x80, 0xf0, 0x64, 0x0c, 0x84, 0x5f, 0x30, 0x17, 0x60, 0xa4, 0x90, 0xa0, 0xc4, 0x2c, 0x12, 0x16, - 0x9d, 0xd1, 0xa5, 0x43, 0x41, 0x08, 0xca, 0x71, 0x63, 0x35, 0xe9, 0x6e, 0x90, 0x4d, 0xf0, 0x83, - 0xff, 0xc8, 0x38, 0x18, 0xc9, 0x25, 0x28, 0x3e, 0x8b, 0xfa, 0xe7, 0x2b, 0x62, 0x33, 0xad, 0x94, - 0x2e, 0x7f, 0x43, 0xc3, 0x98, 0xb5, 0x6f, 0x91, 0x9e, 0x11, 0x54, 0x8a, 0xce, 0x74, 0x23, 0xb6, - 0x59, 0x45, 0x83, 0xd6, 0xa0, 0x75, 0xdc, 0x8e, 0x8e, 0xf8, 0x5f, 0x96, 0xdc, 0x2b, 0x7c, 0x6e, - 0x78, 0xcd, 0xf6, 0x1f, 0xa5, 0xf3, 0x0c, 0xe7, 0x21, 0x67, 0x6c, 0xcb, 0x5b, 0x04, 0xad, 0xc1, - 0xc6, 0x0a, 0x94, 0x3a, 0x39, 0x4c, 0x58, 0xe7, 0xca, 0x22, 0x10, 0x36, 0x2a, 0x26, 0x61, 0x9d, - 0x17, 0x93, 0xff, 0x03, 0x25, 0xc1, 0x02, 0x1b, 0x52, 0x04, 0xeb, 0xc6, 0x79, 0x5e, 0x7d, 0x0c, - 0x51, 0x8d, 0xd0, 0xd6, 0xdd, 0xe9, 0xb1, 0xdd, 0xa9, 0x43, 0xfb, 0x2e, 0xf3, 0xba, 0x41, 0x7b, - 0xe9, 0x4e, 0xf5, 0xbe, 0xcf, 0x5d, 0x18, 0xb1, 0x83, 0xc5, 0x30, 0x16, 0x82, 0x89, 0x34, 0x2b, - 0x68, 0x52, 0x54, 0x7a, 0x86, 0x6b, 0xf8, 0x0c, 0x97, 0x3e, 0xee, 0x46, 0xdb, 0x5a, 0xd4, 0x60, - 0x72, 0x87, 0xac, 0x17, 0x1b, 0x53, 0xcc, 0x5f, 0xa3, 0x04, 0x08, 0x86, 0x72, 0x6c, 0x81, 0xa4, - 0x2e, 0x7d, 0x19, 0x61, 0x9f, 0x05, 0x29, 0x3a, 0xa4, 0xb8, 0x28, 0x2a, 0xcd, 0x93, 0xd5, 0x9f, - 0x98, 0x91, 0x8f, 0x5d, 0x3e, 0xbc, 0xdd, 0x8d, 0x25, 0x4d, 0xa6, 0x23, 0x9e, 0x69, 0x25, 0x2a, - 0xaf, 0xe5, 0xfa, 0x8a, 0x35, 0x2f, 0x65, 0xb4, 0xed, 0xf7, 0xf9, 0xf4, 0x3b, 0x00, 0x00, 0xff, - 0xff, 0x13, 0xb6, 0x93, 0xd7, 0x63, 0x03, 0x00, 0x00, + // 353 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x93, 0x4f, 0x4b, 0xc3, 0x40, + 0x10, 0xc5, 0x29, 0xfe, 0xa9, 0xdd, 0x62, 0x0f, 0x05, 0x21, 0xad, 0x20, 0x25, 0x27, 0x11, 0xdc, + 0x85, 0xe8, 0x45, 0x3c, 0x45, 0xa3, 0x55, 0xb1, 0x20, 0x41, 0x7b, 0xf0, 0x22, 0xdb, 0x64, 0x6c, + 0x57, 0xb2, 0xd9, 0x65, 0x77, 0x1a, 0xe9, 0xb7, 0x97, 0x6c, 0xda, 0xe2, 0x45, 0x68, 0x89, 0xc7, + 0x49, 0xde, 0xfb, 0xcd, 0x63, 0x66, 0x96, 0x5c, 0x27, 0x4a, 0x6a, 0x95, 0x43, 0x8e, 0x96, 0xf1, + 0x39, 0x2a, 0xc9, 0x11, 0xce, 0xa7, 0x1c, 0xe1, 0x9b, 0x2f, 0x18, 0xd7, 0x82, 0x09, 0x2e, 0x59, + 0x11, 0x30, 0x03, 0x56, 0xab, 0xdc, 0x02, 0x43, 0xe0, 0xd2, 0x52, 0x6d, 0x14, 0xaa, 0xae, 0x97, + 0xcc, 0xe0, 0x93, 0xae, 0x6c, 0x94, 0x6b, 0x41, 0x05, 0x97, 0xb4, 0x08, 0xfa, 0x57, 0x1b, 0x62, + 0x13, 0x25, 0xa5, 0xca, 0x7f, 0x43, 0xfd, 0x33, 0xd2, 0x19, 0x02, 0x8e, 0xc1, 0x58, 0xa1, 0xf2, + 0x18, 0xac, 0xee, 0x7a, 0xa4, 0x59, 0x54, 0xa5, 0xd7, 0x18, 0x34, 0x4e, 0x5b, 0xf1, 0xaa, 0xf4, + 0x43, 0xd2, 0x1e, 0x02, 0xbe, 0x02, 0x97, 0x4e, 0x18, 0x90, 0xdd, 0x92, 0xe4, 0x54, 0xed, 0xe0, + 0x84, 0xfe, 0x15, 0x8f, 0x3a, 0x87, 0xd3, 0xfa, 0x77, 0xe4, 0xf0, 0x59, 0x58, 0xc7, 0xb0, 0x0e, + 0x72, 0x49, 0xf6, 0x5c, 0x1c, 0xaf, 0x31, 0xd8, 0xd9, 0x80, 0x52, 0x89, 0xfd, 0x88, 0x74, 0x6e, + 0x0d, 0x70, 0x84, 0x5a, 0x61, 0x22, 0xd2, 0x79, 0xd3, 0xe9, 0x3f, 0x50, 0x22, 0xc8, 0xa0, 0x26, + 0x85, 0x91, 0x6e, 0x98, 0xa6, 0xe5, 0x87, 0x11, 0xc8, 0x09, 0x98, 0x6a, 0x3a, 0x3d, 0x72, 0x30, + 0xb7, 0x60, 0x3e, 0x44, 0x5a, 0x0d, 0xa8, 0x15, 0x37, 0xcb, 0xfa, 0x31, 0xb5, 0x7e, 0x40, 0x8e, + 0x96, 0xcb, 0x58, 0x1a, 0x66, 0x42, 0x6f, 0xe0, 0x89, 0x41, 0xaa, 0x02, 0xb6, 0xe8, 0x33, 0x5a, + 0xf7, 0xb1, 0xf7, 0xca, 0x54, 0xa6, 0x1a, 0x9b, 0x3b, 0x26, 0xbd, 0x50, 0xeb, 0x6c, 0x31, 0x0e, + 0x22, 0x8e, 0x7c, 0x24, 0xa6, 0x86, 0xa3, 0x50, 0xb9, 0x8b, 0xe1, 0xf7, 0x89, 0x17, 0x83, 0x05, + 0x0c, 0xb3, 0xac, 0xf4, 0xbc, 0x18, 0xf5, 0x05, 0x09, 0xba, 0x7f, 0x37, 0x4f, 0xef, 0x0f, 0x53, + 0x81, 0xb3, 0xf9, 0x84, 0x26, 0x4a, 0xb2, 0xb2, 0xd7, 0xfa, 0xd4, 0xd9, 0x96, 0xaf, 0x6a, 0xb2, + 0xef, 0x6e, 0xff, 0xe2, 0x27, 0x00, 0x00, 0xff, 0xff, 0xb1, 0x36, 0x4c, 0xfe, 0x8f, 0x03, 0x00, + 0x00, } diff --git a/components/automate-gateway/api/iam/v2/response/teams.proto b/components/automate-gateway/api/iam/v2/response/teams.proto index 3b045178e2a6..ebc1bc90af10 100644 --- a/components/automate-gateway/api/iam/v2/response/teams.proto +++ b/components/automate-gateway/api/iam/v2/response/teams.proto @@ -5,6 +5,10 @@ option go_package = "github.com/chef/automate/components/automate-gateway/api/ia import "components/automate-gateway/api/iam/v2/common/teams.proto"; +message GetVersionResp { + string version = 1; +} + message GetTeamResp { Team team = 1; } diff --git a/components/automate-gateway/api/iam/v2/teams.pb.go b/components/automate-gateway/api/iam/v2/teams.pb.go index 5fe1ea4333a5..54ec6eef0cc7 100644 --- a/components/automate-gateway/api/iam/v2/teams.pb.go +++ b/components/automate-gateway/api/iam/v2/teams.pb.go @@ -34,51 +34,55 @@ func init() { } var fileDescriptor_16a78463b445c3d8 = []byte{ - // 691 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x96, 0xcd, 0x6e, 0xd3, 0x40, - 0x14, 0x85, 0x65, 0x04, 0xa1, 0x1d, 0xe8, 0x4f, 0x2e, 0xa1, 0xb5, 0xa2, 0x4a, 0x08, 0xab, 0xfc, - 0xa8, 0x50, 0x5b, 0x0a, 0x3b, 0xb3, 0x80, 0x02, 0x82, 0x0d, 0x6c, 0xaa, 0x76, 0x01, 0x2b, 0xa6, - 0xf6, 0x25, 0xb1, 0x14, 0x7b, 0xa6, 0x9e, 0x49, 0xaa, 0x0a, 0xb1, 0xc9, 0x32, 0x5b, 0x5e, 0x84, - 0x8d, 0x25, 0xc4, 0x03, 0x20, 0xb1, 0xe6, 0x11, 0x60, 0x09, 0xe2, 0x0d, 0x10, 0x9a, 0x71, 0x12, - 0xdb, 0x4d, 0x9c, 0xb8, 0x2c, 0xed, 0xf9, 0xae, 0xe7, 0x9c, 0x7b, 0xcf, 0x68, 0x4c, 0x5a, 0x1e, - 0x0b, 0x39, 0x8b, 0x30, 0x92, 0xc2, 0xa1, 0x3d, 0xc9, 0x42, 0x2a, 0x71, 0xb7, 0x4d, 0x25, 0x9e, - 0xd0, 0x53, 0x87, 0xf2, 0xc0, 0x09, 0x68, 0xe8, 0xf4, 0x5b, 0x8e, 0x44, 0x1a, 0x0a, 0x9b, 0xc7, - 0x4c, 0x32, 0x30, 0xbd, 0x0e, 0xbe, 0xb3, 0xc7, 0xb4, 0x4d, 0x79, 0x60, 0x07, 0x34, 0xb4, 0xfb, - 0xad, 0xe6, 0x56, 0x9b, 0xb1, 0x76, 0x17, 0x75, 0x21, 0x8d, 0x22, 0x26, 0xa9, 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0x3d, 0xdf, 0xcf, 0x49, 0x82, 0x7b, - 0xe5, 0xe2, 0x8b, 0xa4, 0x72, 0x7a, 0xbf, 0x3a, 0x2c, 0xb8, 0xd5, 0x9f, 0x33, 0xc4, 0xc9, 0x91, - 0x9a, 0x35, 0xc4, 0x0d, 0x68, 0x14, 0xcd, 0xe5, 0xce, 0xd6, 0x4d, 0x6b, 0xab, 0xcc, 0x9e, 0x4b, - 0x7d, 0x5f, 0xc5, 0xf3, 0x8f, 0x41, 0xea, 0xfb, 0x18, 0xb2, 0x3e, 0xe6, 0x8d, 0xce, 0x99, 0xea, - 0x14, 0xbc, 0x60, 0xaa, 0x33, 0x78, 0xc1, 0xad, 0xd3, 0xff, 0xcd, 0xec, 0x94, 0xdd, 0x5c, 0x6e, - 0xb7, 0xad, 0x1b, 0xa5, 0x76, 0x63, 0x2d, 0x43, 0x39, 0xfe, 0x95, 0xe5, 0x58, 0x3c, 0x67, 0x71, - 0xaa, 0xaa, 0x42, 0x8e, 0x33, 0xb8, 0x5a, 0x8e, 0xf3, 0xfc, 0x68, 0xc0, 0xe3, 0x1c, 0xa7, 0x92, - 0x74, 0x46, 0xa7, 0xaf, 0xaa, 0x51, 0x8e, 0xcf, 0x32, 0xc3, 0xc4, 0xbc, 0x06, 0xf5, 0xf1, 0xca, - 0x41, 0xe1, 0x0a, 0xc8, 0xc5, 0x58, 0x97, 0xa5, 0xc6, 0x75, 0xd9, 0x93, 0xbd, 0x37, 0x8f, 0xda, - 0x81, 0xec, 0xf4, 0x8e, 0x6c, 0x8f, 0x85, 0x8e, 0x12, 0x3d, 0xb9, 0xc9, 0x9d, 0x6a, 0x3f, 0x17, - 0x47, 0x35, 0x7d, 0x95, 0x3f, 0xf8, 0x17, 0x00, 0x00, 0xff, 0xff, 0xb4, 0x69, 0xc5, 0xa6, 0x35, - 0x09, 0x00, 0x00, + // 767 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x96, 0x31, 0x6f, 0xd3, 0x4e, + 0x18, 0xc6, 0xe5, 0xbf, 0xfe, 0x84, 0xf6, 0xa0, 0x6d, 0x72, 0xa4, 0xa9, 0x09, 0x95, 0x10, 0x56, + 0xa1, 0xa8, 0x50, 0x5b, 0x0a, 0x9b, 0x19, 0xa0, 0x80, 0xe8, 0x02, 0x4b, 0xd5, 0x22, 0xc1, 0x52, + 0xae, 0xf6, 0xdb, 0xe4, 0xa4, 0xd8, 0x77, 0xf5, 0x5d, 0x52, 0x45, 0xc0, 0x92, 0x31, 0x2b, 0x5f, + 0x84, 0xc5, 0x12, 0xe2, 0x03, 0x20, 0x31, 0x33, 0xc3, 0x02, 0x23, 0x88, 0xaf, 0x80, 0x7c, 0x4e, + 0x62, 0xbb, 0x89, 0x13, 0x97, 0x31, 0x79, 0x7f, 0xaf, 0xef, 0x79, 0xde, 0xf7, 0x39, 0xd9, 0xa8, + 0xe1, 0x30, 0x8f, 0x33, 0x1f, 0x7c, 0x29, 0x2c, 0xd2, 0x91, 0xcc, 0x23, 0x12, 0xb6, 0x9b, 0x44, + 0xc2, 0x29, 0xe9, 0x59, 0x84, 0x53, 0x8b, 0x12, 0xcf, 0xea, 0x36, 0x2c, 0x09, 0xc4, 0x13, 0x26, + 0x0f, 0x98, 0x64, 0x58, 0x77, 0x5a, 0x70, 0x6c, 0x8e, 0x68, 0x93, 0x70, 0x6a, 0x52, 0xe2, 0x99, + 0xdd, 0x46, 0x7d, 0xbd, 0xc9, 0x58, 0xb3, 0x0d, 0xaa, 0x91, 0xf8, 0x3e, 0x93, 0x44, 0x52, 0xe6, + 0x0f, 0xfb, 0xea, 0x76, 0xc1, 0xb3, 0x02, 0x38, 0xe9, 0x80, 0x90, 0xe9, 0x33, 0xeb, 0xf7, 0x0b, + 0xf7, 0x0a, 0xce, 0x7c, 0x01, 0x99, 0xe6, 0x87, 0x53, 0x9b, 0x03, 0xee, 0x58, 0xaa, 0xee, 0x6c, + 0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 0x31, 0x47, 0x48, 0x24, 0xf7, 0x66, 0x01, 0x4a, 0x70, 0xe3, 0x75, + 0x3f, 0xd4, 0x2b, 0x68, 0x25, 0x11, 0x6b, 0xbf, 0xa1, 0xee, 0xbb, 0x8c, 0xe2, 0x32, 0x4a, 0x49, + 0x8c, 0xaa, 0x83, 0x50, 0x5f, 0xc1, 0x4b, 0xc9, 0x7f, 0xa3, 0x81, 0x57, 0x31, 0xce, 0xa8, 0xb6, + 0x22, 0x18, 0x7f, 0xd2, 0x10, 0x7a, 0x1c, 0x00, 0x91, 0xa0, 0xd4, 0xcf, 0x18, 0x63, 0x42, 0xcd, + 0x49, 0x53, 0x1a, 0x14, 0xdc, 0x78, 0x39, 0x65, 0xe0, 0x0b, 0xb8, 0xe4, 0x28, 0x6a, 0x72, 0xe4, + 0x18, 0x97, 0x13, 0xed, 0x31, 0xa4, 0xe4, 0x63, 0x23, 0x3b, 0x74, 0x5b, 0xdb, 0xc2, 0x5f, 0x34, + 0x84, 0x0e, 0xb8, 0x5b, 0x40, 0x7c, 0x42, 0xcd, 0x11, 0x9f, 0x06, 0x05, 0x37, 0x5a, 0x79, 0x0b, + 0x58, 0xc0, 0xa5, 0x8e, 0x42, 0x73, 0x56, 0x90, 0xb1, 0x11, 0x93, 0x71, 0xec, 0xeb, 0x53, 0xb6, + 0x10, 0x79, 0xf9, 0xac, 0x21, 0xf4, 0x04, 0xda, 0x30, 0xdf, 0x4b, 0x42, 0xcd, 0xf1, 0x92, 0x06, + 0x05, 0x37, 0x60, 0x86, 0x17, 0x57, 0xa1, 0x45, 0xbc, 0xc4, 0x64, 0x9c, 0xa8, 0xad, 0x69, 0x89, + 0xfa, 0xad, 0xa1, 0xca, 0x30, 0xc3, 0xcf, 0xc1, 0x3b, 0x82, 0x40, 0xb4, 0x28, 0xc7, 0xe6, 0xdc, + 0xc0, 0x27, 0x70, 0x64, 0xcb, 0x3a, 0x17, 0x2f, 0xb8, 0x71, 0xda, 0x0f, 0xf5, 0x35,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0x89, 0x1e, 0x7f, 0xa9, 0x58, 0xc5, 0x3e, 0x9e, 0x8e, 0x4a, 0xea, 0x53, 0xe5, + 0xde, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x63, 0xb5, 0x53, 0xdc, 0x15, 0x0a, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -93,6 +97,7 @@ const _ = grpc.SupportPackageIsVersion6 // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type TeamsClient interface { + GetVersion(ctx context.Context, in *request.GetVersionReq, opts ...grpc.CallOption) (*response.GetVersionResp, error) ListTeams(ctx context.Context, in *request.ListTeamsReq, opts ...grpc.CallOption) (*response.ListTeamsResp, error) GetTeam(ctx context.Context, in *request.GetTeamReq, opts ...grpc.CallOption) (*response.GetTeamResp, error) CreateTeam(ctx context.Context, in *request.CreateTeamReq, opts ...grpc.CallOption) (*response.CreateTeamResp, error) @@ -112,6 +117,15 @@ func NewTeamsClient(cc grpc.ClientConnInterface) TeamsClient { return &teamsClient{cc} } +func (c *teamsClient) GetVersion(ctx context.Context, in *request.GetVersionReq, opts ...grpc.CallOption) (*response.GetVersionResp, error) { + out := new(response.GetVersionResp) + err := c.cc.Invoke(ctx, "/chef.automate.api.iam.v2.Teams/GetVersion", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *teamsClient) ListTeams(ctx context.Context, in *request.ListTeamsReq, opts ...grpc.CallOption) (*response.ListTeamsResp, error) { out := new(response.ListTeamsResp) err := c.cc.Invoke(ctx, "/chef.automate.api.iam.v2.Teams/ListTeams", in, out, opts...) @@ -195,6 +209,7 @@ func (c *teamsClient) GetTeamsForMember(ctx context.Context, in *request.GetTeam // TeamsServer is the server API for Teams service. type TeamsServer interface { + GetVersion(context.Context, *request.GetVersionReq) (*response.GetVersionResp, error) ListTeams(context.Context, *request.ListTeamsReq) (*response.ListTeamsResp, error) GetTeam(context.Context, *request.GetTeamReq) (*response.GetTeamResp, error) CreateTeam(context.Context, *request.CreateTeamReq) (*response.CreateTeamResp, error) @@ -210,6 +225,9 @@ type TeamsServer interface { type UnimplementedTeamsServer struct { } +func (*UnimplementedTeamsServer) GetVersion(ctx context.Context, req *request.GetVersionReq) (*response.GetVersionResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetVersion not implemented") +} func (*UnimplementedTeamsServer) ListTeams(ctx context.Context, req *request.ListTeamsReq) (*response.ListTeamsResp, error) { return nil, status.Errorf(codes.Unimplemented, "method ListTeams not implemented") } @@ -242,6 +260,24 @@ func RegisterTeamsServer(s *grpc.Server, srv TeamsServer) { s.RegisterService(&_Teams_serviceDesc, srv) } +func _Teams_GetVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(request.GetVersionReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TeamsServer).GetVersion(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/chef.automate.api.iam.v2.Teams/GetVersion", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TeamsServer).GetVersion(ctx, req.(*request.GetVersionReq)) + } + return interceptor(ctx, in, info, handler) +} + func _Teams_ListTeams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(request.ListTeamsReq) if err := dec(in); err != nil { @@ -408,6 +444,10 @@ var _Teams_serviceDesc = grpc.ServiceDesc{ ServiceName: "chef.automate.api.iam.v2.Teams", HandlerType: (*TeamsServer)(nil), Methods: []grpc.MethodDesc{ + { + MethodName: "GetVersion", + Handler: _Teams_GetVersion_Handler, + }, { MethodName: "ListTeams", Handler: _Teams_ListTeams_Handler, diff --git a/components/automate-gateway/api/iam/v2/teams.pb.gw.go b/components/automate-gateway/api/iam/v2/teams.pb.gw.go index eb580a3fd577..d7e86e63b96e 100644 --- a/components/automate-gateway/api/iam/v2/teams.pb.gw.go +++ b/components/automate-gateway/api/iam/v2/teams.pb.gw.go @@ -32,6 +32,24 @@ var _ = runtime.String var _ = utilities.NewDoubleArray var _ = descriptor.ForMessage +func request_Teams_GetVersion_0(ctx context.Context, marshaler runtime.Marshaler, client TeamsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq request.GetVersionReq + var metadata runtime.ServerMetadata + + msg, err := client.GetVersion(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Teams_GetVersion_0(ctx context.Context, marshaler runtime.Marshaler, server TeamsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq request.GetVersionReq + var metadata runtime.ServerMetadata + + msg, err := server.GetVersion(ctx, &protoReq) + return msg, metadata, err + +} + func request_Teams_ListTeams_0(ctx context.Context, marshaler runtime.Marshaler, client TeamsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq request.ListTeamsReq var metadata runtime.ServerMetadata @@ -515,6 +533,26 @@ func local_request_Teams_GetTeamsForMember_0(ctx context.Context, marshaler runt // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. func RegisterTeamsHandlerServer(ctx context.Context, mux *runtime.ServeMux, server TeamsServer) error { + mux.Handle("GET", pattern_Teams_GetVersion_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Teams_GetVersion_0(rctx, inboundMarshaler, server, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Teams_GetVersion_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_Teams_ListTeams_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -736,6 +774,26 @@ func RegisterTeamsHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc // "TeamsClient" to call the correct interceptors. func RegisterTeamsHandlerClient(ctx context.Context, mux *runtime.ServeMux, client TeamsClient) error { + mux.Handle("GET", pattern_Teams_GetVersion_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Teams_GetVersion_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Teams_GetVersion_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_Teams_ListTeams_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -920,6 +978,8 @@ func RegisterTeamsHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } var ( + pattern_Teams_GetVersion_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"iam", "v2", "teams_version"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Teams_ListTeams_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"iam", "v2", "teams"}, "", runtime.AssumeColonVerbOpt(true))) pattern_Teams_GetTeam_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"iam", "v2", "teams", "id"}, "", runtime.AssumeColonVerbOpt(true))) @@ -940,6 +1000,8 @@ var ( ) var ( + forward_Teams_GetVersion_0 = runtime.ForwardResponseMessage + forward_Teams_ListTeams_0 = runtime.ForwardResponseMessage forward_Teams_GetTeam_0 = runtime.ForwardResponseMessage diff --git a/components/automate-gateway/api/iam/v2/teams.pb.mock.go b/components/automate-gateway/api/iam/v2/teams.pb.mock.go index 841c6d0ff8cd..b2f750d5d0e8 100644 --- a/components/automate-gateway/api/iam/v2/teams.pb.mock.go +++ b/components/automate-gateway/api/iam/v2/teams.pb.mock.go @@ -31,6 +31,7 @@ func NewTeamsServerMockWithoutValidation() *TeamsServerMock { // methods with "not implemented" returns type TeamsServerMock struct { validateRequests bool + GetVersionFunc func(context.Context, *request.GetVersionReq) (*response.GetVersionResp, error) ListTeamsFunc func(context.Context, *request.ListTeamsReq) (*response.ListTeamsResp, error) GetTeamFunc func(context.Context, *request.GetTeamReq) (*response.GetTeamResp, error) CreateTeamFunc func(context.Context, *request.CreateTeamReq) (*response.CreateTeamResp, error) @@ -42,6 +43,18 @@ type TeamsServerMock struct { GetTeamsForMemberFunc func(context.Context, *request.GetTeamsForMemberReq) (*response.GetTeamsForMemberResp, error) } +func (m *TeamsServerMock) GetVersion(ctx context.Context, req *request.GetVersionReq) (*response.GetVersionResp, error) { + if msg, ok := interface{}(req).(interface{ Validate() error }); m.validateRequests && ok { + if err := msg.Validate(); err != nil { + return nil, status.Error(codes.InvalidArgument, err.Error()) + } + } + if f := m.GetVersionFunc; f != nil { + return f(ctx, req) + } + return nil, status.Error(codes.Internal, "mock: 'GetVersion' not implemented") +} + func (m *TeamsServerMock) ListTeams(ctx context.Context, req *request.ListTeamsReq) (*response.ListTeamsResp, error) { if msg, ok := interface{}(req).(interface{ Validate() error }); m.validateRequests && ok { if err := msg.Validate(); err != nil { @@ -152,6 +165,7 @@ func (m *TeamsServerMock) GetTeamsForMember(ctx context.Context, req *request.Ge // Reset resets all overridden functions func (m *TeamsServerMock) Reset() { + m.GetVersionFunc = nil m.ListTeamsFunc = nil m.GetTeamFunc = nil m.CreateTeamFunc = nil diff --git a/components/automate-gateway/api/iam/v2/teams.pb.policy-v1.go b/components/automate-gateway/api/iam/v2/teams.pb.policy-v1.go index 6310c98597e2..37d5b6538925 100644 --- a/components/automate-gateway/api/iam/v2/teams.pb.policy-v1.go +++ b/components/automate-gateway/api/iam/v2/teams.pb.policy-v1.go @@ -9,6 +9,9 @@ import ( ) func init() { + policy.MapMethodTo("/chef.automate.api.iam.v2.Teams/GetVersion", "service_info:version", "read", "GET", "/iam/v2/teams_version", func(unexpandedResource string, input interface{}) string { + return unexpandedResource + }) policy.MapMethodTo("/chef.automate.api.iam.v2.Teams/ListTeams", "auth:teams", "read", "GET", "/iam/v2/teams", func(unexpandedResource string, input interface{}) string { return unexpandedResource }) diff --git a/components/automate-gateway/api/iam/v2/teams.pb.policy-v2.go b/components/automate-gateway/api/iam/v2/teams.pb.policy-v2.go index 39b8d5a9a786..238ee083eaa3 100644 --- a/components/automate-gateway/api/iam/v2/teams.pb.policy-v2.go +++ b/components/automate-gateway/api/iam/v2/teams.pb.policy-v2.go @@ -9,6 +9,9 @@ import ( ) func init() { + policyv2.MapMethodTo("/chef.automate.api.iam.v2.Teams/GetVersion", "system:service:version", "system:serviceVersion:get", "GET", "/iam/v2/teams_version", func(unexpandedResource string, input interface{}) string { + return unexpandedResource + }) policyv2.MapMethodTo("/chef.automate.api.iam.v2.Teams/ListTeams", "iam:teams", "iam:teams:list", "GET", "/iam/v2/teams", func(unexpandedResource string, input interface{}) string { return unexpandedResource }) diff --git a/components/automate-gateway/api/iam/v2/teams.proto b/components/automate-gateway/api/iam/v2/teams.proto index 173ff1bfa1a9..d900fc0688ea 100644 --- a/components/automate-gateway/api/iam/v2/teams.proto +++ b/components/automate-gateway/api/iam/v2/teams.proto @@ -11,6 +11,15 @@ import "components/automate-grpc/protoc-gen-policy/api/annotations.proto"; import "components/automate-grpc/protoc-gen-policy/iam/annotations.proto"; service Teams { + rpc GetVersion (GetVersionReq) returns (GetVersionResp) { + option (google.api.http) = { + get: "/iam/v2/teams_version" + }; + option (chef.automate.api.policy).resource = "service_info:version"; + option (chef.automate.api.policy).action = "read"; + option (chef.automate.api.iam.policy).resource = "system:service:version"; + option (chef.automate.api.iam.policy).action = "system:serviceVersion:get"; + }; rpc ListTeams (ListTeamsReq) returns (ListTeamsResp) { option (google.api.http) = { get: "/iam/v2/teams" diff --git a/components/automate-gateway/api/iam/v2/teams.swagger.json b/components/automate-gateway/api/iam/v2/teams.swagger.json index 6790d4dca471..a081c024b365 100644 --- a/components/automate-gateway/api/iam/v2/teams.swagger.json +++ b/components/automate-gateway/api/iam/v2/teams.swagger.json @@ -215,6 +215,22 @@ ] } }, + "/iam/v2/teams_version": { + "get": { + "operationId": "GetVersion", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/chef.automate.api.iam.v2.GetVersionResp" + } + } + }, + "tags": [ + "Teams" + ] + } + }, "/iam/v2/users/{id}/teams": { "get": { "operationId": "GetTeamsForMember", @@ -337,6 +353,14 @@ } } }, + "chef.automate.api.iam.v2.GetVersionResp": { + "type": "object", + "properties": { + "version": { + "type": "string" + } + } + }, "chef.automate.api.iam.v2.ListTeamsResp": { "type": "object", "properties": { diff --git a/components/automate-gateway/api/iam_v2_teams.pb.swagger.go b/components/automate-gateway/api/iam_v2_teams.pb.swagger.go index 1202a3f5948d..f32c79523608 100644 --- a/components/automate-gateway/api/iam_v2_teams.pb.swagger.go +++ b/components/automate-gateway/api/iam_v2_teams.pb.swagger.go @@ -218,6 +218,22 @@ func init() { ] } }, + "/iam/v2/teams_version": { + "get": { + "operationId": "GetVersion", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/chef.automate.api.iam.v2.GetVersionResp" + } + } + }, + "tags": [ + "Teams" + ] + } + }, "/iam/v2/users/{id}/teams": { "get": { "operationId": "GetTeamsForMember", @@ -340,6 +356,14 @@ func init() { } } }, + "chef.automate.api.iam.v2.GetVersionResp": { + "type": "object", + "properties": { + "version": { + "type": "string" + } + } + }, "chef.automate.api.iam.v2.ListTeamsResp": { "type": "object", "properties": { diff --git a/components/automate-gateway/handler/iam/v2/teams/teams.go b/components/automate-gateway/handler/iam/v2/teams/teams.go index b435fee80114..ac6ae5a002b4 100644 --- a/components/automate-gateway/handler/iam/v2/teams/teams.go +++ b/components/automate-gateway/handler/iam/v2/teams/teams.go @@ -3,6 +3,7 @@ package teams import ( "context" + version "github.com/chef/automate/api/external/common/version" teams "github.com/chef/automate/api/interservice/teams/v2" // Teams Service Gateway Requests/Response/Service definitions @@ -21,6 +22,18 @@ func NewServer(client teams.TeamsV2Client) *Server { } } +// TODO +// GetVersion returns service version +func (a *Server) GetVersion(ctx context.Context, _ *version.VersionInfoRequest) (*version.VersionInfo, error) { + req := &version.VersionInfoRequest{} + res, err := a.client.GetVersion(ctx, req) + if err != nil { + return nil, err + } + + return res, nil +} + // ListTeams fetches an array of existing teams func (a *Server) ListTeams(ctx context.Context, _ *gwreq.ListTeamsReq) (*gwres.ListTeamsResp, error) { req := &teams.ListTeamsReq{} diff --git a/inspec/a2-api-smoke/controls/base.rb b/inspec/a2-api-smoke/controls/base.rb index 6c3c2f04d51c..c1c72e7e21da 100644 --- a/inspec/a2-api-smoke/controls/base.rb +++ b/inspec/a2-api-smoke/controls/base.rb @@ -50,8 +50,10 @@ }, }, 'teams-service': { - path: '/apis/iam/v2/teams', - response_match: {}, + path: '/apis/iam/v2/teams_version', + response_match: { + name: 'teams-service' + }, }, 'automate-gateway': { path: '/api/v0/gateway/version',