github.com/cloudwan/edgelq-sdk@v1.15.4/iam/client/v1/attestation/attestation_service.pb.client.go (about) 1 // Code generated by protoc-gen-goten-client 2 // API: AttestationService 3 // DO NOT EDIT!!! 4 5 package attestation_client 6 7 import ( 8 "context" 9 10 "google.golang.org/grpc" 11 "google.golang.org/protobuf/runtime/protoimpl" 12 ) 13 14 // proto imports 15 import ( 16 attestation_domain "github.com/cloudwan/edgelq-sdk/iam/resources/v1/attestation_domain" 17 ) 18 19 // Reference imports to suppress errors if they are not otherwise used. 20 var ( 21 _ = protoimpl.DescBuilder{} 22 _ = new(context.Context) 23 _ = grpc.ClientConn{} 24 ) 25 26 // make sure we're using proto imports 27 var ( 28 _ = &attestation_domain.AttestationDomain{} 29 ) 30 31 // This is a compile-time assertion to ensure that this generated file 32 // is compatible with the proto package it is being compiled against. 33 // A compilation error at this line likely means your copy of the 34 // proto package needs to be updated. 35 const ( 36 // Verify that this generated code is sufficiently up-to-date. 37 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) 38 // Verify that runtime/protoimpl is sufficiently up-to-date. 39 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) 40 ) 41 42 // This is a compile-time assertion to ensure that this generated file 43 // is compatible with the grpc package it is being compiled against. 44 const _ = grpc.SupportPackageIsVersion6 45 46 // AttestationServiceClient is the client API for AttestationService. 47 // 48 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. 49 type AttestationServiceClient interface { 50 Verify(ctx context.Context, opts ...grpc.CallOption) (VerifyClientStream, error) 51 } 52 53 type client struct { 54 cc grpc.ClientConnInterface 55 } 56 57 func NewAttestationServiceClient(cc grpc.ClientConnInterface) AttestationServiceClient { 58 return &client{cc} 59 } 60 61 func (c *client) Verify(ctx context.Context, opts ...grpc.CallOption) (VerifyClientStream, error) { 62 stream, err := c.cc.NewStream(ctx, 63 &grpc.StreamDesc{ 64 StreamName: "Verify", 65 ServerStreams: true, 66 ClientStreams: true, 67 }, 68 "/ntt.iam.v1.AttestationService/Verify", opts...) 69 if err != nil { 70 return nil, err 71 } 72 x := &verifyVerifyClient{stream} 73 return x, nil 74 } 75 76 type VerifyClientStream interface { 77 Send(*VerifyRequest) error 78 Recv() (*VerifyResponse, error) 79 grpc.ClientStream 80 } 81 82 type verifyVerifyClient struct { 83 grpc.ClientStream 84 } 85 86 func (x *verifyVerifyClient) Send(m *VerifyRequest) error { 87 return x.ClientStream.SendMsg(m) 88 } 89 90 func (x *verifyVerifyClient) Recv() (*VerifyResponse, error) { 91 m := new(VerifyResponse) 92 if err := x.ClientStream.RecvMsg(m); err != nil { 93 return nil, err 94 } 95 return m, nil 96 }