mirror of https://github.com/hashicorp/boundary
Migrate to newer grpc utilities and bump deps (#593)
* Migrate to newer grpc utilities and bump deps * Revert grpc back as it was an accidental tagpull/596/head
parent
273cf29ba4
commit
7f00e61ab0
@ -0,0 +1,360 @@
|
||||
// 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.
|
||||
const _ = grpc.SupportPackageIsVersion6
|
||||
|
||||
// AccountServiceClient is the client API for AccountService 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 AccountServiceClient interface {
|
||||
// GetAccount returns a stored Account if present. The provided request must
|
||||
// include the id for the Account be retrieved. If missing, malformed or
|
||||
// referencing a non existing Account an error is returned.
|
||||
GetAccount(ctx context.Context, in *GetAccountRequest, opts ...grpc.CallOption) (*GetAccountResponse, error)
|
||||
// ListAccounts returns a list of stored Accounts which exist inside the
|
||||
// provided Auth Method. The request must include the Auth Method id which
|
||||
// contains the Accounts being listed. If missing or malformed an error
|
||||
// is returned.
|
||||
ListAccounts(ctx context.Context, in *ListAccountsRequest, opts ...grpc.CallOption) (*ListAccountsResponse, error)
|
||||
// CreateAccount creates and stores an Account in boundary. The provided
|
||||
// request must include the Auth Method ID in which the Account will be
|
||||
// created. If the Auth Method ID is missing, malformed, or references a non
|
||||
// existing resource an error is returned. If a name or login_name is
|
||||
// provided that is in use in another Account in the same Auth Method an
|
||||
// error is returned.
|
||||
CreateAccount(ctx context.Context, in *CreateAccountRequest, opts ...grpc.CallOption) (*CreateAccountResponse, error)
|
||||
// UpdateAccount updates an existing Account in boundary. The provided Account
|
||||
// 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
|
||||
// Account. An error is returned if the Account id is missing or references a
|
||||
// non-existing resource. An error is also returned if the request attempts
|
||||
// to update the name or login_name to one that is already in use in the
|
||||
// containing Auth Method.
|
||||
UpdateAccount(ctx context.Context, in *UpdateAccountRequest, opts ...grpc.CallOption) (*UpdateAccountResponse, error)
|
||||
// DeleteAccount removes an Account from Boundary. If the provided Account Id
|
||||
// is malformed or not provided an error is returned.
|
||||
DeleteAccount(ctx context.Context, in *DeleteAccountRequest, opts ...grpc.CallOption) (*DeleteAccountResponse, error)
|
||||
// SetPassword sets the Account's password to the one provided in the
|
||||
// request. This method is intended for administration purpose and as such
|
||||
// does not require the old password.
|
||||
SetPassword(ctx context.Context, in *SetPasswordRequest, opts ...grpc.CallOption) (*SetPasswordResponse, error)
|
||||
// ChangePassword changes the Account's password to the one provided in the
|
||||
// request. This method is intended for end users and requires the existing
|
||||
// password to be provided for authentication purposes.
|
||||
ChangePassword(ctx context.Context, in *ChangePasswordRequest, opts ...grpc.CallOption) (*ChangePasswordResponse, error)
|
||||
}
|
||||
|
||||
type accountServiceClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewAccountServiceClient(cc grpc.ClientConnInterface) AccountServiceClient {
|
||||
return &accountServiceClient{cc}
|
||||
}
|
||||
|
||||
func (c *accountServiceClient) GetAccount(ctx context.Context, in *GetAccountRequest, opts ...grpc.CallOption) (*GetAccountResponse, error) {
|
||||
out := new(GetAccountResponse)
|
||||
err := c.cc.Invoke(ctx, "/controller.api.services.v1.AccountService/GetAccount", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *accountServiceClient) ListAccounts(ctx context.Context, in *ListAccountsRequest, opts ...grpc.CallOption) (*ListAccountsResponse, error) {
|
||||
out := new(ListAccountsResponse)
|
||||
err := c.cc.Invoke(ctx, "/controller.api.services.v1.AccountService/ListAccounts", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *accountServiceClient) CreateAccount(ctx context.Context, in *CreateAccountRequest, opts ...grpc.CallOption) (*CreateAccountResponse, error) {
|
||||
out := new(CreateAccountResponse)
|
||||
err := c.cc.Invoke(ctx, "/controller.api.services.v1.AccountService/CreateAccount", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *accountServiceClient) UpdateAccount(ctx context.Context, in *UpdateAccountRequest, opts ...grpc.CallOption) (*UpdateAccountResponse, error) {
|
||||
out := new(UpdateAccountResponse)
|
||||
err := c.cc.Invoke(ctx, "/controller.api.services.v1.AccountService/UpdateAccount", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *accountServiceClient) DeleteAccount(ctx context.Context, in *DeleteAccountRequest, opts ...grpc.CallOption) (*DeleteAccountResponse, error) {
|
||||
out := new(DeleteAccountResponse)
|
||||
err := c.cc.Invoke(ctx, "/controller.api.services.v1.AccountService/DeleteAccount", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *accountServiceClient) SetPassword(ctx context.Context, in *SetPasswordRequest, opts ...grpc.CallOption) (*SetPasswordResponse, error) {
|
||||
out := new(SetPasswordResponse)
|
||||
err := c.cc.Invoke(ctx, "/controller.api.services.v1.AccountService/SetPassword", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *accountServiceClient) ChangePassword(ctx context.Context, in *ChangePasswordRequest, opts ...grpc.CallOption) (*ChangePasswordResponse, error) {
|
||||
out := new(ChangePasswordResponse)
|
||||
err := c.cc.Invoke(ctx, "/controller.api.services.v1.AccountService/ChangePassword", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// AccountServiceServer is the server API for AccountService service.
|
||||
type AccountServiceServer interface {
|
||||
// GetAccount returns a stored Account if present. The provided request must
|
||||
// include the id for the Account be retrieved. If missing, malformed or
|
||||
// referencing a non existing Account an error is returned.
|
||||
GetAccount(context.Context, *GetAccountRequest) (*GetAccountResponse, error)
|
||||
// ListAccounts returns a list of stored Accounts which exist inside the
|
||||
// provided Auth Method. The request must include the Auth Method id which
|
||||
// contains the Accounts being listed. If missing or malformed an error
|
||||
// is returned.
|
||||
ListAccounts(context.Context, *ListAccountsRequest) (*ListAccountsResponse, error)
|
||||
// CreateAccount creates and stores an Account in boundary. The provided
|
||||
// request must include the Auth Method ID in which the Account will be
|
||||
// created. If the Auth Method ID is missing, malformed, or references a non
|
||||
// existing resource an error is returned. If a name or login_name is
|
||||
// provided that is in use in another Account in the same Auth Method an
|
||||
// error is returned.
|
||||
CreateAccount(context.Context, *CreateAccountRequest) (*CreateAccountResponse, error)
|
||||
// UpdateAccount updates an existing Account in boundary. The provided Account
|
||||
// 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
|
||||
// Account. An error is returned if the Account id is missing or references a
|
||||
// non-existing resource. An error is also returned if the request attempts
|
||||
// to update the name or login_name to one that is already in use in the
|
||||
// containing Auth Method.
|
||||
UpdateAccount(context.Context, *UpdateAccountRequest) (*UpdateAccountResponse, error)
|
||||
// DeleteAccount removes an Account from Boundary. If the provided Account Id
|
||||
// is malformed or not provided an error is returned.
|
||||
DeleteAccount(context.Context, *DeleteAccountRequest) (*DeleteAccountResponse, error)
|
||||
// SetPassword sets the Account's password to the one provided in the
|
||||
// request. This method is intended for administration purpose and as such
|
||||
// does not require the old password.
|
||||
SetPassword(context.Context, *SetPasswordRequest) (*SetPasswordResponse, error)
|
||||
// ChangePassword changes the Account's password to the one provided in the
|
||||
// request. This method is intended for end users and requires the existing
|
||||
// password to be provided for authentication purposes.
|
||||
ChangePassword(context.Context, *ChangePasswordRequest) (*ChangePasswordResponse, error)
|
||||
}
|
||||
|
||||
// UnimplementedAccountServiceServer can be embedded to have forward compatible implementations.
|
||||
type UnimplementedAccountServiceServer struct {
|
||||
}
|
||||
|
||||
func (*UnimplementedAccountServiceServer) GetAccount(context.Context, *GetAccountRequest) (*GetAccountResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetAccount not implemented")
|
||||
}
|
||||
func (*UnimplementedAccountServiceServer) ListAccounts(context.Context, *ListAccountsRequest) (*ListAccountsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ListAccounts not implemented")
|
||||
}
|
||||
func (*UnimplementedAccountServiceServer) CreateAccount(context.Context, *CreateAccountRequest) (*CreateAccountResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CreateAccount not implemented")
|
||||
}
|
||||
func (*UnimplementedAccountServiceServer) UpdateAccount(context.Context, *UpdateAccountRequest) (*UpdateAccountResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method UpdateAccount not implemented")
|
||||
}
|
||||
func (*UnimplementedAccountServiceServer) DeleteAccount(context.Context, *DeleteAccountRequest) (*DeleteAccountResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method DeleteAccount not implemented")
|
||||
}
|
||||
func (*UnimplementedAccountServiceServer) SetPassword(context.Context, *SetPasswordRequest) (*SetPasswordResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method SetPassword not implemented")
|
||||
}
|
||||
func (*UnimplementedAccountServiceServer) ChangePassword(context.Context, *ChangePasswordRequest) (*ChangePasswordResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ChangePassword not implemented")
|
||||
}
|
||||
|
||||
func RegisterAccountServiceServer(s *grpc.Server, srv AccountServiceServer) {
|
||||
s.RegisterService(&_AccountService_serviceDesc, srv)
|
||||
}
|
||||
|
||||
func _AccountService_GetAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetAccountRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(AccountServiceServer).GetAccount(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/controller.api.services.v1.AccountService/GetAccount",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AccountServiceServer).GetAccount(ctx, req.(*GetAccountRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _AccountService_ListAccounts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ListAccountsRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(AccountServiceServer).ListAccounts(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/controller.api.services.v1.AccountService/ListAccounts",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AccountServiceServer).ListAccounts(ctx, req.(*ListAccountsRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _AccountService_CreateAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(CreateAccountRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(AccountServiceServer).CreateAccount(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/controller.api.services.v1.AccountService/CreateAccount",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AccountServiceServer).CreateAccount(ctx, req.(*CreateAccountRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _AccountService_UpdateAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(UpdateAccountRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(AccountServiceServer).UpdateAccount(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/controller.api.services.v1.AccountService/UpdateAccount",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AccountServiceServer).UpdateAccount(ctx, req.(*UpdateAccountRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _AccountService_DeleteAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(DeleteAccountRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(AccountServiceServer).DeleteAccount(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/controller.api.services.v1.AccountService/DeleteAccount",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AccountServiceServer).DeleteAccount(ctx, req.(*DeleteAccountRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _AccountService_SetPassword_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(SetPasswordRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(AccountServiceServer).SetPassword(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/controller.api.services.v1.AccountService/SetPassword",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AccountServiceServer).SetPassword(ctx, req.(*SetPasswordRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _AccountService_ChangePassword_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ChangePasswordRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(AccountServiceServer).ChangePassword(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/controller.api.services.v1.AccountService/ChangePassword",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AccountServiceServer).ChangePassword(ctx, req.(*ChangePasswordRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
var _AccountService_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "controller.api.services.v1.AccountService",
|
||||
HandlerType: (*AccountServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "GetAccount",
|
||||
Handler: _AccountService_GetAccount_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ListAccounts",
|
||||
Handler: _AccountService_ListAccounts_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "CreateAccount",
|
||||
Handler: _AccountService_CreateAccount_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "UpdateAccount",
|
||||
Handler: _AccountService_UpdateAccount_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "DeleteAccount",
|
||||
Handler: _AccountService_DeleteAccount_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "SetPassword",
|
||||
Handler: _AccountService_SetPassword_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ChangePassword",
|
||||
Handler: _AccountService_ChangePassword_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "controller/api/services/v1/account_service.proto",
|
||||
}
|
||||
@ -0,0 +1,272 @@
|
||||
// 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.
|
||||
const _ = grpc.SupportPackageIsVersion6
|
||||
|
||||
// AuthMethodServiceClient is the client API for AuthMethodService 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 AuthMethodServiceClient interface {
|
||||
// GetAuthMethod returns a stored Auth Method if present. The provided request
|
||||
// must include the Auth Method id. If missing, malformed or referencing a
|
||||
// non existing resource an error is returned.
|
||||
GetAuthMethod(ctx context.Context, in *GetAuthMethodRequest, opts ...grpc.CallOption) (*GetAuthMethodResponse, error)
|
||||
// ListAuthMethods returns a list of stored Auth Methods which are in the
|
||||
// provided scope. The request must include the scope id and if missing,
|
||||
// malformed, or referencing a non existing scope, an error is returned.
|
||||
ListAuthMethods(ctx context.Context, in *ListAuthMethodsRequest, opts ...grpc.CallOption) (*ListAuthMethodsResponse, error)
|
||||
// CreateAuthMethod creates and stores an Auth Method in boundary. The
|
||||
// provided request must include the scope in which the Auth Method will be
|
||||
// created. If the scope id is missing, malformed or referencing a
|
||||
// non existing resource an error is returned. If a name is provided that is
|
||||
// in use in another Auth Method in the same scope, an error is returned.
|
||||
CreateAuthMethod(ctx context.Context, in *CreateAuthMethodRequest, opts ...grpc.CallOption) (*CreateAuthMethodResponse, error)
|
||||
// UpdateAuthMethod updates an existing Auth Method in boundary. The provided
|
||||
// Auth Method 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 user. An error is returned if the Auth Method 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 Auth Method in the parent scope.
|
||||
UpdateAuthMethod(ctx context.Context, in *UpdateAuthMethodRequest, opts ...grpc.CallOption) (*UpdateAuthMethodResponse, error)
|
||||
// DeleteAuthMethod removes an Auth Method from Boundary. If the Auth Method id
|
||||
// is malformed or not provided an error is returned.
|
||||
DeleteAuthMethod(ctx context.Context, in *DeleteAuthMethodRequest, opts ...grpc.CallOption) (*DeleteAuthMethodResponse, error)
|
||||
}
|
||||
|
||||
type authMethodServiceClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewAuthMethodServiceClient(cc grpc.ClientConnInterface) AuthMethodServiceClient {
|
||||
return &authMethodServiceClient{cc}
|
||||
}
|
||||
|
||||
func (c *authMethodServiceClient) GetAuthMethod(ctx context.Context, in *GetAuthMethodRequest, opts ...grpc.CallOption) (*GetAuthMethodResponse, error) {
|
||||
out := new(GetAuthMethodResponse)
|
||||
err := c.cc.Invoke(ctx, "/controller.api.services.v1.AuthMethodService/GetAuthMethod", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *authMethodServiceClient) ListAuthMethods(ctx context.Context, in *ListAuthMethodsRequest, opts ...grpc.CallOption) (*ListAuthMethodsResponse, error) {
|
||||
out := new(ListAuthMethodsResponse)
|
||||
err := c.cc.Invoke(ctx, "/controller.api.services.v1.AuthMethodService/ListAuthMethods", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *authMethodServiceClient) CreateAuthMethod(ctx context.Context, in *CreateAuthMethodRequest, opts ...grpc.CallOption) (*CreateAuthMethodResponse, error) {
|
||||
out := new(CreateAuthMethodResponse)
|
||||
err := c.cc.Invoke(ctx, "/controller.api.services.v1.AuthMethodService/CreateAuthMethod", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *authMethodServiceClient) UpdateAuthMethod(ctx context.Context, in *UpdateAuthMethodRequest, opts ...grpc.CallOption) (*UpdateAuthMethodResponse, error) {
|
||||
out := new(UpdateAuthMethodResponse)
|
||||
err := c.cc.Invoke(ctx, "/controller.api.services.v1.AuthMethodService/UpdateAuthMethod", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *authMethodServiceClient) DeleteAuthMethod(ctx context.Context, in *DeleteAuthMethodRequest, opts ...grpc.CallOption) (*DeleteAuthMethodResponse, error) {
|
||||
out := new(DeleteAuthMethodResponse)
|
||||
err := c.cc.Invoke(ctx, "/controller.api.services.v1.AuthMethodService/DeleteAuthMethod", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// AuthMethodServiceServer is the server API for AuthMethodService service.
|
||||
type AuthMethodServiceServer interface {
|
||||
// GetAuthMethod returns a stored Auth Method if present. The provided request
|
||||
// must include the Auth Method id. If missing, malformed or referencing a
|
||||
// non existing resource an error is returned.
|
||||
GetAuthMethod(context.Context, *GetAuthMethodRequest) (*GetAuthMethodResponse, error)
|
||||
// ListAuthMethods returns a list of stored Auth Methods which are in the
|
||||
// provided scope. The request must include the scope id and if missing,
|
||||
// malformed, or referencing a non existing scope, an error is returned.
|
||||
ListAuthMethods(context.Context, *ListAuthMethodsRequest) (*ListAuthMethodsResponse, error)
|
||||
// CreateAuthMethod creates and stores an Auth Method in boundary. The
|
||||
// provided request must include the scope in which the Auth Method will be
|
||||
// created. If the scope id is missing, malformed or referencing a
|
||||
// non existing resource an error is returned. If a name is provided that is
|
||||
// in use in another Auth Method in the same scope, an error is returned.
|
||||
CreateAuthMethod(context.Context, *CreateAuthMethodRequest) (*CreateAuthMethodResponse, error)
|
||||
// UpdateAuthMethod updates an existing Auth Method in boundary. The provided
|
||||
// Auth Method 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 user. An error is returned if the Auth Method 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 Auth Method in the parent scope.
|
||||
UpdateAuthMethod(context.Context, *UpdateAuthMethodRequest) (*UpdateAuthMethodResponse, error)
|
||||
// DeleteAuthMethod removes an Auth Method from Boundary. If the Auth Method id
|
||||
// is malformed or not provided an error is returned.
|
||||
DeleteAuthMethod(context.Context, *DeleteAuthMethodRequest) (*DeleteAuthMethodResponse, error)
|
||||
}
|
||||
|
||||
// UnimplementedAuthMethodServiceServer can be embedded to have forward compatible implementations.
|
||||
type UnimplementedAuthMethodServiceServer struct {
|
||||
}
|
||||
|
||||
func (*UnimplementedAuthMethodServiceServer) GetAuthMethod(context.Context, *GetAuthMethodRequest) (*GetAuthMethodResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetAuthMethod not implemented")
|
||||
}
|
||||
func (*UnimplementedAuthMethodServiceServer) ListAuthMethods(context.Context, *ListAuthMethodsRequest) (*ListAuthMethodsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ListAuthMethods not implemented")
|
||||
}
|
||||
func (*UnimplementedAuthMethodServiceServer) CreateAuthMethod(context.Context, *CreateAuthMethodRequest) (*CreateAuthMethodResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CreateAuthMethod not implemented")
|
||||
}
|
||||
func (*UnimplementedAuthMethodServiceServer) UpdateAuthMethod(context.Context, *UpdateAuthMethodRequest) (*UpdateAuthMethodResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method UpdateAuthMethod not implemented")
|
||||
}
|
||||
func (*UnimplementedAuthMethodServiceServer) DeleteAuthMethod(context.Context, *DeleteAuthMethodRequest) (*DeleteAuthMethodResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method DeleteAuthMethod not implemented")
|
||||
}
|
||||
|
||||
func RegisterAuthMethodServiceServer(s *grpc.Server, srv AuthMethodServiceServer) {
|
||||
s.RegisterService(&_AuthMethodService_serviceDesc, srv)
|
||||
}
|
||||
|
||||
func _AuthMethodService_GetAuthMethod_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetAuthMethodRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(AuthMethodServiceServer).GetAuthMethod(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/controller.api.services.v1.AuthMethodService/GetAuthMethod",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AuthMethodServiceServer).GetAuthMethod(ctx, req.(*GetAuthMethodRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _AuthMethodService_ListAuthMethods_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ListAuthMethodsRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(AuthMethodServiceServer).ListAuthMethods(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/controller.api.services.v1.AuthMethodService/ListAuthMethods",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AuthMethodServiceServer).ListAuthMethods(ctx, req.(*ListAuthMethodsRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _AuthMethodService_CreateAuthMethod_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(CreateAuthMethodRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(AuthMethodServiceServer).CreateAuthMethod(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/controller.api.services.v1.AuthMethodService/CreateAuthMethod",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AuthMethodServiceServer).CreateAuthMethod(ctx, req.(*CreateAuthMethodRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _AuthMethodService_UpdateAuthMethod_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(UpdateAuthMethodRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(AuthMethodServiceServer).UpdateAuthMethod(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/controller.api.services.v1.AuthMethodService/UpdateAuthMethod",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AuthMethodServiceServer).UpdateAuthMethod(ctx, req.(*UpdateAuthMethodRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _AuthMethodService_DeleteAuthMethod_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(DeleteAuthMethodRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(AuthMethodServiceServer).DeleteAuthMethod(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/controller.api.services.v1.AuthMethodService/DeleteAuthMethod",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AuthMethodServiceServer).DeleteAuthMethod(ctx, req.(*DeleteAuthMethodRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
var _AuthMethodService_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "controller.api.services.v1.AuthMethodService",
|
||||
HandlerType: (*AuthMethodServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "GetAuthMethod",
|
||||
Handler: _AuthMethodService_GetAuthMethod_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ListAuthMethods",
|
||||
Handler: _AuthMethodService_ListAuthMethods_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "CreateAuthMethod",
|
||||
Handler: _AuthMethodService_CreateAuthMethod_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "UpdateAuthMethod",
|
||||
Handler: _AuthMethodService_UpdateAuthMethod_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "DeleteAuthMethod",
|
||||
Handler: _AuthMethodService_DeleteAuthMethod_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "controller/api/services/v1/auth_method_service.proto",
|
||||
}
|
||||
@ -0,0 +1,88 @@
|
||||
// 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.
|
||||
const _ = grpc.SupportPackageIsVersion6
|
||||
|
||||
// AuthenticationServiceClient is the client API for AuthenticationService 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 AuthenticationServiceClient interface {
|
||||
// Authenticate validates credentials provided and returns an Auth Token.
|
||||
Authenticate(ctx context.Context, in *AuthenticateRequest, opts ...grpc.CallOption) (*AuthenticateResponse, error)
|
||||
}
|
||||
|
||||
type authenticationServiceClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewAuthenticationServiceClient(cc grpc.ClientConnInterface) AuthenticationServiceClient {
|
||||
return &authenticationServiceClient{cc}
|
||||
}
|
||||
|
||||
func (c *authenticationServiceClient) Authenticate(ctx context.Context, in *AuthenticateRequest, opts ...grpc.CallOption) (*AuthenticateResponse, error) {
|
||||
out := new(AuthenticateResponse)
|
||||
err := c.cc.Invoke(ctx, "/controller.api.services.v1.AuthenticationService/Authenticate", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// AuthenticationServiceServer is the server API for AuthenticationService service.
|
||||
type AuthenticationServiceServer interface {
|
||||
// Authenticate validates credentials provided and returns an Auth Token.
|
||||
Authenticate(context.Context, *AuthenticateRequest) (*AuthenticateResponse, error)
|
||||
}
|
||||
|
||||
// UnimplementedAuthenticationServiceServer can be embedded to have forward compatible implementations.
|
||||
type UnimplementedAuthenticationServiceServer struct {
|
||||
}
|
||||
|
||||
func (*UnimplementedAuthenticationServiceServer) Authenticate(context.Context, *AuthenticateRequest) (*AuthenticateResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Authenticate not implemented")
|
||||
}
|
||||
|
||||
func RegisterAuthenticationServiceServer(s *grpc.Server, srv AuthenticationServiceServer) {
|
||||
s.RegisterService(&_AuthenticationService_serviceDesc, srv)
|
||||
}
|
||||
|
||||
func _AuthenticationService_Authenticate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(AuthenticateRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(AuthenticationServiceServer).Authenticate(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/controller.api.services.v1.AuthenticationService/Authenticate",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AuthenticationServiceServer).Authenticate(ctx, req.(*AuthenticateRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
var _AuthenticationService_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "controller.api.services.v1.AuthenticationService",
|
||||
HandlerType: (*AuthenticationServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "Authenticate",
|
||||
Handler: _AuthenticationService_Authenticate_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "controller/api/services/v1/authenticate_service.proto",
|
||||
}
|
||||
@ -0,0 +1,176 @@
|
||||
// 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.
|
||||
const _ = grpc.SupportPackageIsVersion6
|
||||
|
||||
// AuthTokenServiceClient is the client API for AuthTokenService 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 AuthTokenServiceClient interface {
|
||||
// GetAuthToken returns a stored Auth Token if present. The provided request
|
||||
// must include the Auth Token id and if it is missing, malformed or
|
||||
// referencing a non existing resource an error is returned.
|
||||
GetAuthToken(ctx context.Context, in *GetAuthTokenRequest, opts ...grpc.CallOption) (*GetAuthTokenResponse, error)
|
||||
// ListAuthTokens returns a list of stored Auth Tokens which exist inside
|
||||
// the provided scope. The request must include the scope ids for
|
||||
// the Auth Tokens being listed. If the scope id is missing, malformed, or
|
||||
// referencing a non existing resource, an error is returned.
|
||||
ListAuthTokens(ctx context.Context, in *ListAuthTokensRequest, opts ...grpc.CallOption) (*ListAuthTokensResponse, error)
|
||||
// DeleteAuthToken removes a Auth Token from Boundary. If the provided
|
||||
// Auth Token id is malformed or not provided an error is returned.
|
||||
DeleteAuthToken(ctx context.Context, in *DeleteAuthTokenRequest, opts ...grpc.CallOption) (*DeleteAuthTokenResponse, error)
|
||||
}
|
||||
|
||||
type authTokenServiceClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewAuthTokenServiceClient(cc grpc.ClientConnInterface) AuthTokenServiceClient {
|
||||
return &authTokenServiceClient{cc}
|
||||
}
|
||||
|
||||
func (c *authTokenServiceClient) GetAuthToken(ctx context.Context, in *GetAuthTokenRequest, opts ...grpc.CallOption) (*GetAuthTokenResponse, error) {
|
||||
out := new(GetAuthTokenResponse)
|
||||
err := c.cc.Invoke(ctx, "/controller.api.services.v1.AuthTokenService/GetAuthToken", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *authTokenServiceClient) ListAuthTokens(ctx context.Context, in *ListAuthTokensRequest, opts ...grpc.CallOption) (*ListAuthTokensResponse, error) {
|
||||
out := new(ListAuthTokensResponse)
|
||||
err := c.cc.Invoke(ctx, "/controller.api.services.v1.AuthTokenService/ListAuthTokens", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *authTokenServiceClient) DeleteAuthToken(ctx context.Context, in *DeleteAuthTokenRequest, opts ...grpc.CallOption) (*DeleteAuthTokenResponse, error) {
|
||||
out := new(DeleteAuthTokenResponse)
|
||||
err := c.cc.Invoke(ctx, "/controller.api.services.v1.AuthTokenService/DeleteAuthToken", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// AuthTokenServiceServer is the server API for AuthTokenService service.
|
||||
type AuthTokenServiceServer interface {
|
||||
// GetAuthToken returns a stored Auth Token if present. The provided request
|
||||
// must include the Auth Token id and if it is missing, malformed or
|
||||
// referencing a non existing resource an error is returned.
|
||||
GetAuthToken(context.Context, *GetAuthTokenRequest) (*GetAuthTokenResponse, error)
|
||||
// ListAuthTokens returns a list of stored Auth Tokens which exist inside
|
||||
// the provided scope. The request must include the scope ids for
|
||||
// the Auth Tokens being listed. If the scope id is missing, malformed, or
|
||||
// referencing a non existing resource, an error is returned.
|
||||
ListAuthTokens(context.Context, *ListAuthTokensRequest) (*ListAuthTokensResponse, error)
|
||||
// DeleteAuthToken removes a Auth Token from Boundary. If the provided
|
||||
// Auth Token id is malformed or not provided an error is returned.
|
||||
DeleteAuthToken(context.Context, *DeleteAuthTokenRequest) (*DeleteAuthTokenResponse, error)
|
||||
}
|
||||
|
||||
// UnimplementedAuthTokenServiceServer can be embedded to have forward compatible implementations.
|
||||
type UnimplementedAuthTokenServiceServer struct {
|
||||
}
|
||||
|
||||
func (*UnimplementedAuthTokenServiceServer) GetAuthToken(context.Context, *GetAuthTokenRequest) (*GetAuthTokenResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetAuthToken not implemented")
|
||||
}
|
||||
func (*UnimplementedAuthTokenServiceServer) ListAuthTokens(context.Context, *ListAuthTokensRequest) (*ListAuthTokensResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ListAuthTokens not implemented")
|
||||
}
|
||||
func (*UnimplementedAuthTokenServiceServer) DeleteAuthToken(context.Context, *DeleteAuthTokenRequest) (*DeleteAuthTokenResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method DeleteAuthToken not implemented")
|
||||
}
|
||||
|
||||
func RegisterAuthTokenServiceServer(s *grpc.Server, srv AuthTokenServiceServer) {
|
||||
s.RegisterService(&_AuthTokenService_serviceDesc, srv)
|
||||
}
|
||||
|
||||
func _AuthTokenService_GetAuthToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetAuthTokenRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(AuthTokenServiceServer).GetAuthToken(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/controller.api.services.v1.AuthTokenService/GetAuthToken",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AuthTokenServiceServer).GetAuthToken(ctx, req.(*GetAuthTokenRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _AuthTokenService_ListAuthTokens_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ListAuthTokensRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(AuthTokenServiceServer).ListAuthTokens(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/controller.api.services.v1.AuthTokenService/ListAuthTokens",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AuthTokenServiceServer).ListAuthTokens(ctx, req.(*ListAuthTokensRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _AuthTokenService_DeleteAuthToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(DeleteAuthTokenRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(AuthTokenServiceServer).DeleteAuthToken(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/controller.api.services.v1.AuthTokenService/DeleteAuthToken",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AuthTokenServiceServer).DeleteAuthToken(ctx, req.(*DeleteAuthTokenRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
var _AuthTokenService_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "controller.api.services.v1.AuthTokenService",
|
||||
HandlerType: (*AuthTokenServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "GetAuthToken",
|
||||
Handler: _AuthTokenService_GetAuthToken_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ListAuthTokens",
|
||||
Handler: _AuthTokenService_ListAuthTokens_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "DeleteAuthToken",
|
||||
Handler: _AuthTokenService_DeleteAuthToken_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "controller/api/services/v1/authtokens_service.proto",
|
||||
}
|
||||
@ -0,0 +1,408 @@
|
||||
// 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.
|
||||
const _ = grpc.SupportPackageIsVersion6
|
||||
|
||||
// GroupServiceClient is the client API for GroupService 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 GroupServiceClient interface {
|
||||
// GetGroup returns a stored Group if present. The provided request must
|
||||
// include the Group id and if it is missing, malformed or referencing a
|
||||
// non existing resource an error is returned.
|
||||
GetGroup(ctx context.Context, in *GetGroupRequest, opts ...grpc.CallOption) (*GetGroupResponse, error)
|
||||
// ListGroups returns a list of stored Groups which exist inside the
|
||||
// provided scope id. If that id is missing, malformed, or
|
||||
// references a non-existing scope, an error is returned.
|
||||
ListGroups(ctx context.Context, in *ListGroupsRequest, opts ...grpc.CallOption) (*ListGroupsResponse, error)
|
||||
// CreateGroup creates and stores a Group in boundary. The provided
|
||||
// request must include the scope ID in which the Group will be created.
|
||||
// If the scope ID is missing, malformed or references a non existing
|
||||
// resource, an error is returned. If a name is provided that is in
|
||||
// use in another Group in the same scope, an error is returned.
|
||||
CreateGroup(ctx context.Context, in *CreateGroupRequest, opts ...grpc.CallOption) (*CreateGroupResponse, error)
|
||||
// UpdateGroup updates an existing Group in boundary. The provided Group
|
||||
// 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
|
||||
// Group. An error is returned if the Group 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 used by another Group in the
|
||||
// same scope.
|
||||
UpdateGroup(ctx context.Context, in *UpdateGroupRequest, opts ...grpc.CallOption) (*UpdateGroupResponse, error)
|
||||
// DeleteGroup removes a Group from Boundary. If the provided Group
|
||||
// ID is malformed or not provided an error is returned.
|
||||
DeleteGroup(ctx context.Context, in *DeleteGroupRequest, opts ...grpc.CallOption) (*DeleteGroupResponse, error)
|
||||
// AddGroupMembers adds members to a Group. The provided request must include
|
||||
// the scope id and the Group id which the members will be added to.
|
||||
// An error is returned if any provided id is missing, malformed or
|
||||
// references a non-existing resource.
|
||||
AddGroupMembers(ctx context.Context, in *AddGroupMembersRequest, opts ...grpc.CallOption) (*AddGroupMembersResponse, error)
|
||||
// SetGroupMembers sets the Group's members. Any existing members on
|
||||
// the Group are deleted if they are not included in this request. The provided
|
||||
// request must include the Group id which the members will be set to.
|
||||
// An error is returned if any provided id is missing, malformed or
|
||||
// references a non-existing resource.
|
||||
SetGroupMembers(ctx context.Context, in *SetGroupMembersRequest, opts ...grpc.CallOption) (*SetGroupMembersResponse, error)
|
||||
// RemoveGroupMembers removes members from the specified Group.
|
||||
// The provided request must include the the Group id to which the members
|
||||
// will be set.
|
||||
// An error is returned if any provided id is missing, malformed or
|
||||
// references a non-existing resource.
|
||||
RemoveGroupMembers(ctx context.Context, in *RemoveGroupMembersRequest, opts ...grpc.CallOption) (*RemoveGroupMembersResponse, error)
|
||||
}
|
||||
|
||||
type groupServiceClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewGroupServiceClient(cc grpc.ClientConnInterface) GroupServiceClient {
|
||||
return &groupServiceClient{cc}
|
||||
}
|
||||
|
||||
func (c *groupServiceClient) GetGroup(ctx context.Context, in *GetGroupRequest, opts ...grpc.CallOption) (*GetGroupResponse, error) {
|
||||
out := new(GetGroupResponse)
|
||||
err := c.cc.Invoke(ctx, "/controller.api.services.v1.GroupService/GetGroup", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *groupServiceClient) ListGroups(ctx context.Context, in *ListGroupsRequest, opts ...grpc.CallOption) (*ListGroupsResponse, error) {
|
||||
out := new(ListGroupsResponse)
|
||||
err := c.cc.Invoke(ctx, "/controller.api.services.v1.GroupService/ListGroups", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *groupServiceClient) CreateGroup(ctx context.Context, in *CreateGroupRequest, opts ...grpc.CallOption) (*CreateGroupResponse, error) {
|
||||
out := new(CreateGroupResponse)
|
||||
err := c.cc.Invoke(ctx, "/controller.api.services.v1.GroupService/CreateGroup", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *groupServiceClient) UpdateGroup(ctx context.Context, in *UpdateGroupRequest, opts ...grpc.CallOption) (*UpdateGroupResponse, error) {
|
||||
out := new(UpdateGroupResponse)
|
||||
err := c.cc.Invoke(ctx, "/controller.api.services.v1.GroupService/UpdateGroup", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *groupServiceClient) DeleteGroup(ctx context.Context, in *DeleteGroupRequest, opts ...grpc.CallOption) (*DeleteGroupResponse, error) {
|
||||
out := new(DeleteGroupResponse)
|
||||
err := c.cc.Invoke(ctx, "/controller.api.services.v1.GroupService/DeleteGroup", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *groupServiceClient) AddGroupMembers(ctx context.Context, in *AddGroupMembersRequest, opts ...grpc.CallOption) (*AddGroupMembersResponse, error) {
|
||||
out := new(AddGroupMembersResponse)
|
||||
err := c.cc.Invoke(ctx, "/controller.api.services.v1.GroupService/AddGroupMembers", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *groupServiceClient) SetGroupMembers(ctx context.Context, in *SetGroupMembersRequest, opts ...grpc.CallOption) (*SetGroupMembersResponse, error) {
|
||||
out := new(SetGroupMembersResponse)
|
||||
err := c.cc.Invoke(ctx, "/controller.api.services.v1.GroupService/SetGroupMembers", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *groupServiceClient) RemoveGroupMembers(ctx context.Context, in *RemoveGroupMembersRequest, opts ...grpc.CallOption) (*RemoveGroupMembersResponse, error) {
|
||||
out := new(RemoveGroupMembersResponse)
|
||||
err := c.cc.Invoke(ctx, "/controller.api.services.v1.GroupService/RemoveGroupMembers", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// GroupServiceServer is the server API for GroupService service.
|
||||
type GroupServiceServer interface {
|
||||
// GetGroup returns a stored Group if present. The provided request must
|
||||
// include the Group id and if it is missing, malformed or referencing a
|
||||
// non existing resource an error is returned.
|
||||
GetGroup(context.Context, *GetGroupRequest) (*GetGroupResponse, error)
|
||||
// ListGroups returns a list of stored Groups which exist inside the
|
||||
// provided scope id. If that id is missing, malformed, or
|
||||
// references a non-existing scope, an error is returned.
|
||||
ListGroups(context.Context, *ListGroupsRequest) (*ListGroupsResponse, error)
|
||||
// CreateGroup creates and stores a Group in boundary. The provided
|
||||
// request must include the scope ID in which the Group will be created.
|
||||
// If the scope ID is missing, malformed or references a non existing
|
||||
// resource, an error is returned. If a name is provided that is in
|
||||
// use in another Group in the same scope, an error is returned.
|
||||
CreateGroup(context.Context, *CreateGroupRequest) (*CreateGroupResponse, error)
|
||||
// UpdateGroup updates an existing Group in boundary. The provided Group
|
||||
// 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
|
||||
// Group. An error is returned if the Group 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 used by another Group in the
|
||||
// same scope.
|
||||
UpdateGroup(context.Context, *UpdateGroupRequest) (*UpdateGroupResponse, error)
|
||||
// DeleteGroup removes a Group from Boundary. If the provided Group
|
||||
// ID is malformed or not provided an error is returned.
|
||||
DeleteGroup(context.Context, *DeleteGroupRequest) (*DeleteGroupResponse, error)
|
||||
// AddGroupMembers adds members to a Group. The provided request must include
|
||||
// the scope id and the Group id which the members will be added to.
|
||||
// An error is returned if any provided id is missing, malformed or
|
||||
// references a non-existing resource.
|
||||
AddGroupMembers(context.Context, *AddGroupMembersRequest) (*AddGroupMembersResponse, error)
|
||||
// SetGroupMembers sets the Group's members. Any existing members on
|
||||
// the Group are deleted if they are not included in this request. The provided
|
||||
// request must include the Group id which the members will be set to.
|
||||
// An error is returned if any provided id is missing, malformed or
|
||||
// references a non-existing resource.
|
||||
SetGroupMembers(context.Context, *SetGroupMembersRequest) (*SetGroupMembersResponse, error)
|
||||
// RemoveGroupMembers removes members from the specified Group.
|
||||
// The provided request must include the the Group id to which the members
|
||||
// will be set.
|
||||
// An error is returned if any provided id is missing, malformed or
|
||||
// references a non-existing resource.
|
||||
RemoveGroupMembers(context.Context, *RemoveGroupMembersRequest) (*RemoveGroupMembersResponse, error)
|
||||
}
|
||||
|
||||
// UnimplementedGroupServiceServer can be embedded to have forward compatible implementations.
|
||||
type UnimplementedGroupServiceServer struct {
|
||||
}
|
||||
|
||||
func (*UnimplementedGroupServiceServer) GetGroup(context.Context, *GetGroupRequest) (*GetGroupResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetGroup not implemented")
|
||||
}
|
||||
func (*UnimplementedGroupServiceServer) ListGroups(context.Context, *ListGroupsRequest) (*ListGroupsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ListGroups not implemented")
|
||||
}
|
||||
func (*UnimplementedGroupServiceServer) CreateGroup(context.Context, *CreateGroupRequest) (*CreateGroupResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CreateGroup not implemented")
|
||||
}
|
||||
func (*UnimplementedGroupServiceServer) UpdateGroup(context.Context, *UpdateGroupRequest) (*UpdateGroupResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method UpdateGroup not implemented")
|
||||
}
|
||||
func (*UnimplementedGroupServiceServer) DeleteGroup(context.Context, *DeleteGroupRequest) (*DeleteGroupResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method DeleteGroup not implemented")
|
||||
}
|
||||
func (*UnimplementedGroupServiceServer) AddGroupMembers(context.Context, *AddGroupMembersRequest) (*AddGroupMembersResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method AddGroupMembers not implemented")
|
||||
}
|
||||
func (*UnimplementedGroupServiceServer) SetGroupMembers(context.Context, *SetGroupMembersRequest) (*SetGroupMembersResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method SetGroupMembers not implemented")
|
||||
}
|
||||
func (*UnimplementedGroupServiceServer) RemoveGroupMembers(context.Context, *RemoveGroupMembersRequest) (*RemoveGroupMembersResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method RemoveGroupMembers not implemented")
|
||||
}
|
||||
|
||||
func RegisterGroupServiceServer(s *grpc.Server, srv GroupServiceServer) {
|
||||
s.RegisterService(&_GroupService_serviceDesc, srv)
|
||||
}
|
||||
|
||||
func _GroupService_GetGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetGroupRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(GroupServiceServer).GetGroup(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/controller.api.services.v1.GroupService/GetGroup",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(GroupServiceServer).GetGroup(ctx, req.(*GetGroupRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _GroupService_ListGroups_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ListGroupsRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(GroupServiceServer).ListGroups(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/controller.api.services.v1.GroupService/ListGroups",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(GroupServiceServer).ListGroups(ctx, req.(*ListGroupsRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _GroupService_CreateGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(CreateGroupRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(GroupServiceServer).CreateGroup(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/controller.api.services.v1.GroupService/CreateGroup",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(GroupServiceServer).CreateGroup(ctx, req.(*CreateGroupRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _GroupService_UpdateGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(UpdateGroupRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(GroupServiceServer).UpdateGroup(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/controller.api.services.v1.GroupService/UpdateGroup",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(GroupServiceServer).UpdateGroup(ctx, req.(*UpdateGroupRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _GroupService_DeleteGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(DeleteGroupRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(GroupServiceServer).DeleteGroup(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/controller.api.services.v1.GroupService/DeleteGroup",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(GroupServiceServer).DeleteGroup(ctx, req.(*DeleteGroupRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _GroupService_AddGroupMembers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(AddGroupMembersRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(GroupServiceServer).AddGroupMembers(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/controller.api.services.v1.GroupService/AddGroupMembers",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(GroupServiceServer).AddGroupMembers(ctx, req.(*AddGroupMembersRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _GroupService_SetGroupMembers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(SetGroupMembersRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(GroupServiceServer).SetGroupMembers(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/controller.api.services.v1.GroupService/SetGroupMembers",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(GroupServiceServer).SetGroupMembers(ctx, req.(*SetGroupMembersRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _GroupService_RemoveGroupMembers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(RemoveGroupMembersRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(GroupServiceServer).RemoveGroupMembers(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/controller.api.services.v1.GroupService/RemoveGroupMembers",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(GroupServiceServer).RemoveGroupMembers(ctx, req.(*RemoveGroupMembersRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
var _GroupService_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "controller.api.services.v1.GroupService",
|
||||
HandlerType: (*GroupServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "GetGroup",
|
||||
Handler: _GroupService_GetGroup_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ListGroups",
|
||||
Handler: _GroupService_ListGroups_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "CreateGroup",
|
||||
Handler: _GroupService_CreateGroup_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "UpdateGroup",
|
||||
Handler: _GroupService_UpdateGroup_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "DeleteGroup",
|
||||
Handler: _GroupService_DeleteGroup_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "AddGroupMembers",
|
||||
Handler: _GroupService_AddGroupMembers_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "SetGroupMembers",
|
||||
Handler: _GroupService_SetGroupMembers_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "RemoveGroupMembers",
|
||||
Handler: _GroupService_RemoveGroupMembers_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "controller/api/services/v1/group_service.proto",
|
||||
}
|
||||
@ -0,0 +1,272 @@
|
||||
// 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.
|
||||
const _ = grpc.SupportPackageIsVersion6
|
||||
|
||||
// HostCatalogServiceClient is the client API for HostCatalogService 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 HostCatalogServiceClient interface {
|
||||
// GetHostCatalog returns a stored Host Catalog if present. The provided
|
||||
// request must include the Catalog IDs for the Host Catalog being retrieved.
|
||||
// If missing, malformed, or referencing a non-existing resource an error is
|
||||
// returned.
|
||||
GetHostCatalog(ctx context.Context, in *GetHostCatalogRequest, opts ...grpc.CallOption) (*GetHostCatalogResponse, error)
|
||||
// ListHostCatalogs returns a list of stored Host Catalogs which exist inside
|
||||
// the scope referenced in the request. The request must include the scope
|
||||
// ID and if it is missing, malformed, or references a non-existing resource
|
||||
// an error is returned.
|
||||
ListHostCatalogs(ctx context.Context, in *ListHostCatalogsRequest, opts ...grpc.CallOption) (*ListHostCatalogsResponse, error)
|
||||
// CreateHostCatalog creates and stores a Host Catalog in boundary. The
|
||||
// provided request must include the scope ID in which the Catalog will be
|
||||
// created and the Catalog type to be created. If any of these required fields
|
||||
// are missing, malformed, or reference a non-existing parent resource an
|
||||
// error is returned.
|
||||
CreateHostCatalog(ctx context.Context, in *CreateHostCatalogRequest, opts ...grpc.CallOption) (*CreateHostCatalogResponse, error)
|
||||
// UpdateHostCatalog updates an existing Host Catalog in Boundary. The
|
||||
// provided Host Catalog must not have any read only fields set. The update
|
||||
// mask must be provided and include at least 1 mutable field. To unset a
|
||||
// field's value include that field name in the update mask and don't set the
|
||||
// field in the Host Catalog.
|
||||
UpdateHostCatalog(ctx context.Context, in *UpdateHostCatalogRequest, opts ...grpc.CallOption) (*UpdateHostCatalogResponse, error)
|
||||
// DeleteHostCatalog removes a Host Catalog and all associated Hosts and Host
|
||||
// sets from Boundary. If the provided Host Catalog IDs is malformed or not
|
||||
// provided DeleteHostCatalog returns an error.
|
||||
DeleteHostCatalog(ctx context.Context, in *DeleteHostCatalogRequest, opts ...grpc.CallOption) (*DeleteHostCatalogResponse, error)
|
||||
}
|
||||
|
||||
type hostCatalogServiceClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewHostCatalogServiceClient(cc grpc.ClientConnInterface) HostCatalogServiceClient {
|
||||
return &hostCatalogServiceClient{cc}
|
||||
}
|
||||
|
||||
func (c *hostCatalogServiceClient) GetHostCatalog(ctx context.Context, in *GetHostCatalogRequest, opts ...grpc.CallOption) (*GetHostCatalogResponse, error) {
|
||||
out := new(GetHostCatalogResponse)
|
||||
err := c.cc.Invoke(ctx, "/controller.api.services.v1.HostCatalogService/GetHostCatalog", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *hostCatalogServiceClient) ListHostCatalogs(ctx context.Context, in *ListHostCatalogsRequest, opts ...grpc.CallOption) (*ListHostCatalogsResponse, error) {
|
||||
out := new(ListHostCatalogsResponse)
|
||||
err := c.cc.Invoke(ctx, "/controller.api.services.v1.HostCatalogService/ListHostCatalogs", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *hostCatalogServiceClient) CreateHostCatalog(ctx context.Context, in *CreateHostCatalogRequest, opts ...grpc.CallOption) (*CreateHostCatalogResponse, error) {
|
||||
out := new(CreateHostCatalogResponse)
|
||||
err := c.cc.Invoke(ctx, "/controller.api.services.v1.HostCatalogService/CreateHostCatalog", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *hostCatalogServiceClient) UpdateHostCatalog(ctx context.Context, in *UpdateHostCatalogRequest, opts ...grpc.CallOption) (*UpdateHostCatalogResponse, error) {
|
||||
out := new(UpdateHostCatalogResponse)
|
||||
err := c.cc.Invoke(ctx, "/controller.api.services.v1.HostCatalogService/UpdateHostCatalog", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *hostCatalogServiceClient) DeleteHostCatalog(ctx context.Context, in *DeleteHostCatalogRequest, opts ...grpc.CallOption) (*DeleteHostCatalogResponse, error) {
|
||||
out := new(DeleteHostCatalogResponse)
|
||||
err := c.cc.Invoke(ctx, "/controller.api.services.v1.HostCatalogService/DeleteHostCatalog", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// HostCatalogServiceServer is the server API for HostCatalogService service.
|
||||
type HostCatalogServiceServer interface {
|
||||
// GetHostCatalog returns a stored Host Catalog if present. The provided
|
||||
// request must include the Catalog IDs for the Host Catalog being retrieved.
|
||||
// If missing, malformed, or referencing a non-existing resource an error is
|
||||
// returned.
|
||||
GetHostCatalog(context.Context, *GetHostCatalogRequest) (*GetHostCatalogResponse, error)
|
||||
// ListHostCatalogs returns a list of stored Host Catalogs which exist inside
|
||||
// the scope referenced in the request. The request must include the scope
|
||||
// ID and if it is missing, malformed, or references a non-existing resource
|
||||
// an error is returned.
|
||||
ListHostCatalogs(context.Context, *ListHostCatalogsRequest) (*ListHostCatalogsResponse, error)
|
||||
// CreateHostCatalog creates and stores a Host Catalog in boundary. The
|
||||
// provided request must include the scope ID in which the Catalog will be
|
||||
// created and the Catalog type to be created. If any of these required fields
|
||||
// are missing, malformed, or reference a non-existing parent resource an
|
||||
// error is returned.
|
||||
CreateHostCatalog(context.Context, *CreateHostCatalogRequest) (*CreateHostCatalogResponse, error)
|
||||
// UpdateHostCatalog updates an existing Host Catalog in Boundary. The
|
||||
// provided Host Catalog must not have any read only fields set. The update
|
||||
// mask must be provided and include at least 1 mutable field. To unset a
|
||||
// field's value include that field name in the update mask and don't set the
|
||||
// field in the Host Catalog.
|
||||
UpdateHostCatalog(context.Context, *UpdateHostCatalogRequest) (*UpdateHostCatalogResponse, error)
|
||||
// DeleteHostCatalog removes a Host Catalog and all associated Hosts and Host
|
||||
// sets from Boundary. If the provided Host Catalog IDs is malformed or not
|
||||
// provided DeleteHostCatalog returns an error.
|
||||
DeleteHostCatalog(context.Context, *DeleteHostCatalogRequest) (*DeleteHostCatalogResponse, error)
|
||||
}
|
||||
|
||||
// UnimplementedHostCatalogServiceServer can be embedded to have forward compatible implementations.
|
||||
type UnimplementedHostCatalogServiceServer struct {
|
||||
}
|
||||
|
||||
func (*UnimplementedHostCatalogServiceServer) GetHostCatalog(context.Context, *GetHostCatalogRequest) (*GetHostCatalogResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetHostCatalog not implemented")
|
||||
}
|
||||
func (*UnimplementedHostCatalogServiceServer) ListHostCatalogs(context.Context, *ListHostCatalogsRequest) (*ListHostCatalogsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ListHostCatalogs not implemented")
|
||||
}
|
||||
func (*UnimplementedHostCatalogServiceServer) CreateHostCatalog(context.Context, *CreateHostCatalogRequest) (*CreateHostCatalogResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CreateHostCatalog not implemented")
|
||||
}
|
||||
func (*UnimplementedHostCatalogServiceServer) UpdateHostCatalog(context.Context, *UpdateHostCatalogRequest) (*UpdateHostCatalogResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method UpdateHostCatalog not implemented")
|
||||
}
|
||||
func (*UnimplementedHostCatalogServiceServer) DeleteHostCatalog(context.Context, *DeleteHostCatalogRequest) (*DeleteHostCatalogResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method DeleteHostCatalog not implemented")
|
||||
}
|
||||
|
||||
func RegisterHostCatalogServiceServer(s *grpc.Server, srv HostCatalogServiceServer) {
|
||||
s.RegisterService(&_HostCatalogService_serviceDesc, srv)
|
||||
}
|
||||
|
||||
func _HostCatalogService_GetHostCatalog_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetHostCatalogRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(HostCatalogServiceServer).GetHostCatalog(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/controller.api.services.v1.HostCatalogService/GetHostCatalog",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(HostCatalogServiceServer).GetHostCatalog(ctx, req.(*GetHostCatalogRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _HostCatalogService_ListHostCatalogs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ListHostCatalogsRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(HostCatalogServiceServer).ListHostCatalogs(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/controller.api.services.v1.HostCatalogService/ListHostCatalogs",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(HostCatalogServiceServer).ListHostCatalogs(ctx, req.(*ListHostCatalogsRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _HostCatalogService_CreateHostCatalog_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(CreateHostCatalogRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(HostCatalogServiceServer).CreateHostCatalog(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/controller.api.services.v1.HostCatalogService/CreateHostCatalog",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(HostCatalogServiceServer).CreateHostCatalog(ctx, req.(*CreateHostCatalogRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _HostCatalogService_UpdateHostCatalog_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(UpdateHostCatalogRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(HostCatalogServiceServer).UpdateHostCatalog(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/controller.api.services.v1.HostCatalogService/UpdateHostCatalog",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(HostCatalogServiceServer).UpdateHostCatalog(ctx, req.(*UpdateHostCatalogRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _HostCatalogService_DeleteHostCatalog_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(DeleteHostCatalogRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(HostCatalogServiceServer).DeleteHostCatalog(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/controller.api.services.v1.HostCatalogService/DeleteHostCatalog",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(HostCatalogServiceServer).DeleteHostCatalog(ctx, req.(*DeleteHostCatalogRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
var _HostCatalogService_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "controller.api.services.v1.HostCatalogService",
|
||||
HandlerType: (*HostCatalogServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "GetHostCatalog",
|
||||
Handler: _HostCatalogService_GetHostCatalog_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ListHostCatalogs",
|
||||
Handler: _HostCatalogService_ListHostCatalogs_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "CreateHostCatalog",
|
||||
Handler: _HostCatalogService_CreateHostCatalog_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "UpdateHostCatalog",
|
||||
Handler: _HostCatalogService_UpdateHostCatalog_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "DeleteHostCatalog",
|
||||
Handler: _HostCatalogService_DeleteHostCatalog_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "controller/api/services/v1/host_catalog_service.proto",
|
||||
}
|
||||
@ -0,0 +1,276 @@
|
||||
// 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.
|
||||
const _ = grpc.SupportPackageIsVersion6
|
||||
|
||||
// HostServiceClient is the client API for HostService 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 HostServiceClient interface {
|
||||
// GetHost returns a stored Host if present. The provided request
|
||||
// must include the host ID for the resource being retrieved. If the ID is
|
||||
// missing, malformed or referencing anon existing resource an error is
|
||||
// returned.
|
||||
GetHost(ctx context.Context, in *GetHostRequest, opts ...grpc.CallOption) (*GetHostResponse, error)
|
||||
// ListHosts returns a list of stored hosts which exist inside the provided
|
||||
// Host Catalog. The request must include the Host Catalog id containing the
|
||||
// Hosts being listed. If the id is missing, malformed, or reference a
|
||||
// non-existing resource, an error is returned.
|
||||
ListHosts(ctx context.Context, in *ListHostsRequest, opts ...grpc.CallOption) (*ListHostsResponse, error)
|
||||
// CreateHost creates and stores a Host in boundary. The provided
|
||||
// request must include the Host Catalog id in which the Host
|
||||
// will be created. If the Catalog id is missing, malformed or references a
|
||||
// non-existing resource, an error is returned. If a name is provided that
|
||||
// is in use by another Host in the same Host Catalog, an error is returned.
|
||||
CreateHost(ctx context.Context, in *CreateHostRequest, opts ...grpc.CallOption) (*CreateHostResponse, error)
|
||||
// UpdateHost updates an existing Host in boundary. The provided
|
||||
// Host 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 Host. An error is returned if the Host 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 in
|
||||
// the same Host Catalog.
|
||||
UpdateHost(ctx context.Context, in *UpdateHostRequest, opts ...grpc.CallOption) (*UpdateHostResponse, error)
|
||||
// DeleteHost removes a Host from Boundary. If the provided Host ID
|
||||
// is malformed or not provided an error is returned.
|
||||
DeleteHost(ctx context.Context, in *DeleteHostRequest, opts ...grpc.CallOption) (*DeleteHostResponse, error)
|
||||
}
|
||||
|
||||
type hostServiceClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewHostServiceClient(cc grpc.ClientConnInterface) HostServiceClient {
|
||||
return &hostServiceClient{cc}
|
||||
}
|
||||
|
||||
func (c *hostServiceClient) GetHost(ctx context.Context, in *GetHostRequest, opts ...grpc.CallOption) (*GetHostResponse, error) {
|
||||
out := new(GetHostResponse)
|
||||
err := c.cc.Invoke(ctx, "/controller.api.services.v1.HostService/GetHost", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *hostServiceClient) ListHosts(ctx context.Context, in *ListHostsRequest, opts ...grpc.CallOption) (*ListHostsResponse, error) {
|
||||
out := new(ListHostsResponse)
|
||||
err := c.cc.Invoke(ctx, "/controller.api.services.v1.HostService/ListHosts", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *hostServiceClient) CreateHost(ctx context.Context, in *CreateHostRequest, opts ...grpc.CallOption) (*CreateHostResponse, error) {
|
||||
out := new(CreateHostResponse)
|
||||
err := c.cc.Invoke(ctx, "/controller.api.services.v1.HostService/CreateHost", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *hostServiceClient) UpdateHost(ctx context.Context, in *UpdateHostRequest, opts ...grpc.CallOption) (*UpdateHostResponse, error) {
|
||||
out := new(UpdateHostResponse)
|
||||
err := c.cc.Invoke(ctx, "/controller.api.services.v1.HostService/UpdateHost", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *hostServiceClient) DeleteHost(ctx context.Context, in *DeleteHostRequest, opts ...grpc.CallOption) (*DeleteHostResponse, error) {
|
||||
out := new(DeleteHostResponse)
|
||||
err := c.cc.Invoke(ctx, "/controller.api.services.v1.HostService/DeleteHost", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// HostServiceServer is the server API for HostService service.
|
||||
type HostServiceServer interface {
|
||||
// GetHost returns a stored Host if present. The provided request
|
||||
// must include the host ID for the resource being retrieved. If the ID is
|
||||
// missing, malformed or referencing anon existing resource an error is
|
||||
// returned.
|
||||
GetHost(context.Context, *GetHostRequest) (*GetHostResponse, error)
|
||||
// ListHosts returns a list of stored hosts which exist inside the provided
|
||||
// Host Catalog. The request must include the Host Catalog id containing the
|
||||
// Hosts being listed. If the id is missing, malformed, or reference a
|
||||
// non-existing resource, an error is returned.
|
||||
ListHosts(context.Context, *ListHostsRequest) (*ListHostsResponse, error)
|
||||
// CreateHost creates and stores a Host in boundary. The provided
|
||||
// request must include the Host Catalog id in which the Host
|
||||
// will be created. If the Catalog id is missing, malformed or references a
|
||||
// non-existing resource, an error is returned. If a name is provided that
|
||||
// is in use by another Host in the same Host Catalog, an error is returned.
|
||||
CreateHost(context.Context, *CreateHostRequest) (*CreateHostResponse, error)
|
||||
// UpdateHost updates an existing Host in boundary. The provided
|
||||
// Host 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 Host. An error is returned if the Host 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 in
|
||||
// the same Host Catalog.
|
||||
UpdateHost(context.Context, *UpdateHostRequest) (*UpdateHostResponse, error)
|
||||
// DeleteHost removes a Host from Boundary. If the provided Host ID
|
||||
// is malformed or not provided an error is returned.
|
||||
DeleteHost(context.Context, *DeleteHostRequest) (*DeleteHostResponse, error)
|
||||
}
|
||||
|
||||
// UnimplementedHostServiceServer can be embedded to have forward compatible implementations.
|
||||
type UnimplementedHostServiceServer struct {
|
||||
}
|
||||
|
||||
func (*UnimplementedHostServiceServer) GetHost(context.Context, *GetHostRequest) (*GetHostResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetHost not implemented")
|
||||
}
|
||||
func (*UnimplementedHostServiceServer) ListHosts(context.Context, *ListHostsRequest) (*ListHostsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ListHosts not implemented")
|
||||
}
|
||||
func (*UnimplementedHostServiceServer) CreateHost(context.Context, *CreateHostRequest) (*CreateHostResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CreateHost not implemented")
|
||||
}
|
||||
func (*UnimplementedHostServiceServer) UpdateHost(context.Context, *UpdateHostRequest) (*UpdateHostResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method UpdateHost not implemented")
|
||||
}
|
||||
func (*UnimplementedHostServiceServer) DeleteHost(context.Context, *DeleteHostRequest) (*DeleteHostResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method DeleteHost not implemented")
|
||||
}
|
||||
|
||||
func RegisterHostServiceServer(s *grpc.Server, srv HostServiceServer) {
|
||||
s.RegisterService(&_HostService_serviceDesc, srv)
|
||||
}
|
||||
|
||||
func _HostService_GetHost_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetHostRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(HostServiceServer).GetHost(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/controller.api.services.v1.HostService/GetHost",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(HostServiceServer).GetHost(ctx, req.(*GetHostRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _HostService_ListHosts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ListHostsRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(HostServiceServer).ListHosts(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/controller.api.services.v1.HostService/ListHosts",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(HostServiceServer).ListHosts(ctx, req.(*ListHostsRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _HostService_CreateHost_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(CreateHostRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(HostServiceServer).CreateHost(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/controller.api.services.v1.HostService/CreateHost",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(HostServiceServer).CreateHost(ctx, req.(*CreateHostRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _HostService_UpdateHost_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(UpdateHostRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(HostServiceServer).UpdateHost(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/controller.api.services.v1.HostService/UpdateHost",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(HostServiceServer).UpdateHost(ctx, req.(*UpdateHostRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _HostService_DeleteHost_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(DeleteHostRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(HostServiceServer).DeleteHost(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/controller.api.services.v1.HostService/DeleteHost",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(HostServiceServer).DeleteHost(ctx, req.(*DeleteHostRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
var _HostService_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "controller.api.services.v1.HostService",
|
||||
HandlerType: (*HostServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "GetHost",
|
||||
Handler: _HostService_GetHost_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ListHosts",
|
||||
Handler: _HostService_ListHosts_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "CreateHost",
|
||||
Handler: _HostService_CreateHost_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "UpdateHost",
|
||||
Handler: _HostService_UpdateHost_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "DeleteHost",
|
||||
Handler: _HostService_DeleteHost_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "controller/api/services/v1/host_service.proto",
|
||||
}
|
||||
@ -0,0 +1,418 @@
|
||||
// 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.
|
||||
const _ = grpc.SupportPackageIsVersion6
|
||||
|
||||
// HostSetServiceClient is the client API for HostSetService 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 HostSetServiceClient interface {
|
||||
// GetHostSet returns a stored Host Set if present. The provided request
|
||||
// must include the Host Set ID for the resource being retrieved. If missing,
|
||||
// malformed or reference a non existing resource an error is returned.
|
||||
GetHostSet(ctx context.Context, in *GetHostSetRequest, opts ...grpc.CallOption) (*GetHostSetResponse, error)
|
||||
// ListHostSets returns a list of stored Host Sets which exist inside the
|
||||
// Host Catalog provided. The request must include a properly formatted
|
||||
// Host Catalog id or an error is returned.
|
||||
ListHostSets(ctx context.Context, in *ListHostSetsRequest, opts ...grpc.CallOption) (*ListHostSetsResponse, error)
|
||||
// CreateHostSet creates and stores a Host Set in boundary. The provided
|
||||
// request must include the Host Catalog id in which the Host Set
|
||||
// will be created. If the Host Catalog id is missing, malformed or
|
||||
// references a non existing resource, an error is returned. If a name is
|
||||
// provided that is in use by another Host Set in the same Host Catalog, an
|
||||
// error is returned.
|
||||
CreateHostSet(ctx context.Context, in *CreateHostSetRequest, opts ...grpc.CallOption) (*CreateHostSetResponse, error)
|
||||
// UpdateHostSet updates an existing Host Set in boundary. The provided
|
||||
// Host Set 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 Host Set. An error is returned if the Host Set 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 in this Host Catalog.
|
||||
UpdateHostSet(ctx context.Context, in *UpdateHostSetRequest, opts ...grpc.CallOption) (*UpdateHostSetResponse, error)
|
||||
// DeleteHostSet removes a Host Set from Boundary. If the provided
|
||||
// Host Set id is malformed or not provided an error is returned.
|
||||
DeleteHostSet(ctx context.Context, in *DeleteHostSetRequest, opts ...grpc.CallOption) (*DeleteHostSetResponse, error)
|
||||
// AddHostSetHosts adds a Host to a Host Set. The provided request must
|
||||
// include the Host Set ID to which the Host will be added.
|
||||
// All hosts added to the provided Host Set must be a child of the same
|
||||
// Catalog that this Host Set is a child of. If the Host Set IDs is
|
||||
// missing, malformed, or reference non-existing resources, an error is
|
||||
// returned. It is an error to add a Host which already exists in the
|
||||
// Host Set.
|
||||
AddHostSetHosts(ctx context.Context, in *AddHostSetHostsRequest, opts ...grpc.CallOption) (*AddHostSetHostsResponse, error)
|
||||
// SetHostSetHosts sets the Host Set's hosts. Any existing hosts on the
|
||||
// Host Set are deleted if they are not included in this request. The
|
||||
// provided request must include the Host Set ID on which the hosts will be
|
||||
// set. All Hosts in the request must be a child of the same Catalog that
|
||||
// the provided Host Set is. An error is returned if any of the provided
|
||||
// ids are malformed or references a non-existing resource.
|
||||
SetHostSetHosts(ctx context.Context, in *SetHostSetHostsRequest, opts ...grpc.CallOption) (*SetHostSetHostsResponse, error)
|
||||
// RemoveHostSetHosts removes the Hosts from the specified Host Set. The
|
||||
// provided request must include the Host Set ID which the Host will be
|
||||
// removed. An error is a returned if any of the provided IDs are malformed,
|
||||
// or references a non-existing scope or catalog, or if a Host id is included
|
||||
// which is not in the provided Host Set.
|
||||
RemoveHostSetHosts(ctx context.Context, in *RemoveHostSetHostsRequest, opts ...grpc.CallOption) (*RemoveHostSetHostsResponse, error)
|
||||
}
|
||||
|
||||
type hostSetServiceClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewHostSetServiceClient(cc grpc.ClientConnInterface) HostSetServiceClient {
|
||||
return &hostSetServiceClient{cc}
|
||||
}
|
||||
|
||||
func (c *hostSetServiceClient) GetHostSet(ctx context.Context, in *GetHostSetRequest, opts ...grpc.CallOption) (*GetHostSetResponse, error) {
|
||||
out := new(GetHostSetResponse)
|
||||
err := c.cc.Invoke(ctx, "/controller.api.services.v1.HostSetService/GetHostSet", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *hostSetServiceClient) ListHostSets(ctx context.Context, in *ListHostSetsRequest, opts ...grpc.CallOption) (*ListHostSetsResponse, error) {
|
||||
out := new(ListHostSetsResponse)
|
||||
err := c.cc.Invoke(ctx, "/controller.api.services.v1.HostSetService/ListHostSets", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *hostSetServiceClient) CreateHostSet(ctx context.Context, in *CreateHostSetRequest, opts ...grpc.CallOption) (*CreateHostSetResponse, error) {
|
||||
out := new(CreateHostSetResponse)
|
||||
err := c.cc.Invoke(ctx, "/controller.api.services.v1.HostSetService/CreateHostSet", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *hostSetServiceClient) UpdateHostSet(ctx context.Context, in *UpdateHostSetRequest, opts ...grpc.CallOption) (*UpdateHostSetResponse, error) {
|
||||
out := new(UpdateHostSetResponse)
|
||||
err := c.cc.Invoke(ctx, "/controller.api.services.v1.HostSetService/UpdateHostSet", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *hostSetServiceClient) DeleteHostSet(ctx context.Context, in *DeleteHostSetRequest, opts ...grpc.CallOption) (*DeleteHostSetResponse, error) {
|
||||
out := new(DeleteHostSetResponse)
|
||||
err := c.cc.Invoke(ctx, "/controller.api.services.v1.HostSetService/DeleteHostSet", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *hostSetServiceClient) AddHostSetHosts(ctx context.Context, in *AddHostSetHostsRequest, opts ...grpc.CallOption) (*AddHostSetHostsResponse, error) {
|
||||
out := new(AddHostSetHostsResponse)
|
||||
err := c.cc.Invoke(ctx, "/controller.api.services.v1.HostSetService/AddHostSetHosts", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *hostSetServiceClient) SetHostSetHosts(ctx context.Context, in *SetHostSetHostsRequest, opts ...grpc.CallOption) (*SetHostSetHostsResponse, error) {
|
||||
out := new(SetHostSetHostsResponse)
|
||||
err := c.cc.Invoke(ctx, "/controller.api.services.v1.HostSetService/SetHostSetHosts", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *hostSetServiceClient) RemoveHostSetHosts(ctx context.Context, in *RemoveHostSetHostsRequest, opts ...grpc.CallOption) (*RemoveHostSetHostsResponse, error) {
|
||||
out := new(RemoveHostSetHostsResponse)
|
||||
err := c.cc.Invoke(ctx, "/controller.api.services.v1.HostSetService/RemoveHostSetHosts", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// HostSetServiceServer is the server API for HostSetService service.
|
||||
type HostSetServiceServer interface {
|
||||
// GetHostSet returns a stored Host Set if present. The provided request
|
||||
// must include the Host Set ID for the resource being retrieved. If missing,
|
||||
// malformed or reference a non existing resource an error is returned.
|
||||
GetHostSet(context.Context, *GetHostSetRequest) (*GetHostSetResponse, error)
|
||||
// ListHostSets returns a list of stored Host Sets which exist inside the
|
||||
// Host Catalog provided. The request must include a properly formatted
|
||||
// Host Catalog id or an error is returned.
|
||||
ListHostSets(context.Context, *ListHostSetsRequest) (*ListHostSetsResponse, error)
|
||||
// CreateHostSet creates and stores a Host Set in boundary. The provided
|
||||
// request must include the Host Catalog id in which the Host Set
|
||||
// will be created. If the Host Catalog id is missing, malformed or
|
||||
// references a non existing resource, an error is returned. If a name is
|
||||
// provided that is in use by another Host Set in the same Host Catalog, an
|
||||
// error is returned.
|
||||
CreateHostSet(context.Context, *CreateHostSetRequest) (*CreateHostSetResponse, error)
|
||||
// UpdateHostSet updates an existing Host Set in boundary. The provided
|
||||
// Host Set 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 Host Set. An error is returned if the Host Set 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 in this Host Catalog.
|
||||
UpdateHostSet(context.Context, *UpdateHostSetRequest) (*UpdateHostSetResponse, error)
|
||||
// DeleteHostSet removes a Host Set from Boundary. If the provided
|
||||
// Host Set id is malformed or not provided an error is returned.
|
||||
DeleteHostSet(context.Context, *DeleteHostSetRequest) (*DeleteHostSetResponse, error)
|
||||
// AddHostSetHosts adds a Host to a Host Set. The provided request must
|
||||
// include the Host Set ID to which the Host will be added.
|
||||
// All hosts added to the provided Host Set must be a child of the same
|
||||
// Catalog that this Host Set is a child of. If the Host Set IDs is
|
||||
// missing, malformed, or reference non-existing resources, an error is
|
||||
// returned. It is an error to add a Host which already exists in the
|
||||
// Host Set.
|
||||
AddHostSetHosts(context.Context, *AddHostSetHostsRequest) (*AddHostSetHostsResponse, error)
|
||||
// SetHostSetHosts sets the Host Set's hosts. Any existing hosts on the
|
||||
// Host Set are deleted if they are not included in this request. The
|
||||
// provided request must include the Host Set ID on which the hosts will be
|
||||
// set. All Hosts in the request must be a child of the same Catalog that
|
||||
// the provided Host Set is. An error is returned if any of the provided
|
||||
// ids are malformed or references a non-existing resource.
|
||||
SetHostSetHosts(context.Context, *SetHostSetHostsRequest) (*SetHostSetHostsResponse, error)
|
||||
// RemoveHostSetHosts removes the Hosts from the specified Host Set. The
|
||||
// provided request must include the Host Set ID which the Host will be
|
||||
// removed. An error is a returned if any of the provided IDs are malformed,
|
||||
// or references a non-existing scope or catalog, or if a Host id is included
|
||||
// which is not in the provided Host Set.
|
||||
RemoveHostSetHosts(context.Context, *RemoveHostSetHostsRequest) (*RemoveHostSetHostsResponse, error)
|
||||
}
|
||||
|
||||
// UnimplementedHostSetServiceServer can be embedded to have forward compatible implementations.
|
||||
type UnimplementedHostSetServiceServer struct {
|
||||
}
|
||||
|
||||
func (*UnimplementedHostSetServiceServer) GetHostSet(context.Context, *GetHostSetRequest) (*GetHostSetResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetHostSet not implemented")
|
||||
}
|
||||
func (*UnimplementedHostSetServiceServer) ListHostSets(context.Context, *ListHostSetsRequest) (*ListHostSetsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ListHostSets not implemented")
|
||||
}
|
||||
func (*UnimplementedHostSetServiceServer) CreateHostSet(context.Context, *CreateHostSetRequest) (*CreateHostSetResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CreateHostSet not implemented")
|
||||
}
|
||||
func (*UnimplementedHostSetServiceServer) UpdateHostSet(context.Context, *UpdateHostSetRequest) (*UpdateHostSetResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method UpdateHostSet not implemented")
|
||||
}
|
||||
func (*UnimplementedHostSetServiceServer) DeleteHostSet(context.Context, *DeleteHostSetRequest) (*DeleteHostSetResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method DeleteHostSet not implemented")
|
||||
}
|
||||
func (*UnimplementedHostSetServiceServer) AddHostSetHosts(context.Context, *AddHostSetHostsRequest) (*AddHostSetHostsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method AddHostSetHosts not implemented")
|
||||
}
|
||||
func (*UnimplementedHostSetServiceServer) SetHostSetHosts(context.Context, *SetHostSetHostsRequest) (*SetHostSetHostsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method SetHostSetHosts not implemented")
|
||||
}
|
||||
func (*UnimplementedHostSetServiceServer) RemoveHostSetHosts(context.Context, *RemoveHostSetHostsRequest) (*RemoveHostSetHostsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method RemoveHostSetHosts not implemented")
|
||||
}
|
||||
|
||||
func RegisterHostSetServiceServer(s *grpc.Server, srv HostSetServiceServer) {
|
||||
s.RegisterService(&_HostSetService_serviceDesc, srv)
|
||||
}
|
||||
|
||||
func _HostSetService_GetHostSet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetHostSetRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(HostSetServiceServer).GetHostSet(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/controller.api.services.v1.HostSetService/GetHostSet",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(HostSetServiceServer).GetHostSet(ctx, req.(*GetHostSetRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _HostSetService_ListHostSets_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ListHostSetsRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(HostSetServiceServer).ListHostSets(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/controller.api.services.v1.HostSetService/ListHostSets",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(HostSetServiceServer).ListHostSets(ctx, req.(*ListHostSetsRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _HostSetService_CreateHostSet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(CreateHostSetRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(HostSetServiceServer).CreateHostSet(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/controller.api.services.v1.HostSetService/CreateHostSet",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(HostSetServiceServer).CreateHostSet(ctx, req.(*CreateHostSetRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _HostSetService_UpdateHostSet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(UpdateHostSetRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(HostSetServiceServer).UpdateHostSet(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/controller.api.services.v1.HostSetService/UpdateHostSet",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(HostSetServiceServer).UpdateHostSet(ctx, req.(*UpdateHostSetRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _HostSetService_DeleteHostSet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(DeleteHostSetRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(HostSetServiceServer).DeleteHostSet(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/controller.api.services.v1.HostSetService/DeleteHostSet",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(HostSetServiceServer).DeleteHostSet(ctx, req.(*DeleteHostSetRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _HostSetService_AddHostSetHosts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(AddHostSetHostsRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(HostSetServiceServer).AddHostSetHosts(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/controller.api.services.v1.HostSetService/AddHostSetHosts",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(HostSetServiceServer).AddHostSetHosts(ctx, req.(*AddHostSetHostsRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _HostSetService_SetHostSetHosts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(SetHostSetHostsRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(HostSetServiceServer).SetHostSetHosts(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/controller.api.services.v1.HostSetService/SetHostSetHosts",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(HostSetServiceServer).SetHostSetHosts(ctx, req.(*SetHostSetHostsRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _HostSetService_RemoveHostSetHosts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(RemoveHostSetHostsRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(HostSetServiceServer).RemoveHostSetHosts(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/controller.api.services.v1.HostSetService/RemoveHostSetHosts",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(HostSetServiceServer).RemoveHostSetHosts(ctx, req.(*RemoveHostSetHostsRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
var _HostSetService_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "controller.api.services.v1.HostSetService",
|
||||
HandlerType: (*HostSetServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "GetHostSet",
|
||||
Handler: _HostSetService_GetHostSet_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ListHostSets",
|
||||
Handler: _HostSetService_ListHostSets_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "CreateHostSet",
|
||||
Handler: _HostSetService_CreateHostSet_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "UpdateHostSet",
|
||||
Handler: _HostSetService_UpdateHostSet_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "DeleteHostSet",
|
||||
Handler: _HostSetService_DeleteHostSet_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "AddHostSetHosts",
|
||||
Handler: _HostSetService_AddHostSetHosts_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "SetHostSetHosts",
|
||||
Handler: _HostSetService_SetHostSetHosts_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "RemoveHostSetHosts",
|
||||
Handler: _HostSetService_RemoveHostSetHosts_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "controller/api/services/v1/host_set_service.proto",
|
||||
}
|
||||
@ -0,0 +1,546 @@
|
||||
// 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.
|
||||
const _ = grpc.SupportPackageIsVersion6
|
||||
|
||||
// RoleServiceClient is the client API for RoleService 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 RoleServiceClient interface {
|
||||
// GetRole returns a stored Role if present. The provided request must include
|
||||
// the Role ID for the Role being retrieved. If the ID is missing, malformed
|
||||
// or reference a non-existing resource an error is returned.
|
||||
GetRole(ctx context.Context, in *GetRoleRequest, opts ...grpc.CallOption) (*GetRoleResponse, error)
|
||||
// ListRoles returns a list of stored Roles which exist inside the scope
|
||||
// referenced inside the request. The request must include the scope ID for
|
||||
// the Roles being retrieved. If the scope ID is missing, malformed, or
|
||||
// reference a non-existing scope, an error is returned.
|
||||
ListRoles(ctx context.Context, in *ListRolesRequest, opts ...grpc.CallOption) (*ListRolesResponse, error)
|
||||
// CreateRole creates and stores a Role. The provided request must include the
|
||||
// scope ID in which the Role 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 Role in the same scope, an error
|
||||
// is returned.
|
||||
CreateRole(ctx context.Context, in *CreateRoleRequest, opts ...grpc.CallOption) (*CreateRoleResponse, error)
|
||||
// UpdateRole updates an existing Role in boundary. The provided
|
||||
// Role 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 Role. An error is returned if either the scope
|
||||
// or Role IDs are 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 in the same scope.
|
||||
UpdateRole(ctx context.Context, in *UpdateRoleRequest, opts ...grpc.CallOption) (*UpdateRoleResponse, error)
|
||||
// DeleteRole removes a Role from Boundary. If the provided scope or Role IDs
|
||||
// are malformed, or not provided an error is returned.
|
||||
DeleteRole(ctx context.Context, in *DeleteRoleRequest, opts ...grpc.CallOption) (*DeleteRoleResponse, error)
|
||||
// AddRolePrincipals adds users and/or groups to a Role. The provided request
|
||||
// must include the Role ID to which the users and/or groups will be added.
|
||||
// If the Role ID is missing, malformed, or reference non-existing resources,
|
||||
// an error is returned. An error is also returned if the request attempts to
|
||||
// add a principal that is already part of the role.
|
||||
AddRolePrincipals(ctx context.Context, in *AddRolePrincipalsRequest, opts ...grpc.CallOption) (*AddRolePrincipalsResponse, error)
|
||||
// SetRolePrincipals sets the Role's users and/or groups. Any existing
|
||||
// principals on the Role are deleted if they are not included in this
|
||||
// request. The provided request must include the Role ID on
|
||||
// which the users and/or groups will be set. If the Role ID is
|
||||
// missing, malformed, or referencing a non-existing resource, an error is
|
||||
// returned.
|
||||
SetRolePrincipals(ctx context.Context, in *SetRolePrincipalsRequest, opts ...grpc.CallOption) (*SetRolePrincipalsResponse, error)
|
||||
// RemoveRolePrincipals removes the users and/or groups from the specified
|
||||
// Role. The provided request must include the Role ID from
|
||||
// which the users and/or groups will be removed. If that ID is missing,
|
||||
// malformed, or reference a non-existing resource, an error is returned.
|
||||
// An error is returned if a remove is called for a principal that is not
|
||||
// part of the role.
|
||||
RemoveRolePrincipals(ctx context.Context, in *RemoveRolePrincipalsRequest, opts ...grpc.CallOption) (*RemoveRolePrincipalsResponse, error)
|
||||
// AddRoleGrants adds grants to a Role. The provided request must include
|
||||
// the Role id which the grants will be added to. An error is returned
|
||||
// if the provided id is malformed or references a non-existing resource.
|
||||
AddRoleGrants(ctx context.Context, in *AddRoleGrantsRequest, opts ...grpc.CallOption) (*AddRoleGrantsResponse, error)
|
||||
// SetRoleGrants sets the Role's grants. Any existing grants on the Role are
|
||||
// deleted if they are not included in this request. The provided request must
|
||||
// include the Role ID on which the grants will be set. If missing, malformed,
|
||||
// or referencing a non-existing resource, an error is returned.
|
||||
SetRoleGrants(ctx context.Context, in *SetRoleGrantsRequest, opts ...grpc.CallOption) (*SetRoleGrantsResponse, error)
|
||||
// RemoveRoleGrants removes the grants from the specified Role.
|
||||
// The provided request must include the Role IDs from which the
|
||||
// grants will be removed. If missing, malformed, or references a non-existing
|
||||
// resource, an error is returned.
|
||||
RemoveRoleGrants(ctx context.Context, in *RemoveRoleGrantsRequest, opts ...grpc.CallOption) (*RemoveRoleGrantsResponse, error)
|
||||
}
|
||||
|
||||
type roleServiceClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewRoleServiceClient(cc grpc.ClientConnInterface) RoleServiceClient {
|
||||
return &roleServiceClient{cc}
|
||||
}
|
||||
|
||||
func (c *roleServiceClient) GetRole(ctx context.Context, in *GetRoleRequest, opts ...grpc.CallOption) (*GetRoleResponse, error) {
|
||||
out := new(GetRoleResponse)
|
||||
err := c.cc.Invoke(ctx, "/controller.api.services.v1.RoleService/GetRole", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *roleServiceClient) ListRoles(ctx context.Context, in *ListRolesRequest, opts ...grpc.CallOption) (*ListRolesResponse, error) {
|
||||
out := new(ListRolesResponse)
|
||||
err := c.cc.Invoke(ctx, "/controller.api.services.v1.RoleService/ListRoles", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *roleServiceClient) CreateRole(ctx context.Context, in *CreateRoleRequest, opts ...grpc.CallOption) (*CreateRoleResponse, error) {
|
||||
out := new(CreateRoleResponse)
|
||||
err := c.cc.Invoke(ctx, "/controller.api.services.v1.RoleService/CreateRole", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *roleServiceClient) UpdateRole(ctx context.Context, in *UpdateRoleRequest, opts ...grpc.CallOption) (*UpdateRoleResponse, error) {
|
||||
out := new(UpdateRoleResponse)
|
||||
err := c.cc.Invoke(ctx, "/controller.api.services.v1.RoleService/UpdateRole", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *roleServiceClient) DeleteRole(ctx context.Context, in *DeleteRoleRequest, opts ...grpc.CallOption) (*DeleteRoleResponse, error) {
|
||||
out := new(DeleteRoleResponse)
|
||||
err := c.cc.Invoke(ctx, "/controller.api.services.v1.RoleService/DeleteRole", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *roleServiceClient) AddRolePrincipals(ctx context.Context, in *AddRolePrincipalsRequest, opts ...grpc.CallOption) (*AddRolePrincipalsResponse, error) {
|
||||
out := new(AddRolePrincipalsResponse)
|
||||
err := c.cc.Invoke(ctx, "/controller.api.services.v1.RoleService/AddRolePrincipals", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *roleServiceClient) SetRolePrincipals(ctx context.Context, in *SetRolePrincipalsRequest, opts ...grpc.CallOption) (*SetRolePrincipalsResponse, error) {
|
||||
out := new(SetRolePrincipalsResponse)
|
||||
err := c.cc.Invoke(ctx, "/controller.api.services.v1.RoleService/SetRolePrincipals", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *roleServiceClient) RemoveRolePrincipals(ctx context.Context, in *RemoveRolePrincipalsRequest, opts ...grpc.CallOption) (*RemoveRolePrincipalsResponse, error) {
|
||||
out := new(RemoveRolePrincipalsResponse)
|
||||
err := c.cc.Invoke(ctx, "/controller.api.services.v1.RoleService/RemoveRolePrincipals", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *roleServiceClient) AddRoleGrants(ctx context.Context, in *AddRoleGrantsRequest, opts ...grpc.CallOption) (*AddRoleGrantsResponse, error) {
|
||||
out := new(AddRoleGrantsResponse)
|
||||
err := c.cc.Invoke(ctx, "/controller.api.services.v1.RoleService/AddRoleGrants", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *roleServiceClient) SetRoleGrants(ctx context.Context, in *SetRoleGrantsRequest, opts ...grpc.CallOption) (*SetRoleGrantsResponse, error) {
|
||||
out := new(SetRoleGrantsResponse)
|
||||
err := c.cc.Invoke(ctx, "/controller.api.services.v1.RoleService/SetRoleGrants", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *roleServiceClient) RemoveRoleGrants(ctx context.Context, in *RemoveRoleGrantsRequest, opts ...grpc.CallOption) (*RemoveRoleGrantsResponse, error) {
|
||||
out := new(RemoveRoleGrantsResponse)
|
||||
err := c.cc.Invoke(ctx, "/controller.api.services.v1.RoleService/RemoveRoleGrants", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// RoleServiceServer is the server API for RoleService service.
|
||||
type RoleServiceServer interface {
|
||||
// GetRole returns a stored Role if present. The provided request must include
|
||||
// the Role ID for the Role being retrieved. If the ID is missing, malformed
|
||||
// or reference a non-existing resource an error is returned.
|
||||
GetRole(context.Context, *GetRoleRequest) (*GetRoleResponse, error)
|
||||
// ListRoles returns a list of stored Roles which exist inside the scope
|
||||
// referenced inside the request. The request must include the scope ID for
|
||||
// the Roles being retrieved. If the scope ID is missing, malformed, or
|
||||
// reference a non-existing scope, an error is returned.
|
||||
ListRoles(context.Context, *ListRolesRequest) (*ListRolesResponse, error)
|
||||
// CreateRole creates and stores a Role. The provided request must include the
|
||||
// scope ID in which the Role 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 Role in the same scope, an error
|
||||
// is returned.
|
||||
CreateRole(context.Context, *CreateRoleRequest) (*CreateRoleResponse, error)
|
||||
// UpdateRole updates an existing Role in boundary. The provided
|
||||
// Role 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 Role. An error is returned if either the scope
|
||||
// or Role IDs are 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 in the same scope.
|
||||
UpdateRole(context.Context, *UpdateRoleRequest) (*UpdateRoleResponse, error)
|
||||
// DeleteRole removes a Role from Boundary. If the provided scope or Role IDs
|
||||
// are malformed, or not provided an error is returned.
|
||||
DeleteRole(context.Context, *DeleteRoleRequest) (*DeleteRoleResponse, error)
|
||||
// AddRolePrincipals adds users and/or groups to a Role. The provided request
|
||||
// must include the Role ID to which the users and/or groups will be added.
|
||||
// If the Role ID is missing, malformed, or reference non-existing resources,
|
||||
// an error is returned. An error is also returned if the request attempts to
|
||||
// add a principal that is already part of the role.
|
||||
AddRolePrincipals(context.Context, *AddRolePrincipalsRequest) (*AddRolePrincipalsResponse, error)
|
||||
// SetRolePrincipals sets the Role's users and/or groups. Any existing
|
||||
// principals on the Role are deleted if they are not included in this
|
||||
// request. The provided request must include the Role ID on
|
||||
// which the users and/or groups will be set. If the Role ID is
|
||||
// missing, malformed, or referencing a non-existing resource, an error is
|
||||
// returned.
|
||||
SetRolePrincipals(context.Context, *SetRolePrincipalsRequest) (*SetRolePrincipalsResponse, error)
|
||||
// RemoveRolePrincipals removes the users and/or groups from the specified
|
||||
// Role. The provided request must include the Role ID from
|
||||
// which the users and/or groups will be removed. If that ID is missing,
|
||||
// malformed, or reference a non-existing resource, an error is returned.
|
||||
// An error is returned if a remove is called for a principal that is not
|
||||
// part of the role.
|
||||
RemoveRolePrincipals(context.Context, *RemoveRolePrincipalsRequest) (*RemoveRolePrincipalsResponse, error)
|
||||
// AddRoleGrants adds grants to a Role. The provided request must include
|
||||
// the Role id which the grants will be added to. An error is returned
|
||||
// if the provided id is malformed or references a non-existing resource.
|
||||
AddRoleGrants(context.Context, *AddRoleGrantsRequest) (*AddRoleGrantsResponse, error)
|
||||
// SetRoleGrants sets the Role's grants. Any existing grants on the Role are
|
||||
// deleted if they are not included in this request. The provided request must
|
||||
// include the Role ID on which the grants will be set. If missing, malformed,
|
||||
// or referencing a non-existing resource, an error is returned.
|
||||
SetRoleGrants(context.Context, *SetRoleGrantsRequest) (*SetRoleGrantsResponse, error)
|
||||
// RemoveRoleGrants removes the grants from the specified Role.
|
||||
// The provided request must include the Role IDs from which the
|
||||
// grants will be removed. If missing, malformed, or references a non-existing
|
||||
// resource, an error is returned.
|
||||
RemoveRoleGrants(context.Context, *RemoveRoleGrantsRequest) (*RemoveRoleGrantsResponse, error)
|
||||
}
|
||||
|
||||
// UnimplementedRoleServiceServer can be embedded to have forward compatible implementations.
|
||||
type UnimplementedRoleServiceServer struct {
|
||||
}
|
||||
|
||||
func (*UnimplementedRoleServiceServer) GetRole(context.Context, *GetRoleRequest) (*GetRoleResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetRole not implemented")
|
||||
}
|
||||
func (*UnimplementedRoleServiceServer) ListRoles(context.Context, *ListRolesRequest) (*ListRolesResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ListRoles not implemented")
|
||||
}
|
||||
func (*UnimplementedRoleServiceServer) CreateRole(context.Context, *CreateRoleRequest) (*CreateRoleResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CreateRole not implemented")
|
||||
}
|
||||
func (*UnimplementedRoleServiceServer) UpdateRole(context.Context, *UpdateRoleRequest) (*UpdateRoleResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method UpdateRole not implemented")
|
||||
}
|
||||
func (*UnimplementedRoleServiceServer) DeleteRole(context.Context, *DeleteRoleRequest) (*DeleteRoleResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method DeleteRole not implemented")
|
||||
}
|
||||
func (*UnimplementedRoleServiceServer) AddRolePrincipals(context.Context, *AddRolePrincipalsRequest) (*AddRolePrincipalsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method AddRolePrincipals not implemented")
|
||||
}
|
||||
func (*UnimplementedRoleServiceServer) SetRolePrincipals(context.Context, *SetRolePrincipalsRequest) (*SetRolePrincipalsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method SetRolePrincipals not implemented")
|
||||
}
|
||||
func (*UnimplementedRoleServiceServer) RemoveRolePrincipals(context.Context, *RemoveRolePrincipalsRequest) (*RemoveRolePrincipalsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method RemoveRolePrincipals not implemented")
|
||||
}
|
||||
func (*UnimplementedRoleServiceServer) AddRoleGrants(context.Context, *AddRoleGrantsRequest) (*AddRoleGrantsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method AddRoleGrants not implemented")
|
||||
}
|
||||
func (*UnimplementedRoleServiceServer) SetRoleGrants(context.Context, *SetRoleGrantsRequest) (*SetRoleGrantsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method SetRoleGrants not implemented")
|
||||
}
|
||||
func (*UnimplementedRoleServiceServer) RemoveRoleGrants(context.Context, *RemoveRoleGrantsRequest) (*RemoveRoleGrantsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method RemoveRoleGrants not implemented")
|
||||
}
|
||||
|
||||
func RegisterRoleServiceServer(s *grpc.Server, srv RoleServiceServer) {
|
||||
s.RegisterService(&_RoleService_serviceDesc, srv)
|
||||
}
|
||||
|
||||
func _RoleService_GetRole_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetRoleRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(RoleServiceServer).GetRole(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/controller.api.services.v1.RoleService/GetRole",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(RoleServiceServer).GetRole(ctx, req.(*GetRoleRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _RoleService_ListRoles_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ListRolesRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(RoleServiceServer).ListRoles(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/controller.api.services.v1.RoleService/ListRoles",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(RoleServiceServer).ListRoles(ctx, req.(*ListRolesRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _RoleService_CreateRole_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(CreateRoleRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(RoleServiceServer).CreateRole(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/controller.api.services.v1.RoleService/CreateRole",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(RoleServiceServer).CreateRole(ctx, req.(*CreateRoleRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _RoleService_UpdateRole_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(UpdateRoleRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(RoleServiceServer).UpdateRole(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/controller.api.services.v1.RoleService/UpdateRole",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(RoleServiceServer).UpdateRole(ctx, req.(*UpdateRoleRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _RoleService_DeleteRole_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(DeleteRoleRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(RoleServiceServer).DeleteRole(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/controller.api.services.v1.RoleService/DeleteRole",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(RoleServiceServer).DeleteRole(ctx, req.(*DeleteRoleRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _RoleService_AddRolePrincipals_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(AddRolePrincipalsRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(RoleServiceServer).AddRolePrincipals(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/controller.api.services.v1.RoleService/AddRolePrincipals",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(RoleServiceServer).AddRolePrincipals(ctx, req.(*AddRolePrincipalsRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _RoleService_SetRolePrincipals_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(SetRolePrincipalsRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(RoleServiceServer).SetRolePrincipals(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/controller.api.services.v1.RoleService/SetRolePrincipals",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(RoleServiceServer).SetRolePrincipals(ctx, req.(*SetRolePrincipalsRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _RoleService_RemoveRolePrincipals_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(RemoveRolePrincipalsRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(RoleServiceServer).RemoveRolePrincipals(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/controller.api.services.v1.RoleService/RemoveRolePrincipals",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(RoleServiceServer).RemoveRolePrincipals(ctx, req.(*RemoveRolePrincipalsRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _RoleService_AddRoleGrants_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(AddRoleGrantsRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(RoleServiceServer).AddRoleGrants(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/controller.api.services.v1.RoleService/AddRoleGrants",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(RoleServiceServer).AddRoleGrants(ctx, req.(*AddRoleGrantsRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _RoleService_SetRoleGrants_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(SetRoleGrantsRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(RoleServiceServer).SetRoleGrants(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/controller.api.services.v1.RoleService/SetRoleGrants",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(RoleServiceServer).SetRoleGrants(ctx, req.(*SetRoleGrantsRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _RoleService_RemoveRoleGrants_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(RemoveRoleGrantsRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(RoleServiceServer).RemoveRoleGrants(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/controller.api.services.v1.RoleService/RemoveRoleGrants",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(RoleServiceServer).RemoveRoleGrants(ctx, req.(*RemoveRoleGrantsRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
var _RoleService_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "controller.api.services.v1.RoleService",
|
||||
HandlerType: (*RoleServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "GetRole",
|
||||
Handler: _RoleService_GetRole_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ListRoles",
|
||||
Handler: _RoleService_ListRoles_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "CreateRole",
|
||||
Handler: _RoleService_CreateRole_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "UpdateRole",
|
||||
Handler: _RoleService_UpdateRole_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "DeleteRole",
|
||||
Handler: _RoleService_DeleteRole_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "AddRolePrincipals",
|
||||
Handler: _RoleService_AddRolePrincipals_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "SetRolePrincipals",
|
||||
Handler: _RoleService_SetRolePrincipals_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "RemoveRolePrincipals",
|
||||
Handler: _RoleService_RemoveRolePrincipals_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "AddRoleGrants",
|
||||
Handler: _RoleService_AddRoleGrants_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "SetRoleGrants",
|
||||
Handler: _RoleService_SetRoleGrants_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "RemoveRoleGrants",
|
||||
Handler: _RoleService_RemoveRoleGrants_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "controller/api/services/v1/role_service.proto",
|
||||
}
|
||||
@ -0,0 +1,272 @@
|
||||
// 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.
|
||||
const _ = grpc.SupportPackageIsVersion6
|
||||
|
||||
// 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.
|
||||
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)
|
||||
}
|
||||
|
||||
// UnimplementedScopeServiceServer can 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 RegisterScopeServiceServer(s *grpc.Server, 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)
|
||||
}
|
||||
|
||||
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",
|
||||
}
|
||||
@ -0,0 +1,180 @@
|
||||
// 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.
|
||||
const _ = grpc.SupportPackageIsVersion6
|
||||
|
||||
// SessionServiceClient is the client API for SessionService 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 SessionServiceClient interface {
|
||||
// GetSession returns a stored Session if present. The provided request
|
||||
// must include the Session ID for the Session being retrieved. If
|
||||
// any that ID is missing, malformed or reference a non existing
|
||||
// resource an error is returned.
|
||||
GetSession(ctx context.Context, in *GetSessionRequest, opts ...grpc.CallOption) (*GetSessionResponse, error)
|
||||
// ListSessions returns a list of stored Sessions which exist inside the scope
|
||||
// referenced inside the request. The request must include the scope ID for
|
||||
// the Sessions being retrieved. If the scope ID is missing, malformed, or
|
||||
// reference a non existing scope, an error is returned.
|
||||
ListSessions(ctx context.Context, in *ListSessionsRequest, opts ...grpc.CallOption) (*ListSessionsResponse, error)
|
||||
// CancelSession cancels an existing Session in boundary. An error
|
||||
// is returned if the request attempts to cancel a Session that does
|
||||
// not exist.
|
||||
CancelSession(ctx context.Context, in *CancelSessionRequest, opts ...grpc.CallOption) (*CancelSessionResponse, error)
|
||||
}
|
||||
|
||||
type sessionServiceClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewSessionServiceClient(cc grpc.ClientConnInterface) SessionServiceClient {
|
||||
return &sessionServiceClient{cc}
|
||||
}
|
||||
|
||||
func (c *sessionServiceClient) GetSession(ctx context.Context, in *GetSessionRequest, opts ...grpc.CallOption) (*GetSessionResponse, error) {
|
||||
out := new(GetSessionResponse)
|
||||
err := c.cc.Invoke(ctx, "/controller.api.services.v1.SessionService/GetSession", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *sessionServiceClient) ListSessions(ctx context.Context, in *ListSessionsRequest, opts ...grpc.CallOption) (*ListSessionsResponse, error) {
|
||||
out := new(ListSessionsResponse)
|
||||
err := c.cc.Invoke(ctx, "/controller.api.services.v1.SessionService/ListSessions", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *sessionServiceClient) CancelSession(ctx context.Context, in *CancelSessionRequest, opts ...grpc.CallOption) (*CancelSessionResponse, error) {
|
||||
out := new(CancelSessionResponse)
|
||||
err := c.cc.Invoke(ctx, "/controller.api.services.v1.SessionService/CancelSession", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// SessionServiceServer is the server API for SessionService service.
|
||||
type SessionServiceServer interface {
|
||||
// GetSession returns a stored Session if present. The provided request
|
||||
// must include the Session ID for the Session being retrieved. If
|
||||
// any that ID is missing, malformed or reference a non existing
|
||||
// resource an error is returned.
|
||||
GetSession(context.Context, *GetSessionRequest) (*GetSessionResponse, error)
|
||||
// ListSessions returns a list of stored Sessions which exist inside the scope
|
||||
// referenced inside the request. The request must include the scope ID for
|
||||
// the Sessions being retrieved. If the scope ID is missing, malformed, or
|
||||
// reference a non existing scope, an error is returned.
|
||||
ListSessions(context.Context, *ListSessionsRequest) (*ListSessionsResponse, error)
|
||||
// CancelSession cancels an existing Session in boundary. An error
|
||||
// is returned if the request attempts to cancel a Session that does
|
||||
// not exist.
|
||||
CancelSession(context.Context, *CancelSessionRequest) (*CancelSessionResponse, error)
|
||||
}
|
||||
|
||||
// UnimplementedSessionServiceServer can be embedded to have forward compatible implementations.
|
||||
type UnimplementedSessionServiceServer struct {
|
||||
}
|
||||
|
||||
func (*UnimplementedSessionServiceServer) GetSession(context.Context, *GetSessionRequest) (*GetSessionResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetSession not implemented")
|
||||
}
|
||||
func (*UnimplementedSessionServiceServer) ListSessions(context.Context, *ListSessionsRequest) (*ListSessionsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ListSessions not implemented")
|
||||
}
|
||||
func (*UnimplementedSessionServiceServer) CancelSession(context.Context, *CancelSessionRequest) (*CancelSessionResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CancelSession not implemented")
|
||||
}
|
||||
|
||||
func RegisterSessionServiceServer(s *grpc.Server, srv SessionServiceServer) {
|
||||
s.RegisterService(&_SessionService_serviceDesc, srv)
|
||||
}
|
||||
|
||||
func _SessionService_GetSession_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetSessionRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(SessionServiceServer).GetSession(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/controller.api.services.v1.SessionService/GetSession",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(SessionServiceServer).GetSession(ctx, req.(*GetSessionRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _SessionService_ListSessions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ListSessionsRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(SessionServiceServer).ListSessions(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/controller.api.services.v1.SessionService/ListSessions",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(SessionServiceServer).ListSessions(ctx, req.(*ListSessionsRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _SessionService_CancelSession_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(CancelSessionRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(SessionServiceServer).CancelSession(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/controller.api.services.v1.SessionService/CancelSession",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(SessionServiceServer).CancelSession(ctx, req.(*CancelSessionRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
var _SessionService_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "controller.api.services.v1.SessionService",
|
||||
HandlerType: (*SessionServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "GetSession",
|
||||
Handler: _SessionService_GetSession_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ListSessions",
|
||||
Handler: _SessionService_ListSessions_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "CancelSession",
|
||||
Handler: _SessionService_CancelSession_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "controller/api/services/v1/session_service.proto",
|
||||
}
|
||||
@ -0,0 +1,462 @@
|
||||
// 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.
|
||||
const _ = grpc.SupportPackageIsVersion6
|
||||
|
||||
// TargetServiceClient is the client API for TargetService 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 TargetServiceClient interface {
|
||||
// GetTarget returns a stored Target if present. The provided request
|
||||
// must include the Target ID for the Target being retrieved. If
|
||||
// that ID is missing, malformed or reference a non existing
|
||||
// resource an error is returned.
|
||||
GetTarget(ctx context.Context, in *GetTargetRequest, opts ...grpc.CallOption) (*GetTargetResponse, error)
|
||||
// ListTargets returns a list of stored Targets which exist inside the project
|
||||
// referenced inside the request. The request must include the scope ID for
|
||||
// the Targets being retrieved. If the scope ID is missing, malformed, or
|
||||
// reference a non existing scope, an error is returned.
|
||||
ListTargets(ctx context.Context, in *ListTargetsRequest, opts ...grpc.CallOption) (*ListTargetsResponse, error)
|
||||
// CreateTarget creates and stores a Target in boundary. The provided
|
||||
// request must include the scope id in which the Target 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 Target in the same scope, an error is returned.
|
||||
CreateTarget(ctx context.Context, in *CreateTargetRequest, opts ...grpc.CallOption) (*CreateTargetResponse, error)
|
||||
// UpdateTarget updates an existing Target in boundary. The provided
|
||||
// Target 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 Target. An error is returned if the Target 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 in
|
||||
// this scope.
|
||||
UpdateTarget(ctx context.Context, in *UpdateTargetRequest, opts ...grpc.CallOption) (*UpdateTargetResponse, error)
|
||||
// DeleteTarget removes a Target from Boundary. If the provided Target ID
|
||||
// is malformed or not provided an error is returned.
|
||||
DeleteTarget(ctx context.Context, in *DeleteTargetRequest, opts ...grpc.CallOption) (*DeleteTargetResponse, error)
|
||||
// AuthorizeSession creates authorization information from a given Target.
|
||||
AuthorizeSession(ctx context.Context, in *AuthorizeSessionRequest, opts ...grpc.CallOption) (*AuthorizeSessionResponse, error)
|
||||
// AddTargetHostSets adds Host Sets to this Target. The provided request must
|
||||
// include the Target ID to which the Host Sets will be added.
|
||||
// All Host Sets added to the provided Target must be a child of a Catalog that
|
||||
// is a child of 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 Host Set is attempted to be added
|
||||
// to a target that is already present on the Target.
|
||||
AddTargetHostSets(ctx context.Context, in *AddTargetHostSetsRequest, opts ...grpc.CallOption) (*AddTargetHostSetsResponse, error)
|
||||
// SetTargetHostSets sets the Target's Host Sets. Any existing Host Sets 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
|
||||
// Host Sets will be set. All Host Sets in the request must be a child of
|
||||
// a Catalog 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.
|
||||
SetTargetHostSets(ctx context.Context, in *SetTargetHostSetsRequest, opts ...grpc.CallOption) (*SetTargetHostSetsResponse, error)
|
||||
// RemoveTargetHostSets removes the Host Sets from the specified Target. The
|
||||
// provided request must include the Target ID for the Target
|
||||
// from which the Host Sets will be removed. If the ID is missing,
|
||||
// malformed, or references a non-existing scope or Catalog, an error is
|
||||
// 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)
|
||||
}
|
||||
|
||||
type targetServiceClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewTargetServiceClient(cc grpc.ClientConnInterface) TargetServiceClient {
|
||||
return &targetServiceClient{cc}
|
||||
}
|
||||
|
||||
func (c *targetServiceClient) GetTarget(ctx context.Context, in *GetTargetRequest, opts ...grpc.CallOption) (*GetTargetResponse, error) {
|
||||
out := new(GetTargetResponse)
|
||||
err := c.cc.Invoke(ctx, "/controller.api.services.v1.TargetService/GetTarget", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *targetServiceClient) ListTargets(ctx context.Context, in *ListTargetsRequest, opts ...grpc.CallOption) (*ListTargetsResponse, error) {
|
||||
out := new(ListTargetsResponse)
|
||||
err := c.cc.Invoke(ctx, "/controller.api.services.v1.TargetService/ListTargets", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *targetServiceClient) CreateTarget(ctx context.Context, in *CreateTargetRequest, opts ...grpc.CallOption) (*CreateTargetResponse, error) {
|
||||
out := new(CreateTargetResponse)
|
||||
err := c.cc.Invoke(ctx, "/controller.api.services.v1.TargetService/CreateTarget", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *targetServiceClient) UpdateTarget(ctx context.Context, in *UpdateTargetRequest, opts ...grpc.CallOption) (*UpdateTargetResponse, error) {
|
||||
out := new(UpdateTargetResponse)
|
||||
err := c.cc.Invoke(ctx, "/controller.api.services.v1.TargetService/UpdateTarget", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *targetServiceClient) DeleteTarget(ctx context.Context, in *DeleteTargetRequest, opts ...grpc.CallOption) (*DeleteTargetResponse, error) {
|
||||
out := new(DeleteTargetResponse)
|
||||
err := c.cc.Invoke(ctx, "/controller.api.services.v1.TargetService/DeleteTarget", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *targetServiceClient) AuthorizeSession(ctx context.Context, in *AuthorizeSessionRequest, opts ...grpc.CallOption) (*AuthorizeSessionResponse, error) {
|
||||
out := new(AuthorizeSessionResponse)
|
||||
err := c.cc.Invoke(ctx, "/controller.api.services.v1.TargetService/AuthorizeSession", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *targetServiceClient) AddTargetHostSets(ctx context.Context, in *AddTargetHostSetsRequest, opts ...grpc.CallOption) (*AddTargetHostSetsResponse, error) {
|
||||
out := new(AddTargetHostSetsResponse)
|
||||
err := c.cc.Invoke(ctx, "/controller.api.services.v1.TargetService/AddTargetHostSets", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *targetServiceClient) SetTargetHostSets(ctx context.Context, in *SetTargetHostSetsRequest, opts ...grpc.CallOption) (*SetTargetHostSetsResponse, error) {
|
||||
out := new(SetTargetHostSetsResponse)
|
||||
err := c.cc.Invoke(ctx, "/controller.api.services.v1.TargetService/SetTargetHostSets", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *targetServiceClient) RemoveTargetHostSets(ctx context.Context, in *RemoveTargetHostSetsRequest, opts ...grpc.CallOption) (*RemoveTargetHostSetsResponse, error) {
|
||||
out := new(RemoveTargetHostSetsResponse)
|
||||
err := c.cc.Invoke(ctx, "/controller.api.services.v1.TargetService/RemoveTargetHostSets", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// TargetServiceServer is the server API for TargetService service.
|
||||
type TargetServiceServer interface {
|
||||
// GetTarget returns a stored Target if present. The provided request
|
||||
// must include the Target ID for the Target being retrieved. If
|
||||
// that ID is missing, malformed or reference a non existing
|
||||
// resource an error is returned.
|
||||
GetTarget(context.Context, *GetTargetRequest) (*GetTargetResponse, error)
|
||||
// ListTargets returns a list of stored Targets which exist inside the project
|
||||
// referenced inside the request. The request must include the scope ID for
|
||||
// the Targets being retrieved. If the scope ID is missing, malformed, or
|
||||
// reference a non existing scope, an error is returned.
|
||||
ListTargets(context.Context, *ListTargetsRequest) (*ListTargetsResponse, error)
|
||||
// CreateTarget creates and stores a Target in boundary. The provided
|
||||
// request must include the scope id in which the Target 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 Target in the same scope, an error is returned.
|
||||
CreateTarget(context.Context, *CreateTargetRequest) (*CreateTargetResponse, error)
|
||||
// UpdateTarget updates an existing Target in boundary. The provided
|
||||
// Target 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 Target. An error is returned if the Target 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 in
|
||||
// this scope.
|
||||
UpdateTarget(context.Context, *UpdateTargetRequest) (*UpdateTargetResponse, error)
|
||||
// DeleteTarget removes a Target from Boundary. If the provided Target ID
|
||||
// is malformed or not provided an error is returned.
|
||||
DeleteTarget(context.Context, *DeleteTargetRequest) (*DeleteTargetResponse, error)
|
||||
// AuthorizeSession creates authorization information from a given Target.
|
||||
AuthorizeSession(context.Context, *AuthorizeSessionRequest) (*AuthorizeSessionResponse, error)
|
||||
// AddTargetHostSets adds Host Sets to this Target. The provided request must
|
||||
// include the Target ID to which the Host Sets will be added.
|
||||
// All Host Sets added to the provided Target must be a child of a Catalog that
|
||||
// is a child of 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 Host Set is attempted to be added
|
||||
// to a target that is already present on the Target.
|
||||
AddTargetHostSets(context.Context, *AddTargetHostSetsRequest) (*AddTargetHostSetsResponse, error)
|
||||
// SetTargetHostSets sets the Target's Host Sets. Any existing Host Sets 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
|
||||
// Host Sets will be set. All Host Sets in the request must be a child of
|
||||
// a Catalog 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.
|
||||
SetTargetHostSets(context.Context, *SetTargetHostSetsRequest) (*SetTargetHostSetsResponse, error)
|
||||
// RemoveTargetHostSets removes the Host Sets from the specified Target. The
|
||||
// provided request must include the Target ID for the Target
|
||||
// from which the Host Sets will be removed. If the ID is missing,
|
||||
// malformed, or references a non-existing scope or Catalog, an error is
|
||||
// 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)
|
||||
}
|
||||
|
||||
// UnimplementedTargetServiceServer can be embedded to have forward compatible implementations.
|
||||
type UnimplementedTargetServiceServer struct {
|
||||
}
|
||||
|
||||
func (*UnimplementedTargetServiceServer) GetTarget(context.Context, *GetTargetRequest) (*GetTargetResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetTarget not implemented")
|
||||
}
|
||||
func (*UnimplementedTargetServiceServer) ListTargets(context.Context, *ListTargetsRequest) (*ListTargetsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ListTargets not implemented")
|
||||
}
|
||||
func (*UnimplementedTargetServiceServer) CreateTarget(context.Context, *CreateTargetRequest) (*CreateTargetResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CreateTarget not implemented")
|
||||
}
|
||||
func (*UnimplementedTargetServiceServer) UpdateTarget(context.Context, *UpdateTargetRequest) (*UpdateTargetResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method UpdateTarget not implemented")
|
||||
}
|
||||
func (*UnimplementedTargetServiceServer) DeleteTarget(context.Context, *DeleteTargetRequest) (*DeleteTargetResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method DeleteTarget not implemented")
|
||||
}
|
||||
func (*UnimplementedTargetServiceServer) AuthorizeSession(context.Context, *AuthorizeSessionRequest) (*AuthorizeSessionResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method AuthorizeSession not implemented")
|
||||
}
|
||||
func (*UnimplementedTargetServiceServer) AddTargetHostSets(context.Context, *AddTargetHostSetsRequest) (*AddTargetHostSetsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method AddTargetHostSets not implemented")
|
||||
}
|
||||
func (*UnimplementedTargetServiceServer) SetTargetHostSets(context.Context, *SetTargetHostSetsRequest) (*SetTargetHostSetsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method SetTargetHostSets not implemented")
|
||||
}
|
||||
func (*UnimplementedTargetServiceServer) RemoveTargetHostSets(context.Context, *RemoveTargetHostSetsRequest) (*RemoveTargetHostSetsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method RemoveTargetHostSets not implemented")
|
||||
}
|
||||
|
||||
func RegisterTargetServiceServer(s *grpc.Server, srv TargetServiceServer) {
|
||||
s.RegisterService(&_TargetService_serviceDesc, srv)
|
||||
}
|
||||
|
||||
func _TargetService_GetTarget_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetTargetRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(TargetServiceServer).GetTarget(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/controller.api.services.v1.TargetService/GetTarget",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(TargetServiceServer).GetTarget(ctx, req.(*GetTargetRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _TargetService_ListTargets_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ListTargetsRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(TargetServiceServer).ListTargets(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/controller.api.services.v1.TargetService/ListTargets",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(TargetServiceServer).ListTargets(ctx, req.(*ListTargetsRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _TargetService_CreateTarget_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(CreateTargetRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(TargetServiceServer).CreateTarget(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/controller.api.services.v1.TargetService/CreateTarget",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(TargetServiceServer).CreateTarget(ctx, req.(*CreateTargetRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _TargetService_UpdateTarget_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(UpdateTargetRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(TargetServiceServer).UpdateTarget(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/controller.api.services.v1.TargetService/UpdateTarget",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(TargetServiceServer).UpdateTarget(ctx, req.(*UpdateTargetRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _TargetService_DeleteTarget_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(DeleteTargetRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(TargetServiceServer).DeleteTarget(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/controller.api.services.v1.TargetService/DeleteTarget",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(TargetServiceServer).DeleteTarget(ctx, req.(*DeleteTargetRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _TargetService_AuthorizeSession_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(AuthorizeSessionRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(TargetServiceServer).AuthorizeSession(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/controller.api.services.v1.TargetService/AuthorizeSession",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(TargetServiceServer).AuthorizeSession(ctx, req.(*AuthorizeSessionRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _TargetService_AddTargetHostSets_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(AddTargetHostSetsRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(TargetServiceServer).AddTargetHostSets(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/controller.api.services.v1.TargetService/AddTargetHostSets",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(TargetServiceServer).AddTargetHostSets(ctx, req.(*AddTargetHostSetsRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _TargetService_SetTargetHostSets_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(SetTargetHostSetsRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(TargetServiceServer).SetTargetHostSets(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/controller.api.services.v1.TargetService/SetTargetHostSets",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(TargetServiceServer).SetTargetHostSets(ctx, req.(*SetTargetHostSetsRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _TargetService_RemoveTargetHostSets_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(RemoveTargetHostSetsRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(TargetServiceServer).RemoveTargetHostSets(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/controller.api.services.v1.TargetService/RemoveTargetHostSets",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(TargetServiceServer).RemoveTargetHostSets(ctx, req.(*RemoveTargetHostSetsRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
var _TargetService_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "controller.api.services.v1.TargetService",
|
||||
HandlerType: (*TargetServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "GetTarget",
|
||||
Handler: _TargetService_GetTarget_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ListTargets",
|
||||
Handler: _TargetService_ListTargets_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "CreateTarget",
|
||||
Handler: _TargetService_CreateTarget_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "UpdateTarget",
|
||||
Handler: _TargetService_UpdateTarget_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "DeleteTarget",
|
||||
Handler: _TargetService_DeleteTarget_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "AuthorizeSession",
|
||||
Handler: _TargetService_AuthorizeSession_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "AddTargetHostSets",
|
||||
Handler: _TargetService_AddTargetHostSets_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "SetTargetHostSets",
|
||||
Handler: _TargetService_SetTargetHostSets_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "RemoveTargetHostSets",
|
||||
Handler: _TargetService_RemoveTargetHostSets_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "controller/api/services/v1/target_service.proto",
|
||||
}
|
||||
@ -0,0 +1,418 @@
|
||||
// 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.
|
||||
const _ = grpc.SupportPackageIsVersion6
|
||||
|
||||
// UserServiceClient is the client API for UserService 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 UserServiceClient interface {
|
||||
// GetUser returns a stored User if present. The provided request
|
||||
// must include the User ID for the User being retrieved. If
|
||||
// that ID is missing, malformed or reference a non existing
|
||||
// resource an error is returned.
|
||||
GetUser(ctx context.Context, in *GetUserRequest, opts ...grpc.CallOption) (*GetUserResponse, error)
|
||||
// ListUsers returns a list of stored Users which exist inside the provided
|
||||
// scope. The request must include the scope ID for the Users being listed.
|
||||
// If the scope ID is missing, malformed, or reference a non existing scope,
|
||||
// an error is returned.
|
||||
ListUsers(ctx context.Context, in *ListUsersRequest, opts ...grpc.CallOption) (*ListUsersResponse, error)
|
||||
// CreateUser creates and stores a User in boundary. The provided
|
||||
// request must include the Scope id in which the User will be created.
|
||||
// If the Scope id is missing, malformed or references a non existing
|
||||
// resource, an error is returned. If a name is provided that is in
|
||||
// use in another User in the same scope, an error is returned.
|
||||
CreateUser(ctx context.Context, in *CreateUserRequest, opts ...grpc.CallOption) (*CreateUserResponse, error)
|
||||
// UpdateUser updates an existing User in boundary. The provided
|
||||
// User 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 User. An error is returned if either the User 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
|
||||
// in this Scope.
|
||||
UpdateUser(ctx context.Context, in *UpdateUserRequest, opts ...grpc.CallOption) (*UpdateUserResponse, error)
|
||||
// DeleteUser removes a User from Boundary. If the provided User ID
|
||||
// is malformed or not provided an error is returned.
|
||||
DeleteUser(ctx context.Context, in *DeleteUserRequest, opts ...grpc.CallOption) (*DeleteUserResponse, error)
|
||||
// AddUserAccounts adds Users as members to a group. The provided request
|
||||
// must include the User id which the Account will be added to. If that id is
|
||||
// missing, malformed or references a non existing resource, an error is
|
||||
// returned. If any of the Accounts are associated with another User an
|
||||
// error is returned.
|
||||
AddUserAccounts(ctx context.Context, in *AddUserAccountsRequest, opts ...grpc.CallOption) (*AddUserAccountsResponse, error)
|
||||
// SetUserAccounts sets the Accounts associated with this User.
|
||||
// Any existing Accounts are removed if they are not included in this request.
|
||||
// The provided request must include the User ID which the Accounts will be
|
||||
// associated with. Any Accounts not included in this request but previously
|
||||
// associated with this user will be disassociated.
|
||||
// If the User ID is missing, malformed or references a non existing resource,
|
||||
// an error is returned.
|
||||
// If any of the Accounts are associated with another User an error is returned.
|
||||
SetUserAccounts(ctx context.Context, in *SetUserAccountsRequest, opts ...grpc.CallOption) (*SetUserAccountsResponse, error)
|
||||
// RemoveUserAccounts removes Accounts from the specified User.
|
||||
// The provided request must include the User id which the Accounts
|
||||
// will be removed from. If the provided Account ids is not associated with the
|
||||
// provided User, an error is returned.
|
||||
RemoveUserAccounts(ctx context.Context, in *RemoveUserAccountsRequest, opts ...grpc.CallOption) (*RemoveUserAccountsResponse, error)
|
||||
}
|
||||
|
||||
type userServiceClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewUserServiceClient(cc grpc.ClientConnInterface) UserServiceClient {
|
||||
return &userServiceClient{cc}
|
||||
}
|
||||
|
||||
func (c *userServiceClient) GetUser(ctx context.Context, in *GetUserRequest, opts ...grpc.CallOption) (*GetUserResponse, error) {
|
||||
out := new(GetUserResponse)
|
||||
err := c.cc.Invoke(ctx, "/controller.api.services.v1.UserService/GetUser", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *userServiceClient) ListUsers(ctx context.Context, in *ListUsersRequest, opts ...grpc.CallOption) (*ListUsersResponse, error) {
|
||||
out := new(ListUsersResponse)
|
||||
err := c.cc.Invoke(ctx, "/controller.api.services.v1.UserService/ListUsers", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *userServiceClient) CreateUser(ctx context.Context, in *CreateUserRequest, opts ...grpc.CallOption) (*CreateUserResponse, error) {
|
||||
out := new(CreateUserResponse)
|
||||
err := c.cc.Invoke(ctx, "/controller.api.services.v1.UserService/CreateUser", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *userServiceClient) UpdateUser(ctx context.Context, in *UpdateUserRequest, opts ...grpc.CallOption) (*UpdateUserResponse, error) {
|
||||
out := new(UpdateUserResponse)
|
||||
err := c.cc.Invoke(ctx, "/controller.api.services.v1.UserService/UpdateUser", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *userServiceClient) DeleteUser(ctx context.Context, in *DeleteUserRequest, opts ...grpc.CallOption) (*DeleteUserResponse, error) {
|
||||
out := new(DeleteUserResponse)
|
||||
err := c.cc.Invoke(ctx, "/controller.api.services.v1.UserService/DeleteUser", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *userServiceClient) AddUserAccounts(ctx context.Context, in *AddUserAccountsRequest, opts ...grpc.CallOption) (*AddUserAccountsResponse, error) {
|
||||
out := new(AddUserAccountsResponse)
|
||||
err := c.cc.Invoke(ctx, "/controller.api.services.v1.UserService/AddUserAccounts", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *userServiceClient) SetUserAccounts(ctx context.Context, in *SetUserAccountsRequest, opts ...grpc.CallOption) (*SetUserAccountsResponse, error) {
|
||||
out := new(SetUserAccountsResponse)
|
||||
err := c.cc.Invoke(ctx, "/controller.api.services.v1.UserService/SetUserAccounts", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *userServiceClient) RemoveUserAccounts(ctx context.Context, in *RemoveUserAccountsRequest, opts ...grpc.CallOption) (*RemoveUserAccountsResponse, error) {
|
||||
out := new(RemoveUserAccountsResponse)
|
||||
err := c.cc.Invoke(ctx, "/controller.api.services.v1.UserService/RemoveUserAccounts", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// UserServiceServer is the server API for UserService service.
|
||||
type UserServiceServer interface {
|
||||
// GetUser returns a stored User if present. The provided request
|
||||
// must include the User ID for the User being retrieved. If
|
||||
// that ID is missing, malformed or reference a non existing
|
||||
// resource an error is returned.
|
||||
GetUser(context.Context, *GetUserRequest) (*GetUserResponse, error)
|
||||
// ListUsers returns a list of stored Users which exist inside the provided
|
||||
// scope. The request must include the scope ID for the Users being listed.
|
||||
// If the scope ID is missing, malformed, or reference a non existing scope,
|
||||
// an error is returned.
|
||||
ListUsers(context.Context, *ListUsersRequest) (*ListUsersResponse, error)
|
||||
// CreateUser creates and stores a User in boundary. The provided
|
||||
// request must include the Scope id in which the User will be created.
|
||||
// If the Scope id is missing, malformed or references a non existing
|
||||
// resource, an error is returned. If a name is provided that is in
|
||||
// use in another User in the same scope, an error is returned.
|
||||
CreateUser(context.Context, *CreateUserRequest) (*CreateUserResponse, error)
|
||||
// UpdateUser updates an existing User in boundary. The provided
|
||||
// User 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 User. An error is returned if either the User 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
|
||||
// in this Scope.
|
||||
UpdateUser(context.Context, *UpdateUserRequest) (*UpdateUserResponse, error)
|
||||
// DeleteUser removes a User from Boundary. If the provided User ID
|
||||
// is malformed or not provided an error is returned.
|
||||
DeleteUser(context.Context, *DeleteUserRequest) (*DeleteUserResponse, error)
|
||||
// AddUserAccounts adds Users as members to a group. The provided request
|
||||
// must include the User id which the Account will be added to. If that id is
|
||||
// missing, malformed or references a non existing resource, an error is
|
||||
// returned. If any of the Accounts are associated with another User an
|
||||
// error is returned.
|
||||
AddUserAccounts(context.Context, *AddUserAccountsRequest) (*AddUserAccountsResponse, error)
|
||||
// SetUserAccounts sets the Accounts associated with this User.
|
||||
// Any existing Accounts are removed if they are not included in this request.
|
||||
// The provided request must include the User ID which the Accounts will be
|
||||
// associated with. Any Accounts not included in this request but previously
|
||||
// associated with this user will be disassociated.
|
||||
// If the User ID is missing, malformed or references a non existing resource,
|
||||
// an error is returned.
|
||||
// If any of the Accounts are associated with another User an error is returned.
|
||||
SetUserAccounts(context.Context, *SetUserAccountsRequest) (*SetUserAccountsResponse, error)
|
||||
// RemoveUserAccounts removes Accounts from the specified User.
|
||||
// The provided request must include the User id which the Accounts
|
||||
// will be removed from. If the provided Account ids is not associated with the
|
||||
// provided User, an error is returned.
|
||||
RemoveUserAccounts(context.Context, *RemoveUserAccountsRequest) (*RemoveUserAccountsResponse, error)
|
||||
}
|
||||
|
||||
// UnimplementedUserServiceServer can be embedded to have forward compatible implementations.
|
||||
type UnimplementedUserServiceServer struct {
|
||||
}
|
||||
|
||||
func (*UnimplementedUserServiceServer) GetUser(context.Context, *GetUserRequest) (*GetUserResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetUser not implemented")
|
||||
}
|
||||
func (*UnimplementedUserServiceServer) ListUsers(context.Context, *ListUsersRequest) (*ListUsersResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ListUsers not implemented")
|
||||
}
|
||||
func (*UnimplementedUserServiceServer) CreateUser(context.Context, *CreateUserRequest) (*CreateUserResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CreateUser not implemented")
|
||||
}
|
||||
func (*UnimplementedUserServiceServer) UpdateUser(context.Context, *UpdateUserRequest) (*UpdateUserResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method UpdateUser not implemented")
|
||||
}
|
||||
func (*UnimplementedUserServiceServer) DeleteUser(context.Context, *DeleteUserRequest) (*DeleteUserResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method DeleteUser not implemented")
|
||||
}
|
||||
func (*UnimplementedUserServiceServer) AddUserAccounts(context.Context, *AddUserAccountsRequest) (*AddUserAccountsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method AddUserAccounts not implemented")
|
||||
}
|
||||
func (*UnimplementedUserServiceServer) SetUserAccounts(context.Context, *SetUserAccountsRequest) (*SetUserAccountsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method SetUserAccounts not implemented")
|
||||
}
|
||||
func (*UnimplementedUserServiceServer) RemoveUserAccounts(context.Context, *RemoveUserAccountsRequest) (*RemoveUserAccountsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method RemoveUserAccounts not implemented")
|
||||
}
|
||||
|
||||
func RegisterUserServiceServer(s *grpc.Server, srv UserServiceServer) {
|
||||
s.RegisterService(&_UserService_serviceDesc, srv)
|
||||
}
|
||||
|
||||
func _UserService_GetUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetUserRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(UserServiceServer).GetUser(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/controller.api.services.v1.UserService/GetUser",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(UserServiceServer).GetUser(ctx, req.(*GetUserRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _UserService_ListUsers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ListUsersRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(UserServiceServer).ListUsers(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/controller.api.services.v1.UserService/ListUsers",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(UserServiceServer).ListUsers(ctx, req.(*ListUsersRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _UserService_CreateUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(CreateUserRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(UserServiceServer).CreateUser(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/controller.api.services.v1.UserService/CreateUser",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(UserServiceServer).CreateUser(ctx, req.(*CreateUserRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _UserService_UpdateUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(UpdateUserRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(UserServiceServer).UpdateUser(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/controller.api.services.v1.UserService/UpdateUser",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(UserServiceServer).UpdateUser(ctx, req.(*UpdateUserRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _UserService_DeleteUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(DeleteUserRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(UserServiceServer).DeleteUser(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/controller.api.services.v1.UserService/DeleteUser",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(UserServiceServer).DeleteUser(ctx, req.(*DeleteUserRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _UserService_AddUserAccounts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(AddUserAccountsRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(UserServiceServer).AddUserAccounts(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/controller.api.services.v1.UserService/AddUserAccounts",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(UserServiceServer).AddUserAccounts(ctx, req.(*AddUserAccountsRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _UserService_SetUserAccounts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(SetUserAccountsRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(UserServiceServer).SetUserAccounts(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/controller.api.services.v1.UserService/SetUserAccounts",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(UserServiceServer).SetUserAccounts(ctx, req.(*SetUserAccountsRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _UserService_RemoveUserAccounts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(RemoveUserAccountsRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(UserServiceServer).RemoveUserAccounts(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/controller.api.services.v1.UserService/RemoveUserAccounts",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(UserServiceServer).RemoveUserAccounts(ctx, req.(*RemoveUserAccountsRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
var _UserService_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "controller.api.services.v1.UserService",
|
||||
HandlerType: (*UserServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "GetUser",
|
||||
Handler: _UserService_GetUser_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ListUsers",
|
||||
Handler: _UserService_ListUsers_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "CreateUser",
|
||||
Handler: _UserService_CreateUser_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "UpdateUser",
|
||||
Handler: _UserService_UpdateUser_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "DeleteUser",
|
||||
Handler: _UserService_DeleteUser_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "AddUserAccounts",
|
||||
Handler: _UserService_AddUserAccounts_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "SetUserAccounts",
|
||||
Handler: _UserService_SetUserAccounts_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "RemoveUserAccounts",
|
||||
Handler: _UserService_RemoveUserAccounts_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "controller/api/services/v1/user_service.proto",
|
||||
}
|
||||
@ -0,0 +1,92 @@
|
||||
// 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.
|
||||
const _ = grpc.SupportPackageIsVersion6
|
||||
|
||||
// ServerCoordinationServiceClient is the client API for ServerCoordinationService 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 ServerCoordinationServiceClient interface {
|
||||
// Status gets worker status requests which include the ongoing jobs the worker is handling and
|
||||
// returns the status response which includes the changes the controller would like to make to
|
||||
// jobs as well as provide a list of the controllers in the system.
|
||||
Status(ctx context.Context, in *StatusRequest, opts ...grpc.CallOption) (*StatusResponse, error)
|
||||
}
|
||||
|
||||
type serverCoordinationServiceClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewServerCoordinationServiceClient(cc grpc.ClientConnInterface) ServerCoordinationServiceClient {
|
||||
return &serverCoordinationServiceClient{cc}
|
||||
}
|
||||
|
||||
func (c *serverCoordinationServiceClient) Status(ctx context.Context, in *StatusRequest, opts ...grpc.CallOption) (*StatusResponse, error) {
|
||||
out := new(StatusResponse)
|
||||
err := c.cc.Invoke(ctx, "/controller.servers.services.v1.ServerCoordinationService/Status", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// ServerCoordinationServiceServer is the server API for ServerCoordinationService service.
|
||||
type ServerCoordinationServiceServer interface {
|
||||
// Status gets worker status requests which include the ongoing jobs the worker is handling and
|
||||
// returns the status response which includes the changes the controller would like to make to
|
||||
// jobs as well as provide a list of the controllers in the system.
|
||||
Status(context.Context, *StatusRequest) (*StatusResponse, error)
|
||||
}
|
||||
|
||||
// UnimplementedServerCoordinationServiceServer can be embedded to have forward compatible implementations.
|
||||
type UnimplementedServerCoordinationServiceServer struct {
|
||||
}
|
||||
|
||||
func (*UnimplementedServerCoordinationServiceServer) Status(context.Context, *StatusRequest) (*StatusResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Status not implemented")
|
||||
}
|
||||
|
||||
func RegisterServerCoordinationServiceServer(s *grpc.Server, srv ServerCoordinationServiceServer) {
|
||||
s.RegisterService(&_ServerCoordinationService_serviceDesc, srv)
|
||||
}
|
||||
|
||||
func _ServerCoordinationService_Status_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(StatusRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(ServerCoordinationServiceServer).Status(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/controller.servers.services.v1.ServerCoordinationService/Status",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ServerCoordinationServiceServer).Status(ctx, req.(*StatusRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
var _ServerCoordinationService_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "controller.servers.services.v1.ServerCoordinationService",
|
||||
HandlerType: (*ServerCoordinationServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "Status",
|
||||
Handler: _ServerCoordinationService_Status_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "controller/servers/services/v1/server_coordination_service.proto",
|
||||
}
|
||||
@ -0,0 +1,242 @@
|
||||
// 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.
|
||||
const _ = grpc.SupportPackageIsVersion6
|
||||
|
||||
// SessionServiceClient is the client API for SessionService 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 SessionServiceClient interface {
|
||||
// GetSession allows a worker to retrieve session information from the
|
||||
// controller.
|
||||
LookupSession(ctx context.Context, in *LookupSessionRequest, opts ...grpc.CallOption) (*LookupSessionResponse, error)
|
||||
// ActivateSession allows a worker to activate a session on a controller.
|
||||
ActivateSession(ctx context.Context, in *ActivateSessionRequest, opts ...grpc.CallOption) (*ActivateSessionResponse, error)
|
||||
// AuthorizeConnection allows a worker to activate a session on a controller.
|
||||
AuthorizeConnection(ctx context.Context, in *AuthorizeConnectionRequest, opts ...grpc.CallOption) (*AuthorizeConnectionResponse, error)
|
||||
// ConnectConnection updates a connection to set it to connected
|
||||
ConnectConnection(ctx context.Context, in *ConnectConnectionRequest, opts ...grpc.CallOption) (*ConnectConnectionResponse, error)
|
||||
// CloseConnections updates a connection to set it to closed
|
||||
CloseConnection(ctx context.Context, in *CloseConnectionRequest, opts ...grpc.CallOption) (*CloseConnectionResponse, error)
|
||||
}
|
||||
|
||||
type sessionServiceClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewSessionServiceClient(cc grpc.ClientConnInterface) SessionServiceClient {
|
||||
return &sessionServiceClient{cc}
|
||||
}
|
||||
|
||||
func (c *sessionServiceClient) LookupSession(ctx context.Context, in *LookupSessionRequest, opts ...grpc.CallOption) (*LookupSessionResponse, error) {
|
||||
out := new(LookupSessionResponse)
|
||||
err := c.cc.Invoke(ctx, "/controller.servers.services.v1.SessionService/LookupSession", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *sessionServiceClient) ActivateSession(ctx context.Context, in *ActivateSessionRequest, opts ...grpc.CallOption) (*ActivateSessionResponse, error) {
|
||||
out := new(ActivateSessionResponse)
|
||||
err := c.cc.Invoke(ctx, "/controller.servers.services.v1.SessionService/ActivateSession", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *sessionServiceClient) AuthorizeConnection(ctx context.Context, in *AuthorizeConnectionRequest, opts ...grpc.CallOption) (*AuthorizeConnectionResponse, error) {
|
||||
out := new(AuthorizeConnectionResponse)
|
||||
err := c.cc.Invoke(ctx, "/controller.servers.services.v1.SessionService/AuthorizeConnection", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *sessionServiceClient) ConnectConnection(ctx context.Context, in *ConnectConnectionRequest, opts ...grpc.CallOption) (*ConnectConnectionResponse, error) {
|
||||
out := new(ConnectConnectionResponse)
|
||||
err := c.cc.Invoke(ctx, "/controller.servers.services.v1.SessionService/ConnectConnection", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *sessionServiceClient) CloseConnection(ctx context.Context, in *CloseConnectionRequest, opts ...grpc.CallOption) (*CloseConnectionResponse, error) {
|
||||
out := new(CloseConnectionResponse)
|
||||
err := c.cc.Invoke(ctx, "/controller.servers.services.v1.SessionService/CloseConnection", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// SessionServiceServer is the server API for SessionService service.
|
||||
type SessionServiceServer interface {
|
||||
// GetSession allows a worker to retrieve session information from the
|
||||
// controller.
|
||||
LookupSession(context.Context, *LookupSessionRequest) (*LookupSessionResponse, error)
|
||||
// ActivateSession allows a worker to activate a session on a controller.
|
||||
ActivateSession(context.Context, *ActivateSessionRequest) (*ActivateSessionResponse, error)
|
||||
// AuthorizeConnection allows a worker to activate a session on a controller.
|
||||
AuthorizeConnection(context.Context, *AuthorizeConnectionRequest) (*AuthorizeConnectionResponse, error)
|
||||
// ConnectConnection updates a connection to set it to connected
|
||||
ConnectConnection(context.Context, *ConnectConnectionRequest) (*ConnectConnectionResponse, error)
|
||||
// CloseConnections updates a connection to set it to closed
|
||||
CloseConnection(context.Context, *CloseConnectionRequest) (*CloseConnectionResponse, error)
|
||||
}
|
||||
|
||||
// UnimplementedSessionServiceServer can be embedded to have forward compatible implementations.
|
||||
type UnimplementedSessionServiceServer struct {
|
||||
}
|
||||
|
||||
func (*UnimplementedSessionServiceServer) LookupSession(context.Context, *LookupSessionRequest) (*LookupSessionResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method LookupSession not implemented")
|
||||
}
|
||||
func (*UnimplementedSessionServiceServer) ActivateSession(context.Context, *ActivateSessionRequest) (*ActivateSessionResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ActivateSession not implemented")
|
||||
}
|
||||
func (*UnimplementedSessionServiceServer) AuthorizeConnection(context.Context, *AuthorizeConnectionRequest) (*AuthorizeConnectionResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method AuthorizeConnection not implemented")
|
||||
}
|
||||
func (*UnimplementedSessionServiceServer) ConnectConnection(context.Context, *ConnectConnectionRequest) (*ConnectConnectionResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ConnectConnection not implemented")
|
||||
}
|
||||
func (*UnimplementedSessionServiceServer) CloseConnection(context.Context, *CloseConnectionRequest) (*CloseConnectionResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CloseConnection not implemented")
|
||||
}
|
||||
|
||||
func RegisterSessionServiceServer(s *grpc.Server, srv SessionServiceServer) {
|
||||
s.RegisterService(&_SessionService_serviceDesc, srv)
|
||||
}
|
||||
|
||||
func _SessionService_LookupSession_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(LookupSessionRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(SessionServiceServer).LookupSession(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/controller.servers.services.v1.SessionService/LookupSession",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(SessionServiceServer).LookupSession(ctx, req.(*LookupSessionRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _SessionService_ActivateSession_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ActivateSessionRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(SessionServiceServer).ActivateSession(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/controller.servers.services.v1.SessionService/ActivateSession",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(SessionServiceServer).ActivateSession(ctx, req.(*ActivateSessionRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _SessionService_AuthorizeConnection_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(AuthorizeConnectionRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(SessionServiceServer).AuthorizeConnection(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/controller.servers.services.v1.SessionService/AuthorizeConnection",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(SessionServiceServer).AuthorizeConnection(ctx, req.(*AuthorizeConnectionRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _SessionService_ConnectConnection_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ConnectConnectionRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(SessionServiceServer).ConnectConnection(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/controller.servers.services.v1.SessionService/ConnectConnection",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(SessionServiceServer).ConnectConnection(ctx, req.(*ConnectConnectionRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _SessionService_CloseConnection_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(CloseConnectionRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(SessionServiceServer).CloseConnection(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/controller.servers.services.v1.SessionService/CloseConnection",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(SessionServiceServer).CloseConnection(ctx, req.(*CloseConnectionRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
var _SessionService_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "controller.servers.services.v1.SessionService",
|
||||
HandlerType: (*SessionServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "LookupSession",
|
||||
Handler: _SessionService_LookupSession_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ActivateSession",
|
||||
Handler: _SessionService_ActivateSession_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "AuthorizeConnection",
|
||||
Handler: _SessionService_AuthorizeConnection_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ConnectConnection",
|
||||
Handler: _SessionService_ConnectConnection_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "CloseConnection",
|
||||
Handler: _SessionService_CloseConnection_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "controller/servers/services/v1/session_service.proto",
|
||||
}
|
||||
Loading…
Reference in new issue