Documentation ¶
Overview ¶
Package pcrpc is a generated protocol buffer package.
It is generated from these files:
pcrpc.proto
It has these top-level messages:
ComputeRequest ComputeResponse GetNIPRequest GetNIPResponse GetProofRequest GetProofResponse CleanRequest CleanResponse ShutdownRequest ShutdownResponse VerifyProofRequest VerifyProofResponse VerifyNIPRequest VerifyNIPResponse GetRndChallengeRequest GetRndChallengeResponse DagParams Proof Labels
Package pcrpc is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- func RegisterPoetCoreProverHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterPoetCoreProverHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterPoetCoreProverServer(s *grpc.Server, srv PoetCoreProverServer)
- func RegisterPoetVerifierHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterPoetVerifierHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterPoetVerifierServer(s *grpc.Server, srv PoetVerifierServer)
- type CleanRequest
- type CleanResponse
- type ComputeRequest
- type ComputeResponse
- type DagParams
- type GetNIPRequest
- type GetNIPResponse
- type GetProofRequest
- type GetProofResponse
- type GetRndChallengeRequest
- type GetRndChallengeResponse
- type Labels
- type PoetCoreProverClient
- type PoetCoreProverServer
- type PoetVerifierClient
- type PoetVerifierServer
- type Proof
- type ShutdownRequest
- type ShutdownResponse
- type VerifyNIPRequest
- type VerifyNIPResponse
- type VerifyProofRequest
- func (*VerifyProofRequest) Descriptor() ([]byte, []int)
- func (m *VerifyProofRequest) GetC() []string
- func (m *VerifyProofRequest) GetD() *DagParams
- func (m *VerifyProofRequest) GetP() *Proof
- func (*VerifyProofRequest) ProtoMessage()
- func (m *VerifyProofRequest) Reset()
- func (m *VerifyProofRequest) String() string
- type VerifyProofResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterPoetCoreProverHandler ¶
func RegisterPoetCoreProverHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterPoetCoreProverHandler registers the http handlers for service PoetCoreProver to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterPoetCoreProverHandlerFromEndpoint ¶
func RegisterPoetCoreProverHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterPoetCoreProverHandlerFromEndpoint is same as RegisterPoetCoreProverHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterPoetCoreProverServer ¶
func RegisterPoetCoreProverServer(s *grpc.Server, srv PoetCoreProverServer)
func RegisterPoetVerifierHandler ¶
func RegisterPoetVerifierHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterPoetVerifierHandler registers the http handlers for service PoetVerifier to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterPoetVerifierHandlerFromEndpoint ¶
func RegisterPoetVerifierHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterPoetVerifierHandlerFromEndpoint is same as RegisterPoetVerifierHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterPoetVerifierServer ¶
func RegisterPoetVerifierServer(s *grpc.Server, srv PoetVerifierServer)
Types ¶
type CleanRequest ¶
type CleanRequest struct { }
func (*CleanRequest) Descriptor ¶
func (*CleanRequest) Descriptor() ([]byte, []int)
func (*CleanRequest) ProtoMessage ¶
func (*CleanRequest) ProtoMessage()
func (*CleanRequest) Reset ¶
func (m *CleanRequest) Reset()
func (*CleanRequest) String ¶
func (m *CleanRequest) String() string
type CleanResponse ¶
type CleanResponse struct { }
func (*CleanResponse) Descriptor ¶
func (*CleanResponse) Descriptor() ([]byte, []int)
func (*CleanResponse) ProtoMessage ¶
func (*CleanResponse) ProtoMessage()
func (*CleanResponse) Reset ¶
func (m *CleanResponse) Reset()
func (*CleanResponse) String ¶
func (m *CleanResponse) String() string
type ComputeRequest ¶
type ComputeRequest struct {
D *DagParams `protobuf:"bytes,1,opt,name=d" json:"d,omitempty"`
}
func (*ComputeRequest) Descriptor ¶
func (*ComputeRequest) Descriptor() ([]byte, []int)
func (*ComputeRequest) GetD ¶
func (m *ComputeRequest) GetD() *DagParams
func (*ComputeRequest) ProtoMessage ¶
func (*ComputeRequest) ProtoMessage()
func (*ComputeRequest) Reset ¶
func (m *ComputeRequest) Reset()
func (*ComputeRequest) String ¶
func (m *ComputeRequest) String() string
type ComputeResponse ¶
type ComputeResponse struct {
Phi []byte `protobuf:"bytes,1,opt,name=phi,proto3" json:"phi,omitempty"`
}
func (*ComputeResponse) Descriptor ¶
func (*ComputeResponse) Descriptor() ([]byte, []int)
func (*ComputeResponse) GetPhi ¶
func (m *ComputeResponse) GetPhi() []byte
func (*ComputeResponse) ProtoMessage ¶
func (*ComputeResponse) ProtoMessage()
func (*ComputeResponse) Reset ¶
func (m *ComputeResponse) Reset()
func (*ComputeResponse) String ¶
func (m *ComputeResponse) String() string
type DagParams ¶
type DagParams struct { X []byte `protobuf:"bytes,1,opt,name=x,proto3" json:"x,omitempty"` N uint32 `protobuf:"varint,2,opt,name=n" json:"n,omitempty"` H string `protobuf:"bytes,3,opt,name=h" json:"h,omitempty"` }
func (*DagParams) Descriptor ¶
func (*DagParams) ProtoMessage ¶
func (*DagParams) ProtoMessage()
type GetNIPRequest ¶
type GetNIPRequest struct { }
func (*GetNIPRequest) Descriptor ¶
func (*GetNIPRequest) Descriptor() ([]byte, []int)
func (*GetNIPRequest) ProtoMessage ¶
func (*GetNIPRequest) ProtoMessage()
func (*GetNIPRequest) Reset ¶
func (m *GetNIPRequest) Reset()
func (*GetNIPRequest) String ¶
func (m *GetNIPRequest) String() string
type GetNIPResponse ¶
type GetNIPResponse struct {
Proof *Proof `protobuf:"bytes,1,opt,name=proof" json:"proof,omitempty"`
}
func (*GetNIPResponse) Descriptor ¶
func (*GetNIPResponse) Descriptor() ([]byte, []int)
func (*GetNIPResponse) GetProof ¶
func (m *GetNIPResponse) GetProof() *Proof
func (*GetNIPResponse) ProtoMessage ¶
func (*GetNIPResponse) ProtoMessage()
func (*GetNIPResponse) Reset ¶
func (m *GetNIPResponse) Reset()
func (*GetNIPResponse) String ¶
func (m *GetNIPResponse) String() string
type GetProofRequest ¶
type GetProofRequest struct {
C []string `protobuf:"bytes,1,rep,name=c" json:"c,omitempty"`
}
func (*GetProofRequest) Descriptor ¶
func (*GetProofRequest) Descriptor() ([]byte, []int)
func (*GetProofRequest) GetC ¶
func (m *GetProofRequest) GetC() []string
func (*GetProofRequest) ProtoMessage ¶
func (*GetProofRequest) ProtoMessage()
func (*GetProofRequest) Reset ¶
func (m *GetProofRequest) Reset()
func (*GetProofRequest) String ¶
func (m *GetProofRequest) String() string
type GetProofResponse ¶
type GetProofResponse struct {
Proof *Proof `protobuf:"bytes,1,opt,name=proof" json:"proof,omitempty"`
}
func (*GetProofResponse) Descriptor ¶
func (*GetProofResponse) Descriptor() ([]byte, []int)
func (*GetProofResponse) GetProof ¶
func (m *GetProofResponse) GetProof() *Proof
func (*GetProofResponse) ProtoMessage ¶
func (*GetProofResponse) ProtoMessage()
func (*GetProofResponse) Reset ¶
func (m *GetProofResponse) Reset()
func (*GetProofResponse) String ¶
func (m *GetProofResponse) String() string
type GetRndChallengeRequest ¶
type GetRndChallengeRequest struct {
D *DagParams `protobuf:"bytes,1,opt,name=d" json:"d,omitempty"`
}
func (*GetRndChallengeRequest) Descriptor ¶
func (*GetRndChallengeRequest) Descriptor() ([]byte, []int)
func (*GetRndChallengeRequest) GetD ¶
func (m *GetRndChallengeRequest) GetD() *DagParams
func (*GetRndChallengeRequest) ProtoMessage ¶
func (*GetRndChallengeRequest) ProtoMessage()
func (*GetRndChallengeRequest) Reset ¶
func (m *GetRndChallengeRequest) Reset()
func (*GetRndChallengeRequest) String ¶
func (m *GetRndChallengeRequest) String() string
type GetRndChallengeResponse ¶
type GetRndChallengeResponse struct {
C []string `protobuf:"bytes,3,rep,name=c" json:"c,omitempty"`
}
func (*GetRndChallengeResponse) Descriptor ¶
func (*GetRndChallengeResponse) Descriptor() ([]byte, []int)
func (*GetRndChallengeResponse) GetC ¶
func (m *GetRndChallengeResponse) GetC() []string
func (*GetRndChallengeResponse) ProtoMessage ¶
func (*GetRndChallengeResponse) ProtoMessage()
func (*GetRndChallengeResponse) Reset ¶
func (m *GetRndChallengeResponse) Reset()
func (*GetRndChallengeResponse) String ¶
func (m *GetRndChallengeResponse) String() string
type Labels ¶
type Labels struct {
Labels [][]byte `protobuf:"bytes,1,rep,name=labels,proto3" json:"labels,omitempty"`
}
func (*Labels) Descriptor ¶
func (*Labels) ProtoMessage ¶
func (*Labels) ProtoMessage()
type PoetCoreProverClient ¶
type PoetCoreProverClient interface { Compute(ctx context.Context, in *ComputeRequest, opts ...grpc.CallOption) (*ComputeResponse, error) GetNIP(ctx context.Context, in *GetNIPRequest, opts ...grpc.CallOption) (*GetNIPResponse, error) GetProof(ctx context.Context, in *GetProofRequest, opts ...grpc.CallOption) (*GetProofResponse, error) Clean(ctx context.Context, in *CleanRequest, opts ...grpc.CallOption) (*CleanResponse, error) Shutdown(ctx context.Context, in *ShutdownRequest, opts ...grpc.CallOption) (*ShutdownResponse, error) }
func NewPoetCoreProverClient ¶
func NewPoetCoreProverClient(cc *grpc.ClientConn) PoetCoreProverClient
type PoetCoreProverServer ¶
type PoetCoreProverServer interface { Compute(context.Context, *ComputeRequest) (*ComputeResponse, error) GetNIP(context.Context, *GetNIPRequest) (*GetNIPResponse, error) GetProof(context.Context, *GetProofRequest) (*GetProofResponse, error) Clean(context.Context, *CleanRequest) (*CleanResponse, error) Shutdown(context.Context, *ShutdownRequest) (*ShutdownResponse, error) }
type PoetVerifierClient ¶
type PoetVerifierClient interface { VerifyProof(ctx context.Context, in *VerifyProofRequest, opts ...grpc.CallOption) (*VerifyProofResponse, error) VerifyNIP(ctx context.Context, in *VerifyNIPRequest, opts ...grpc.CallOption) (*VerifyNIPResponse, error) GetRndChallenge(ctx context.Context, in *GetRndChallengeRequest, opts ...grpc.CallOption) (*GetRndChallengeResponse, error) }
func NewPoetVerifierClient ¶
func NewPoetVerifierClient(cc *grpc.ClientConn) PoetVerifierClient
type PoetVerifierServer ¶
type PoetVerifierServer interface { VerifyProof(context.Context, *VerifyProofRequest) (*VerifyProofResponse, error) VerifyNIP(context.Context, *VerifyNIPRequest) (*VerifyNIPResponse, error) GetRndChallenge(context.Context, *GetRndChallengeRequest) (*GetRndChallengeResponse, error) }
type Proof ¶
type Proof struct { Phi []byte `protobuf:"bytes,1,opt,name=phi,proto3" json:"phi,omitempty"` L []*Labels `protobuf:"bytes,2,rep,name=l" json:"l,omitempty"` }
func (*Proof) Descriptor ¶
func (*Proof) ProtoMessage ¶
func (*Proof) ProtoMessage()
type ShutdownRequest ¶
type ShutdownRequest struct { }
func (*ShutdownRequest) Descriptor ¶
func (*ShutdownRequest) Descriptor() ([]byte, []int)
func (*ShutdownRequest) ProtoMessage ¶
func (*ShutdownRequest) ProtoMessage()
func (*ShutdownRequest) Reset ¶
func (m *ShutdownRequest) Reset()
func (*ShutdownRequest) String ¶
func (m *ShutdownRequest) String() string
type ShutdownResponse ¶
type ShutdownResponse struct { }
func (*ShutdownResponse) Descriptor ¶
func (*ShutdownResponse) Descriptor() ([]byte, []int)
func (*ShutdownResponse) ProtoMessage ¶
func (*ShutdownResponse) ProtoMessage()
func (*ShutdownResponse) Reset ¶
func (m *ShutdownResponse) Reset()
func (*ShutdownResponse) String ¶
func (m *ShutdownResponse) String() string
type VerifyNIPRequest ¶
type VerifyNIPRequest struct { D *DagParams `protobuf:"bytes,1,opt,name=d" json:"d,omitempty"` P *Proof `protobuf:"bytes,2,opt,name=p" json:"p,omitempty"` }
func (*VerifyNIPRequest) Descriptor ¶
func (*VerifyNIPRequest) Descriptor() ([]byte, []int)
func (*VerifyNIPRequest) GetD ¶
func (m *VerifyNIPRequest) GetD() *DagParams
func (*VerifyNIPRequest) GetP ¶
func (m *VerifyNIPRequest) GetP() *Proof
func (*VerifyNIPRequest) ProtoMessage ¶
func (*VerifyNIPRequest) ProtoMessage()
func (*VerifyNIPRequest) Reset ¶
func (m *VerifyNIPRequest) Reset()
func (*VerifyNIPRequest) String ¶
func (m *VerifyNIPRequest) String() string
type VerifyNIPResponse ¶
type VerifyNIPResponse struct {
Verified bool `protobuf:"varint,1,opt,name=verified" json:"verified,omitempty"`
}
func (*VerifyNIPResponse) Descriptor ¶
func (*VerifyNIPResponse) Descriptor() ([]byte, []int)
func (*VerifyNIPResponse) GetVerified ¶
func (m *VerifyNIPResponse) GetVerified() bool
func (*VerifyNIPResponse) ProtoMessage ¶
func (*VerifyNIPResponse) ProtoMessage()
func (*VerifyNIPResponse) Reset ¶
func (m *VerifyNIPResponse) Reset()
func (*VerifyNIPResponse) String ¶
func (m *VerifyNIPResponse) String() string
type VerifyProofRequest ¶
type VerifyProofRequest struct { D *DagParams `protobuf:"bytes,1,opt,name=d" json:"d,omitempty"` P *Proof `protobuf:"bytes,2,opt,name=p" json:"p,omitempty"` C []string `protobuf:"bytes,3,rep,name=c" json:"c,omitempty"` }
func (*VerifyProofRequest) Descriptor ¶
func (*VerifyProofRequest) Descriptor() ([]byte, []int)
func (*VerifyProofRequest) GetC ¶
func (m *VerifyProofRequest) GetC() []string
func (*VerifyProofRequest) GetD ¶
func (m *VerifyProofRequest) GetD() *DagParams
func (*VerifyProofRequest) GetP ¶
func (m *VerifyProofRequest) GetP() *Proof
func (*VerifyProofRequest) ProtoMessage ¶
func (*VerifyProofRequest) ProtoMessage()
func (*VerifyProofRequest) Reset ¶
func (m *VerifyProofRequest) Reset()
func (*VerifyProofRequest) String ¶
func (m *VerifyProofRequest) String() string
type VerifyProofResponse ¶
type VerifyProofResponse struct {
Verified bool `protobuf:"varint,1,opt,name=verified" json:"verified,omitempty"`
}
func (*VerifyProofResponse) Descriptor ¶
func (*VerifyProofResponse) Descriptor() ([]byte, []int)
func (*VerifyProofResponse) GetVerified ¶
func (m *VerifyProofResponse) GetVerified() bool
func (*VerifyProofResponse) ProtoMessage ¶
func (*VerifyProofResponse) ProtoMessage()
func (*VerifyProofResponse) Reset ¶
func (m *VerifyProofResponse) Reset()
func (*VerifyProofResponse) String ¶
func (m *VerifyProofResponse) String() string