mirror of https://github.com/hashicorp/boundary
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
288 lines
12 KiB
288 lines
12 KiB
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
|
|
|
package services
|
|
|
|
import (
|
|
context "context"
|
|
grpc "google.golang.org/grpc"
|
|
codes "google.golang.org/grpc/codes"
|
|
status "google.golang.org/grpc/status"
|
|
)
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
// is compatible with the grpc package it is being compiled against.
|
|
// Requires gRPC-Go v1.32.0 or later.
|
|
const _ = grpc.SupportPackageIsVersion7
|
|
|
|
// ScopeServiceClient is the client API for ScopeService service.
|
|
//
|
|
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
|
type ScopeServiceClient interface {
|
|
// GetScope returns a stored Scope if present. The provided request
|
|
// must include the scope ID for the scope being retrieved. If
|
|
// that ID is missing, malformed or references a non existing
|
|
// resource an error is returned.
|
|
GetScope(ctx context.Context, in *GetScopeRequest, opts ...grpc.CallOption) (*GetScopeResponse, error)
|
|
// ListScopes returns a list of stored Scopes which exist inside the provided
|
|
// parent Scope id.
|
|
ListScopes(ctx context.Context, in *ListScopesRequest, opts ...grpc.CallOption) (*ListScopesResponse, error)
|
|
// CreateScope creates and stores a Scope in boundary. The provided request
|
|
// must include the Scope ID in which the new scope will be created. If the Scope
|
|
// ID is missing, malformed or references a non existing scope, an error is
|
|
// returned. If a name is provided that is in use in another Scope in the same
|
|
// parent scope, an error is returned.
|
|
CreateScope(ctx context.Context, in *CreateScopeRequest, opts ...grpc.CallOption) (*CreateScopeResponse, error)
|
|
// UpdateScope updates an existing Scope in boundary. The provided
|
|
// Scope must not have any read only fields set. The update mask must be
|
|
// included in the request and contain at least 1 mutable field. To unset
|
|
// a field's value, include the field in the update mask and don't set it
|
|
// in the provided scope. An error is returned if the Scope Id is
|
|
// missing or reference a non-existing resource. An error
|
|
// is also returned if the request attempts to update the name to one that is
|
|
// already in use by another scope in the parent scope.
|
|
UpdateScope(ctx context.Context, in *UpdateScopeRequest, opts ...grpc.CallOption) (*UpdateScopeResponse, error)
|
|
// DeleteScope remotes a Scope and all child resources from Boundary. If the
|
|
// provided Scope IDs are malformed or not provided an error is returned.
|
|
DeleteScope(ctx context.Context, in *DeleteScopeRequest, opts ...grpc.CallOption) (*DeleteScopeResponse, error)
|
|
}
|
|
|
|
type scopeServiceClient struct {
|
|
cc grpc.ClientConnInterface
|
|
}
|
|
|
|
func NewScopeServiceClient(cc grpc.ClientConnInterface) ScopeServiceClient {
|
|
return &scopeServiceClient{cc}
|
|
}
|
|
|
|
func (c *scopeServiceClient) GetScope(ctx context.Context, in *GetScopeRequest, opts ...grpc.CallOption) (*GetScopeResponse, error) {
|
|
out := new(GetScopeResponse)
|
|
err := c.cc.Invoke(ctx, "/controller.api.services.v1.ScopeService/GetScope", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *scopeServiceClient) ListScopes(ctx context.Context, in *ListScopesRequest, opts ...grpc.CallOption) (*ListScopesResponse, error) {
|
|
out := new(ListScopesResponse)
|
|
err := c.cc.Invoke(ctx, "/controller.api.services.v1.ScopeService/ListScopes", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *scopeServiceClient) CreateScope(ctx context.Context, in *CreateScopeRequest, opts ...grpc.CallOption) (*CreateScopeResponse, error) {
|
|
out := new(CreateScopeResponse)
|
|
err := c.cc.Invoke(ctx, "/controller.api.services.v1.ScopeService/CreateScope", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *scopeServiceClient) UpdateScope(ctx context.Context, in *UpdateScopeRequest, opts ...grpc.CallOption) (*UpdateScopeResponse, error) {
|
|
out := new(UpdateScopeResponse)
|
|
err := c.cc.Invoke(ctx, "/controller.api.services.v1.ScopeService/UpdateScope", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *scopeServiceClient) DeleteScope(ctx context.Context, in *DeleteScopeRequest, opts ...grpc.CallOption) (*DeleteScopeResponse, error) {
|
|
out := new(DeleteScopeResponse)
|
|
err := c.cc.Invoke(ctx, "/controller.api.services.v1.ScopeService/DeleteScope", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// ScopeServiceServer is the server API for ScopeService service.
|
|
// All implementations must embed UnimplementedScopeServiceServer
|
|
// for forward compatibility
|
|
type ScopeServiceServer interface {
|
|
// GetScope returns a stored Scope if present. The provided request
|
|
// must include the scope ID for the scope being retrieved. If
|
|
// that ID is missing, malformed or references a non existing
|
|
// resource an error is returned.
|
|
GetScope(context.Context, *GetScopeRequest) (*GetScopeResponse, error)
|
|
// ListScopes returns a list of stored Scopes which exist inside the provided
|
|
// parent Scope id.
|
|
ListScopes(context.Context, *ListScopesRequest) (*ListScopesResponse, error)
|
|
// CreateScope creates and stores a Scope in boundary. The provided request
|
|
// must include the Scope ID in which the new scope will be created. If the Scope
|
|
// ID is missing, malformed or references a non existing scope, an error is
|
|
// returned. If a name is provided that is in use in another Scope in the same
|
|
// parent scope, an error is returned.
|
|
CreateScope(context.Context, *CreateScopeRequest) (*CreateScopeResponse, error)
|
|
// UpdateScope updates an existing Scope in boundary. The provided
|
|
// Scope must not have any read only fields set. The update mask must be
|
|
// included in the request and contain at least 1 mutable field. To unset
|
|
// a field's value, include the field in the update mask and don't set it
|
|
// in the provided scope. An error is returned if the Scope Id is
|
|
// missing or reference a non-existing resource. An error
|
|
// is also returned if the request attempts to update the name to one that is
|
|
// already in use by another scope in the parent scope.
|
|
UpdateScope(context.Context, *UpdateScopeRequest) (*UpdateScopeResponse, error)
|
|
// DeleteScope remotes a Scope and all child resources from Boundary. If the
|
|
// provided Scope IDs are malformed or not provided an error is returned.
|
|
DeleteScope(context.Context, *DeleteScopeRequest) (*DeleteScopeResponse, error)
|
|
mustEmbedUnimplementedScopeServiceServer()
|
|
}
|
|
|
|
// UnimplementedScopeServiceServer must be embedded to have forward compatible implementations.
|
|
type UnimplementedScopeServiceServer struct {
|
|
}
|
|
|
|
func (UnimplementedScopeServiceServer) GetScope(context.Context, *GetScopeRequest) (*GetScopeResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method GetScope not implemented")
|
|
}
|
|
func (UnimplementedScopeServiceServer) ListScopes(context.Context, *ListScopesRequest) (*ListScopesResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method ListScopes not implemented")
|
|
}
|
|
func (UnimplementedScopeServiceServer) CreateScope(context.Context, *CreateScopeRequest) (*CreateScopeResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method CreateScope not implemented")
|
|
}
|
|
func (UnimplementedScopeServiceServer) UpdateScope(context.Context, *UpdateScopeRequest) (*UpdateScopeResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method UpdateScope not implemented")
|
|
}
|
|
func (UnimplementedScopeServiceServer) DeleteScope(context.Context, *DeleteScopeRequest) (*DeleteScopeResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method DeleteScope not implemented")
|
|
}
|
|
func (UnimplementedScopeServiceServer) mustEmbedUnimplementedScopeServiceServer() {}
|
|
|
|
// UnsafeScopeServiceServer may be embedded to opt out of forward compatibility for this service.
|
|
// Use of this interface is not recommended, as added methods to ScopeServiceServer will
|
|
// result in compilation errors.
|
|
type UnsafeScopeServiceServer interface {
|
|
mustEmbedUnimplementedScopeServiceServer()
|
|
}
|
|
|
|
func RegisterScopeServiceServer(s grpc.ServiceRegistrar, srv ScopeServiceServer) {
|
|
s.RegisterService(&ScopeService_ServiceDesc, srv)
|
|
}
|
|
|
|
func _ScopeService_GetScope_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(GetScopeRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ScopeServiceServer).GetScope(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/controller.api.services.v1.ScopeService/GetScope",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ScopeServiceServer).GetScope(ctx, req.(*GetScopeRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _ScopeService_ListScopes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(ListScopesRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ScopeServiceServer).ListScopes(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/controller.api.services.v1.ScopeService/ListScopes",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ScopeServiceServer).ListScopes(ctx, req.(*ListScopesRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _ScopeService_CreateScope_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(CreateScopeRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ScopeServiceServer).CreateScope(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/controller.api.services.v1.ScopeService/CreateScope",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ScopeServiceServer).CreateScope(ctx, req.(*CreateScopeRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _ScopeService_UpdateScope_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(UpdateScopeRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ScopeServiceServer).UpdateScope(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/controller.api.services.v1.ScopeService/UpdateScope",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ScopeServiceServer).UpdateScope(ctx, req.(*UpdateScopeRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _ScopeService_DeleteScope_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(DeleteScopeRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ScopeServiceServer).DeleteScope(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/controller.api.services.v1.ScopeService/DeleteScope",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ScopeServiceServer).DeleteScope(ctx, req.(*DeleteScopeRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
// ScopeService_ServiceDesc is the grpc.ServiceDesc for ScopeService service.
|
|
// It's only intended for direct use with grpc.RegisterService,
|
|
// and not to be introspected or modified (even as a copy)
|
|
var ScopeService_ServiceDesc = grpc.ServiceDesc{
|
|
ServiceName: "controller.api.services.v1.ScopeService",
|
|
HandlerType: (*ScopeServiceServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "GetScope",
|
|
Handler: _ScopeService_GetScope_Handler,
|
|
},
|
|
{
|
|
MethodName: "ListScopes",
|
|
Handler: _ScopeService_ListScopes_Handler,
|
|
},
|
|
{
|
|
MethodName: "CreateScope",
|
|
Handler: _ScopeService_CreateScope_Handler,
|
|
},
|
|
{
|
|
MethodName: "UpdateScope",
|
|
Handler: _ScopeService_UpdateScope_Handler,
|
|
},
|
|
{
|
|
MethodName: "DeleteScope",
|
|
Handler: _ScopeService_DeleteScope_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "controller/api/services/v1/scope_service.proto",
|
|
}
|