Migrate credential-library nomenclature around targets to credential-source (#1413)
See the CHANGELOG entry for more information. Co-authored-by: Jim <jlambert@hashicorp.com> Co-authored-by: Michael Gaffney <mgaffney@users.noreply.github.com>
This commit is contained in:
36 files changed
+3284
-673
No files matched your search
@@ -71,6 +71,7 @@ type TargetServiceClient interface {
|
||||
// returned. An error is returned if a Host Set is attempted to be
|
||||
// removed from the Target when the Target does not have the Host Set.
|
||||
RemoveTargetHostSets(ctx context.Context, in *RemoveTargetHostSetsRequest, opts ...grpc.CallOption) (*RemoveTargetHostSetsResponse, error)
|
||||
// Deprecated: Do not use.
|
||||
// AddTargetCredentialLibraries adds Credential Libraries to this Target.
|
||||
// The provided request must include the Target ID to which the Credential
|
||||
// Libraries will be added. All Credential Libraries added to the provided
|
||||
@@ -80,6 +81,7 @@ type TargetServiceClient interface {
|
||||
// Credential Library is attempted to be added to a target that is already
|
||||
// present on the Target.
|
||||
AddTargetCredentialLibraries(ctx context.Context, in *AddTargetCredentialLibrariesRequest, opts ...grpc.CallOption) (*AddTargetCredentialLibrariesResponse, error)
|
||||
// Deprecated: Do not use.
|
||||
// SetTargetCredentialLibraries sets the Target's Credential Libraries.
|
||||
// Any existing Credential Libraries on the Target are deleted if they are
|
||||
// not included in this request. The provided request must include the scope,
|
||||
@@ -88,6 +90,7 @@ type TargetServiceClient interface {
|
||||
// in the same scope as the provided Target. If any IDs are missing,
|
||||
// malformed, or references a non-existing resource, an error is returned.
|
||||
SetTargetCredentialLibraries(ctx context.Context, in *SetTargetCredentialLibrariesRequest, opts ...grpc.CallOption) (*SetTargetCredentialLibrariesResponse, error)
|
||||
// Deprecated: Do not use.
|
||||
// RemoveTargetCredentialLibraries removes the Credential Libraries from the
|
||||
// specified Target. The provided request must include the Target ID for the
|
||||
// Target from which the Credential Libraries will be removed. If the ID is
|
||||
@@ -95,6 +98,30 @@ type TargetServiceClient interface {
|
||||
// Credential Library is attempted to be removed from the Target when the
|
||||
// Target does not have the Credential Library.
|
||||
RemoveTargetCredentialLibraries(ctx context.Context, in *RemoveTargetCredentialLibrariesRequest, opts ...grpc.CallOption) (*RemoveTargetCredentialLibrariesResponse, error)
|
||||
// AddTargetCredentialSources adds Credential Sources to this Target.
|
||||
// The provided request must include the Target ID to which the Credential
|
||||
// Sources will be added. All Credential Sources added to the provided
|
||||
// Target must be a child of a Store that is in the same scope as this
|
||||
// Target. If the scope or Target IDs are missing, malformed, or reference
|
||||
// non-existing resources, an error is returned. An error is returned if a
|
||||
// Credential Source is attempted to be added to a target that is already
|
||||
// present on the Target.
|
||||
AddTargetCredentialSources(ctx context.Context, in *AddTargetCredentialSourcesRequest, opts ...grpc.CallOption) (*AddTargetCredentialSourcesResponse, error)
|
||||
// SetTargetCredentialSources sets the Target's Credential Sources.
|
||||
// Any existing Credential Sources on the Target are deleted if they are
|
||||
// not included in this request. The provided request must include the scope,
|
||||
// and the Target ID on which the Credential Sources will be set. All
|
||||
// Credential Sources in the request must be a child of a Store that is
|
||||
// in the same scope as the provided Target. If any IDs are missing,
|
||||
// malformed, or references a non-existing resource, an error is returned.
|
||||
SetTargetCredentialSources(ctx context.Context, in *SetTargetCredentialSourcesRequest, opts ...grpc.CallOption) (*SetTargetCredentialSourcesResponse, error)
|
||||
// RemoveTargetCredentialSources removes the Credential Sources from the
|
||||
// specified Target. The provided request must include the Target ID for the
|
||||
// Target from which the Credential Sources will be removed. If the ID is
|
||||
// missing, or malformed, an error is returned. An error is returned if a
|
||||
// Credential Library is attempted to be removed from the Target when the
|
||||
// Target does not have the Credential Source.
|
||||
RemoveTargetCredentialSources(ctx context.Context, in *RemoveTargetCredentialSourcesRequest, opts ...grpc.CallOption) (*RemoveTargetCredentialSourcesResponse, error)
|
||||
}
|
||||
|
||||
type targetServiceClient struct {
|
||||
@@ -186,6 +213,7 @@ func (c *targetServiceClient) RemoveTargetHostSets(ctx context.Context, in *Remo
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// Deprecated: Do not use.
|
||||
func (c *targetServiceClient) AddTargetCredentialLibraries(ctx context.Context, in *AddTargetCredentialLibrariesRequest, opts ...grpc.CallOption) (*AddTargetCredentialLibrariesResponse, error) {
|
||||
out := new(AddTargetCredentialLibrariesResponse)
|
||||
err := c.cc.Invoke(ctx, "/controller.api.services.v1.TargetService/AddTargetCredentialLibraries", in, out, opts...)
|
||||
@@ -195,6 +223,7 @@ func (c *targetServiceClient) AddTargetCredentialLibraries(ctx context.Context,
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// Deprecated: Do not use.
|
||||
func (c *targetServiceClient) SetTargetCredentialLibraries(ctx context.Context, in *SetTargetCredentialLibrariesRequest, opts ...grpc.CallOption) (*SetTargetCredentialLibrariesResponse, error) {
|
||||
out := new(SetTargetCredentialLibrariesResponse)
|
||||
err := c.cc.Invoke(ctx, "/controller.api.services.v1.TargetService/SetTargetCredentialLibraries", in, out, opts...)
|
||||
@@ -204,6 +233,7 @@ func (c *targetServiceClient) SetTargetCredentialLibraries(ctx context.Context,
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// Deprecated: Do not use.
|
||||
func (c *targetServiceClient) RemoveTargetCredentialLibraries(ctx context.Context, in *RemoveTargetCredentialLibrariesRequest, opts ...grpc.CallOption) (*RemoveTargetCredentialLibrariesResponse, error) {
|
||||
out := new(RemoveTargetCredentialLibrariesResponse)
|
||||
err := c.cc.Invoke(ctx, "/controller.api.services.v1.TargetService/RemoveTargetCredentialLibraries", in, out, opts...)
|
||||
@@ -213,6 +243,33 @@ func (c *targetServiceClient) RemoveTargetCredentialLibraries(ctx context.Contex
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *targetServiceClient) AddTargetCredentialSources(ctx context.Context, in *AddTargetCredentialSourcesRequest, opts ...grpc.CallOption) (*AddTargetCredentialSourcesResponse, error) {
|
||||
out := new(AddTargetCredentialSourcesResponse)
|
||||
err := c.cc.Invoke(ctx, "/controller.api.services.v1.TargetService/AddTargetCredentialSources", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *targetServiceClient) SetTargetCredentialSources(ctx context.Context, in *SetTargetCredentialSourcesRequest, opts ...grpc.CallOption) (*SetTargetCredentialSourcesResponse, error) {
|
||||
out := new(SetTargetCredentialSourcesResponse)
|
||||
err := c.cc.Invoke(ctx, "/controller.api.services.v1.TargetService/SetTargetCredentialSources", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *targetServiceClient) RemoveTargetCredentialSources(ctx context.Context, in *RemoveTargetCredentialSourcesRequest, opts ...grpc.CallOption) (*RemoveTargetCredentialSourcesResponse, error) {
|
||||
out := new(RemoveTargetCredentialSourcesResponse)
|
||||
err := c.cc.Invoke(ctx, "/controller.api.services.v1.TargetService/RemoveTargetCredentialSources", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// TargetServiceServer is the server API for TargetService service.
|
||||
// All implementations must embed UnimplementedTargetServiceServer
|
||||
// for forward compatibility
|
||||
@@ -270,6 +327,7 @@ type TargetServiceServer interface {
|
||||
// returned. An error is returned if a Host Set is attempted to be
|
||||
// removed from the Target when the Target does not have the Host Set.
|
||||
RemoveTargetHostSets(context.Context, *RemoveTargetHostSetsRequest) (*RemoveTargetHostSetsResponse, error)
|
||||
// Deprecated: Do not use.
|
||||
// AddTargetCredentialLibraries adds Credential Libraries to this Target.
|
||||
// The provided request must include the Target ID to which the Credential
|
||||
// Libraries will be added. All Credential Libraries added to the provided
|
||||
@@ -279,6 +337,7 @@ type TargetServiceServer interface {
|
||||
// Credential Library is attempted to be added to a target that is already
|
||||
// present on the Target.
|
||||
AddTargetCredentialLibraries(context.Context, *AddTargetCredentialLibrariesRequest) (*AddTargetCredentialLibrariesResponse, error)
|
||||
// Deprecated: Do not use.
|
||||
// SetTargetCredentialLibraries sets the Target's Credential Libraries.
|
||||
// Any existing Credential Libraries on the Target are deleted if they are
|
||||
// not included in this request. The provided request must include the scope,
|
||||
@@ -287,6 +346,7 @@ type TargetServiceServer interface {
|
||||
// in the same scope as the provided Target. If any IDs are missing,
|
||||
// malformed, or references a non-existing resource, an error is returned.
|
||||
SetTargetCredentialLibraries(context.Context, *SetTargetCredentialLibrariesRequest) (*SetTargetCredentialLibrariesResponse, error)
|
||||
// Deprecated: Do not use.
|
||||
// RemoveTargetCredentialLibraries removes the Credential Libraries from the
|
||||
// specified Target. The provided request must include the Target ID for the
|
||||
// Target from which the Credential Libraries will be removed. If the ID is
|
||||
@@ -294,6 +354,30 @@ type TargetServiceServer interface {
|
||||
// Credential Library is attempted to be removed from the Target when the
|
||||
// Target does not have the Credential Library.
|
||||
RemoveTargetCredentialLibraries(context.Context, *RemoveTargetCredentialLibrariesRequest) (*RemoveTargetCredentialLibrariesResponse, error)
|
||||
// AddTargetCredentialSources adds Credential Sources to this Target.
|
||||
// The provided request must include the Target ID to which the Credential
|
||||
// Sources will be added. All Credential Sources added to the provided
|
||||
// Target must be a child of a Store that is in the same scope as this
|
||||
// Target. If the scope or Target IDs are missing, malformed, or reference
|
||||
// non-existing resources, an error is returned. An error is returned if a
|
||||
// Credential Source is attempted to be added to a target that is already
|
||||
// present on the Target.
|
||||
AddTargetCredentialSources(context.Context, *AddTargetCredentialSourcesRequest) (*AddTargetCredentialSourcesResponse, error)
|
||||
// SetTargetCredentialSources sets the Target's Credential Sources.
|
||||
// Any existing Credential Sources on the Target are deleted if they are
|
||||
// not included in this request. The provided request must include the scope,
|
||||
// and the Target ID on which the Credential Sources will be set. All
|
||||
// Credential Sources in the request must be a child of a Store that is
|
||||
// in the same scope as the provided Target. If any IDs are missing,
|
||||
// malformed, or references a non-existing resource, an error is returned.
|
||||
SetTargetCredentialSources(context.Context, *SetTargetCredentialSourcesRequest) (*SetTargetCredentialSourcesResponse, error)
|
||||
// RemoveTargetCredentialSources removes the Credential Sources from the
|
||||
// specified Target. The provided request must include the Target ID for the
|
||||
// Target from which the Credential Sources will be removed. If the ID is
|
||||
// missing, or malformed, an error is returned. An error is returned if a
|
||||
// Credential Library is attempted to be removed from the Target when the
|
||||
// Target does not have the Credential Source.
|
||||
RemoveTargetCredentialSources(context.Context, *RemoveTargetCredentialSourcesRequest) (*RemoveTargetCredentialSourcesResponse, error)
|
||||
mustEmbedUnimplementedTargetServiceServer()
|
||||
}
|
||||
|
||||
@@ -337,6 +421,15 @@ func (UnimplementedTargetServiceServer) SetTargetCredentialLibraries(context.Con
|
||||
func (UnimplementedTargetServiceServer) RemoveTargetCredentialLibraries(context.Context, *RemoveTargetCredentialLibrariesRequest) (*RemoveTargetCredentialLibrariesResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method RemoveTargetCredentialLibraries not implemented")
|
||||
}
|
||||
func (UnimplementedTargetServiceServer) AddTargetCredentialSources(context.Context, *AddTargetCredentialSourcesRequest) (*AddTargetCredentialSourcesResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method AddTargetCredentialSources not implemented")
|
||||
}
|
||||
func (UnimplementedTargetServiceServer) SetTargetCredentialSources(context.Context, *SetTargetCredentialSourcesRequest) (*SetTargetCredentialSourcesResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method SetTargetCredentialSources not implemented")
|
||||
}
|
||||
func (UnimplementedTargetServiceServer) RemoveTargetCredentialSources(context.Context, *RemoveTargetCredentialSourcesRequest) (*RemoveTargetCredentialSourcesResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method RemoveTargetCredentialSources not implemented")
|
||||
}
|
||||
func (UnimplementedTargetServiceServer) mustEmbedUnimplementedTargetServiceServer() {}
|
||||
|
||||
// UnsafeTargetServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||
@@ -566,6 +659,60 @@ func _TargetService_RemoveTargetCredentialLibraries_Handler(srv interface{}, ctx
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _TargetService_AddTargetCredentialSources_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(AddTargetCredentialSourcesRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(TargetServiceServer).AddTargetCredentialSources(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/controller.api.services.v1.TargetService/AddTargetCredentialSources",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(TargetServiceServer).AddTargetCredentialSources(ctx, req.(*AddTargetCredentialSourcesRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _TargetService_SetTargetCredentialSources_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(SetTargetCredentialSourcesRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(TargetServiceServer).SetTargetCredentialSources(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/controller.api.services.v1.TargetService/SetTargetCredentialSources",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(TargetServiceServer).SetTargetCredentialSources(ctx, req.(*SetTargetCredentialSourcesRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _TargetService_RemoveTargetCredentialSources_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(RemoveTargetCredentialSourcesRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(TargetServiceServer).RemoveTargetCredentialSources(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/controller.api.services.v1.TargetService/RemoveTargetCredentialSources",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(TargetServiceServer).RemoveTargetCredentialSources(ctx, req.(*RemoveTargetCredentialSourcesRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// TargetService_ServiceDesc is the grpc.ServiceDesc for TargetService service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
@@ -621,6 +768,18 @@ var TargetService_ServiceDesc = grpc.ServiceDesc{
|
||||
MethodName: "RemoveTargetCredentialLibraries",
|
||||
Handler: _TargetService_RemoveTargetCredentialLibraries_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "AddTargetCredentialSources",
|
||||
Handler: _TargetService_AddTargetCredentialSources_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "SetTargetCredentialSources",
|
||||
Handler: _TargetService_SetTargetCredentialSources_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "RemoveTargetCredentialSources",
|
||||
Handler: _TargetService_RemoveTargetCredentialSources_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "controller/api/services/v1/target_service.proto",
|
||||
|
||||
Reference in new issue
Block a user