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
File diff suppressed because it is too large.
Load diff
@@ -781,6 +781,210 @@ func local_request_TargetService_RemoveTargetCredentialLibraries_0(ctx context.C
|
||||
|
||||
}
|
||||
|
||||
func request_TargetService_AddTargetCredentialSources_0(ctx context.Context, marshaler runtime.Marshaler, client TargetServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq AddTargetCredentialSourcesRequest
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
newReader, berr := utilities.IOReaderFactory(req.Body)
|
||||
if berr != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
|
||||
}
|
||||
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
|
||||
var (
|
||||
val string
|
||||
ok bool
|
||||
err error
|
||||
_ = err
|
||||
)
|
||||
|
||||
val, ok = pathParams["id"]
|
||||
if !ok {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id")
|
||||
}
|
||||
|
||||
protoReq.Id, err = runtime.String(val)
|
||||
if err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err)
|
||||
}
|
||||
|
||||
msg, err := client.AddTargetCredentialSources(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
func local_request_TargetService_AddTargetCredentialSources_0(ctx context.Context, marshaler runtime.Marshaler, server TargetServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq AddTargetCredentialSourcesRequest
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
newReader, berr := utilities.IOReaderFactory(req.Body)
|
||||
if berr != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
|
||||
}
|
||||
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
|
||||
var (
|
||||
val string
|
||||
ok bool
|
||||
err error
|
||||
_ = err
|
||||
)
|
||||
|
||||
val, ok = pathParams["id"]
|
||||
if !ok {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id")
|
||||
}
|
||||
|
||||
protoReq.Id, err = runtime.String(val)
|
||||
if err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err)
|
||||
}
|
||||
|
||||
msg, err := server.AddTargetCredentialSources(ctx, &protoReq)
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
func request_TargetService_SetTargetCredentialSources_0(ctx context.Context, marshaler runtime.Marshaler, client TargetServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq SetTargetCredentialSourcesRequest
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
newReader, berr := utilities.IOReaderFactory(req.Body)
|
||||
if berr != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
|
||||
}
|
||||
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
|
||||
var (
|
||||
val string
|
||||
ok bool
|
||||
err error
|
||||
_ = err
|
||||
)
|
||||
|
||||
val, ok = pathParams["id"]
|
||||
if !ok {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id")
|
||||
}
|
||||
|
||||
protoReq.Id, err = runtime.String(val)
|
||||
if err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err)
|
||||
}
|
||||
|
||||
msg, err := client.SetTargetCredentialSources(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
func local_request_TargetService_SetTargetCredentialSources_0(ctx context.Context, marshaler runtime.Marshaler, server TargetServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq SetTargetCredentialSourcesRequest
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
newReader, berr := utilities.IOReaderFactory(req.Body)
|
||||
if berr != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
|
||||
}
|
||||
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
|
||||
var (
|
||||
val string
|
||||
ok bool
|
||||
err error
|
||||
_ = err
|
||||
)
|
||||
|
||||
val, ok = pathParams["id"]
|
||||
if !ok {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id")
|
||||
}
|
||||
|
||||
protoReq.Id, err = runtime.String(val)
|
||||
if err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err)
|
||||
}
|
||||
|
||||
msg, err := server.SetTargetCredentialSources(ctx, &protoReq)
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
func request_TargetService_RemoveTargetCredentialSources_0(ctx context.Context, marshaler runtime.Marshaler, client TargetServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq RemoveTargetCredentialSourcesRequest
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
newReader, berr := utilities.IOReaderFactory(req.Body)
|
||||
if berr != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
|
||||
}
|
||||
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
|
||||
var (
|
||||
val string
|
||||
ok bool
|
||||
err error
|
||||
_ = err
|
||||
)
|
||||
|
||||
val, ok = pathParams["id"]
|
||||
if !ok {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id")
|
||||
}
|
||||
|
||||
protoReq.Id, err = runtime.String(val)
|
||||
if err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err)
|
||||
}
|
||||
|
||||
msg, err := client.RemoveTargetCredentialSources(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
func local_request_TargetService_RemoveTargetCredentialSources_0(ctx context.Context, marshaler runtime.Marshaler, server TargetServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq RemoveTargetCredentialSourcesRequest
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
newReader, berr := utilities.IOReaderFactory(req.Body)
|
||||
if berr != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
|
||||
}
|
||||
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
|
||||
var (
|
||||
val string
|
||||
ok bool
|
||||
err error
|
||||
_ = err
|
||||
)
|
||||
|
||||
val, ok = pathParams["id"]
|
||||
if !ok {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id")
|
||||
}
|
||||
|
||||
protoReq.Id, err = runtime.String(val)
|
||||
if err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err)
|
||||
}
|
||||
|
||||
msg, err := server.RemoveTargetCredentialSources(ctx, &protoReq)
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
// RegisterTargetServiceHandlerServer registers the http handlers for service TargetService to "mux".
|
||||
// UnaryRPC :call TargetServiceServer directly.
|
||||
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
|
||||
@@ -1063,6 +1267,75 @@ func RegisterTargetServiceHandlerServer(ctx context.Context, mux *runtime.ServeM
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("POST", pattern_TargetService_AddTargetCredentialSources_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/controller.api.services.v1.TargetService/AddTargetCredentialSources")
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_TargetService_AddTargetCredentialSources_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_TargetService_AddTargetCredentialSources_0(ctx, mux, outboundMarshaler, w, req, response_TargetService_AddTargetCredentialSources_0{resp}, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("POST", pattern_TargetService_SetTargetCredentialSources_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/controller.api.services.v1.TargetService/SetTargetCredentialSources")
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_TargetService_SetTargetCredentialSources_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_TargetService_SetTargetCredentialSources_0(ctx, mux, outboundMarshaler, w, req, response_TargetService_SetTargetCredentialSources_0{resp}, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("POST", pattern_TargetService_RemoveTargetCredentialSources_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/controller.api.services.v1.TargetService/RemoveTargetCredentialSources")
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_TargetService_RemoveTargetCredentialSources_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_TargetService_RemoveTargetCredentialSources_0(ctx, mux, outboundMarshaler, w, req, response_TargetService_RemoveTargetCredentialSources_0{resp}, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -1344,6 +1617,66 @@ func RegisterTargetServiceHandlerClient(ctx context.Context, mux *runtime.ServeM
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("POST", pattern_TargetService_AddTargetCredentialSources_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, "/controller.api.services.v1.TargetService/AddTargetCredentialSources")
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_TargetService_AddTargetCredentialSources_0(rctx, inboundMarshaler, client, req, pathParams)
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_TargetService_AddTargetCredentialSources_0(ctx, mux, outboundMarshaler, w, req, response_TargetService_AddTargetCredentialSources_0{resp}, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("POST", pattern_TargetService_SetTargetCredentialSources_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, "/controller.api.services.v1.TargetService/SetTargetCredentialSources")
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_TargetService_SetTargetCredentialSources_0(rctx, inboundMarshaler, client, req, pathParams)
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_TargetService_SetTargetCredentialSources_0(ctx, mux, outboundMarshaler, w, req, response_TargetService_SetTargetCredentialSources_0{resp}, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("POST", pattern_TargetService_RemoveTargetCredentialSources_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, "/controller.api.services.v1.TargetService/RemoveTargetCredentialSources")
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_TargetService_RemoveTargetCredentialSources_0(rctx, inboundMarshaler, client, req, pathParams)
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_TargetService_RemoveTargetCredentialSources_0(ctx, mux, outboundMarshaler, w, req, response_TargetService_RemoveTargetCredentialSources_0{resp}, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -1437,6 +1770,33 @@ func (m response_TargetService_RemoveTargetCredentialLibraries_0) XXX_ResponseBo
|
||||
return response.Item
|
||||
}
|
||||
|
||||
type response_TargetService_AddTargetCredentialSources_0 struct {
|
||||
proto.Message
|
||||
}
|
||||
|
||||
func (m response_TargetService_AddTargetCredentialSources_0) XXX_ResponseBody() interface{} {
|
||||
response := m.Message.(*AddTargetCredentialSourcesResponse)
|
||||
return response.Item
|
||||
}
|
||||
|
||||
type response_TargetService_SetTargetCredentialSources_0 struct {
|
||||
proto.Message
|
||||
}
|
||||
|
||||
func (m response_TargetService_SetTargetCredentialSources_0) XXX_ResponseBody() interface{} {
|
||||
response := m.Message.(*SetTargetCredentialSourcesResponse)
|
||||
return response.Item
|
||||
}
|
||||
|
||||
type response_TargetService_RemoveTargetCredentialSources_0 struct {
|
||||
proto.Message
|
||||
}
|
||||
|
||||
func (m response_TargetService_RemoveTargetCredentialSources_0) XXX_ResponseBody() interface{} {
|
||||
response := m.Message.(*RemoveTargetCredentialSourcesResponse)
|
||||
return response.Item
|
||||
}
|
||||
|
||||
var (
|
||||
pattern_TargetService_GetTarget_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"v1", "targets", "id"}, ""))
|
||||
|
||||
@@ -1461,6 +1821,12 @@ var (
|
||||
pattern_TargetService_SetTargetCredentialLibraries_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"v1", "targets", "id"}, "set-credential-libraries"))
|
||||
|
||||
pattern_TargetService_RemoveTargetCredentialLibraries_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"v1", "targets", "id"}, "remove-credential-libraries"))
|
||||
|
||||
pattern_TargetService_AddTargetCredentialSources_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"v1", "targets", "id"}, "add-credential-sources"))
|
||||
|
||||
pattern_TargetService_SetTargetCredentialSources_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"v1", "targets", "id"}, "set-credential-sources"))
|
||||
|
||||
pattern_TargetService_RemoveTargetCredentialSources_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"v1", "targets", "id"}, "remove-credential-sources"))
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -1487,4 +1853,10 @@ var (
|
||||
forward_TargetService_SetTargetCredentialLibraries_0 = runtime.ForwardResponseMessage
|
||||
|
||||
forward_TargetService_RemoveTargetCredentialLibraries_0 = runtime.ForwardResponseMessage
|
||||
|
||||
forward_TargetService_AddTargetCredentialSources_0 = runtime.ForwardResponseMessage
|
||||
|
||||
forward_TargetService_SetTargetCredentialSources_0 = runtime.ForwardResponseMessage
|
||||
|
||||
forward_TargetService_RemoveTargetCredentialSources_0 = runtime.ForwardResponseMessage
|
||||
)
|
||||
@@ -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