Documentation ¶
Index ¶
- Variables
- func RegisterPubWorkerServer(s grpc.ServiceRegistrar, srv PubWorkerServer)
- type AuthorizeReq
- type AuthorizeRes
- func (*AuthorizeRes) Descriptor() ([]byte, []int)deprecated
- func (x *AuthorizeRes) GetExpired() int64
- func (x *AuthorizeRes) GetToken() string
- func (*AuthorizeRes) ProtoMessage()
- func (x *AuthorizeRes) ProtoReflect() protoreflect.Message
- func (x *AuthorizeRes) Reset()
- func (x *AuthorizeRes) String() string
- type GenerateIdReq
- func (*GenerateIdReq) Descriptor() ([]byte, []int)deprecated
- func (x *GenerateIdReq) GetKind() string
- func (x *GenerateIdReq) GetNode() int64
- func (*GenerateIdReq) ProtoMessage()
- func (x *GenerateIdReq) ProtoReflect() protoreflect.Message
- func (x *GenerateIdReq) Reset()
- func (x *GenerateIdReq) String() string
- type GenerateIdRes
- type PubWorkerClient
- type PubWorkerServer
- type PublicKeyReq
- type PublicKeyRes
- type UnimplementedPubWorkerServer
- func (UnimplementedPubWorkerServer) Authorize(context.Context, *AuthorizeReq) (*AuthorizeRes, error)
- func (UnimplementedPubWorkerServer) GenerateId(context.Context, *GenerateIdReq) (*GenerateIdRes, error)
- func (UnimplementedPubWorkerServer) PublicKey(context.Context, *PublicKeyReq) (*PublicKeyRes, error)
- type UnsafePubWorkerServer
Constants ¶
This section is empty.
Variables ¶
var File_rpcx_proto_pub_worker_proto protoreflect.FileDescriptor
var PubWorker_ServiceDesc = grpc.ServiceDesc{ ServiceName: "pub_worker.PubWorker", HandlerType: (*PubWorkerServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GenerateId", Handler: _PubWorker_GenerateId_Handler, }, { MethodName: "Authorize", Handler: _PubWorker_Authorize_Handler, }, { MethodName: "PublicKey", Handler: _PubWorker_PublicKey_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "rpcx/proto/pub_worker.proto", }
PubWorker_ServiceDesc is the grpc.ServiceDesc for PubWorker service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterPubWorkerServer ¶
func RegisterPubWorkerServer(s grpc.ServiceRegistrar, srv PubWorkerServer)
Types ¶
type AuthorizeReq ¶
type AuthorizeReq struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*AuthorizeReq) Descriptor
deprecated
func (*AuthorizeReq) Descriptor() ([]byte, []int)
Deprecated: Use AuthorizeReq.ProtoReflect.Descriptor instead.
func (*AuthorizeReq) GetMessage ¶
func (x *AuthorizeReq) GetMessage() string
func (*AuthorizeReq) ProtoMessage ¶
func (*AuthorizeReq) ProtoMessage()
func (*AuthorizeReq) ProtoReflect ¶
func (x *AuthorizeReq) ProtoReflect() protoreflect.Message
func (*AuthorizeReq) Reset ¶
func (x *AuthorizeReq) Reset()
func (*AuthorizeReq) String ¶
func (x *AuthorizeReq) String() string
type AuthorizeRes ¶
type AuthorizeRes struct { Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` Expired int64 `protobuf:"varint,2,opt,name=expired,proto3" json:"expired,omitempty"` // contains filtered or unexported fields }
func (*AuthorizeRes) Descriptor
deprecated
func (*AuthorizeRes) Descriptor() ([]byte, []int)
Deprecated: Use AuthorizeRes.ProtoReflect.Descriptor instead.
func (*AuthorizeRes) GetExpired ¶
func (x *AuthorizeRes) GetExpired() int64
func (*AuthorizeRes) GetToken ¶
func (x *AuthorizeRes) GetToken() string
func (*AuthorizeRes) ProtoMessage ¶
func (*AuthorizeRes) ProtoMessage()
func (*AuthorizeRes) ProtoReflect ¶
func (x *AuthorizeRes) ProtoReflect() protoreflect.Message
func (*AuthorizeRes) Reset ¶
func (x *AuthorizeRes) Reset()
func (*AuthorizeRes) String ¶
func (x *AuthorizeRes) String() string
type GenerateIdReq ¶
type GenerateIdReq struct { Node int64 `protobuf:"varint,1,opt,name=node,proto3" json:"node,omitempty"` Kind string `protobuf:"bytes,2,opt,name=kind,proto3" json:"kind,omitempty"` // contains filtered or unexported fields }
func (*GenerateIdReq) Descriptor
deprecated
func (*GenerateIdReq) Descriptor() ([]byte, []int)
Deprecated: Use GenerateIdReq.ProtoReflect.Descriptor instead.
func (*GenerateIdReq) GetKind ¶
func (x *GenerateIdReq) GetKind() string
func (*GenerateIdReq) GetNode ¶
func (x *GenerateIdReq) GetNode() int64
func (*GenerateIdReq) ProtoMessage ¶
func (*GenerateIdReq) ProtoMessage()
func (*GenerateIdReq) ProtoReflect ¶
func (x *GenerateIdReq) ProtoReflect() protoreflect.Message
func (*GenerateIdReq) Reset ¶
func (x *GenerateIdReq) Reset()
func (*GenerateIdReq) String ¶
func (x *GenerateIdReq) String() string
type GenerateIdRes ¶
type GenerateIdRes struct { Value int64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
func (*GenerateIdRes) Descriptor
deprecated
func (*GenerateIdRes) Descriptor() ([]byte, []int)
Deprecated: Use GenerateIdRes.ProtoReflect.Descriptor instead.
func (*GenerateIdRes) GetValue ¶
func (x *GenerateIdRes) GetValue() int64
func (*GenerateIdRes) ProtoMessage ¶
func (*GenerateIdRes) ProtoMessage()
func (*GenerateIdRes) ProtoReflect ¶
func (x *GenerateIdRes) ProtoReflect() protoreflect.Message
func (*GenerateIdRes) Reset ¶
func (x *GenerateIdRes) Reset()
func (*GenerateIdRes) String ¶
func (x *GenerateIdRes) String() string
type PubWorkerClient ¶
type PubWorkerClient interface { GenerateId(ctx context.Context, in *GenerateIdReq, opts ...grpc.CallOption) (*GenerateIdRes, error) Authorize(ctx context.Context, in *AuthorizeReq, opts ...grpc.CallOption) (*AuthorizeRes, error) PublicKey(ctx context.Context, in *PublicKeyReq, opts ...grpc.CallOption) (*PublicKeyRes, error) }
PubWorkerClient is the client API for PubWorker 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.
func NewPubWorkerClient ¶
func NewPubWorkerClient(cc grpc.ClientConnInterface) PubWorkerClient
type PubWorkerServer ¶
type PubWorkerServer interface { GenerateId(context.Context, *GenerateIdReq) (*GenerateIdRes, error) Authorize(context.Context, *AuthorizeReq) (*AuthorizeRes, error) PublicKey(context.Context, *PublicKeyReq) (*PublicKeyRes, error) // contains filtered or unexported methods }
PubWorkerServer is the server API for PubWorker service. All implementations must embed UnimplementedPubWorkerServer for forward compatibility
type PublicKeyReq ¶
type PublicKeyReq struct {
// contains filtered or unexported fields
}
func (*PublicKeyReq) Descriptor
deprecated
func (*PublicKeyReq) Descriptor() ([]byte, []int)
Deprecated: Use PublicKeyReq.ProtoReflect.Descriptor instead.
func (*PublicKeyReq) ProtoMessage ¶
func (*PublicKeyReq) ProtoMessage()
func (*PublicKeyReq) ProtoReflect ¶
func (x *PublicKeyReq) ProtoReflect() protoreflect.Message
func (*PublicKeyReq) Reset ¶
func (x *PublicKeyReq) Reset()
func (*PublicKeyReq) String ¶
func (x *PublicKeyReq) String() string
type PublicKeyRes ¶
type PublicKeyRes struct { PublicKey string `protobuf:"bytes,1,opt,name=publicKey,proto3" json:"publicKey,omitempty"` // contains filtered or unexported fields }
func (*PublicKeyRes) Descriptor
deprecated
func (*PublicKeyRes) Descriptor() ([]byte, []int)
Deprecated: Use PublicKeyRes.ProtoReflect.Descriptor instead.
func (*PublicKeyRes) GetPublicKey ¶
func (x *PublicKeyRes) GetPublicKey() string
func (*PublicKeyRes) ProtoMessage ¶
func (*PublicKeyRes) ProtoMessage()
func (*PublicKeyRes) ProtoReflect ¶
func (x *PublicKeyRes) ProtoReflect() protoreflect.Message
func (*PublicKeyRes) Reset ¶
func (x *PublicKeyRes) Reset()
func (*PublicKeyRes) String ¶
func (x *PublicKeyRes) String() string
type UnimplementedPubWorkerServer ¶
type UnimplementedPubWorkerServer struct { }
UnimplementedPubWorkerServer must be embedded to have forward compatible implementations.
func (UnimplementedPubWorkerServer) Authorize ¶
func (UnimplementedPubWorkerServer) Authorize(context.Context, *AuthorizeReq) (*AuthorizeRes, error)
func (UnimplementedPubWorkerServer) GenerateId ¶
func (UnimplementedPubWorkerServer) GenerateId(context.Context, *GenerateIdReq) (*GenerateIdRes, error)
func (UnimplementedPubWorkerServer) PublicKey ¶
func (UnimplementedPubWorkerServer) PublicKey(context.Context, *PublicKeyReq) (*PublicKeyRes, error)
type UnsafePubWorkerServer ¶
type UnsafePubWorkerServer interface {
// contains filtered or unexported methods
}
UnsafePubWorkerServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to PubWorkerServer will result in compilation errors.