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 tag
This commit is contained in:
1 parent
273cf29ba4
commit
7f00e61ab0
34 files changed
+4511
-4474
No files matched your search
@@ -7,14 +7,10 @@
|
||||
package services
|
||||
|
||||
import (
|
||||
context "context"
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
_ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options"
|
||||
authtokens "github.com/hashicorp/boundary/internal/gen/controller/api/resources/authtokens"
|
||||
_ "google.golang.org/genproto/googleapis/api/annotations"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
@@ -522,173 +518,3 @@ func file_controller_api_services_v1_authtokens_service_proto_init() {
|
||||
file_controller_api_services_v1_authtokens_service_proto_goTypes = nil
|
||||
file_controller_api_services_v1_authtokens_service_proto_depIdxs = nil
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ context.Context
|
||||
var _ grpc.ClientConnInterface
|
||||
|
||||
// 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://godoc.org/google.golang.org/grpc#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",
|
||||
}
|
||||
Reference in new issue
Block a user