tapdevrpc

package
v0.3.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 7, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Package tapdevrpc is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var File_tapdevrpc_tapdev_proto protoreflect.FileDescriptor
View Source
var TapDev_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "tapdevrpc.TapDev",
	HandlerType: (*TapDevServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "ImportProof",
			Handler:    _TapDev_ImportProof_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "tapdevrpc/tapdev.proto",
}

TapDev_ServiceDesc is the grpc.ServiceDesc for TapDev service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterGrpcServer

func RegisterGrpcServer(_ *grpc.Server, _ TapDevServer)

func RegisterTapDevHandler

func RegisterTapDevHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterTapDevHandler registers the http handlers for service TapDev to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterTapDevHandlerClient

func RegisterTapDevHandlerClient(ctx context.Context, mux *runtime.ServeMux, client TapDevClient) error

RegisterTapDevHandlerClient registers the http handlers for service TapDev to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "TapDevClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "TapDevClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "TapDevClient" to call the correct interceptors.

func RegisterTapDevHandlerFromEndpoint

func RegisterTapDevHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterTapDevHandlerFromEndpoint is same as RegisterTapDevHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterTapDevHandlerServer

func RegisterTapDevHandlerServer(ctx context.Context, mux *runtime.ServeMux, server TapDevServer) error

RegisterTapDevHandlerServer registers the http handlers for service TapDev to "mux". UnaryRPC :call TapDevServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterTapDevHandlerFromEndpoint instead.

func RegisterTapDevServer

func RegisterTapDevServer(s grpc.ServiceRegistrar, srv TapDevServer)

Types

type ImportProofRequest

type ImportProofRequest struct {
	ProofFile    []byte `protobuf:"bytes,1,opt,name=proof_file,json=proofFile,proto3" json:"proof_file,omitempty"`
	GenesisPoint string `protobuf:"bytes,2,opt,name=genesis_point,json=genesisPoint,proto3" json:"genesis_point,omitempty"`
	// contains filtered or unexported fields
}

func (*ImportProofRequest) Descriptor deprecated

func (*ImportProofRequest) Descriptor() ([]byte, []int)

Deprecated: Use ImportProofRequest.ProtoReflect.Descriptor instead.

func (*ImportProofRequest) GetGenesisPoint

func (x *ImportProofRequest) GetGenesisPoint() string

func (*ImportProofRequest) GetProofFile

func (x *ImportProofRequest) GetProofFile() []byte

func (*ImportProofRequest) ProtoMessage

func (*ImportProofRequest) ProtoMessage()

func (*ImportProofRequest) ProtoReflect

func (x *ImportProofRequest) ProtoReflect() protoreflect.Message

func (*ImportProofRequest) Reset

func (x *ImportProofRequest) Reset()

func (*ImportProofRequest) String

func (x *ImportProofRequest) String() string

type ImportProofResponse

type ImportProofResponse struct {
	// contains filtered or unexported fields
}

func (*ImportProofResponse) Descriptor deprecated

func (*ImportProofResponse) Descriptor() ([]byte, []int)

Deprecated: Use ImportProofResponse.ProtoReflect.Descriptor instead.

func (*ImportProofResponse) ProtoMessage

func (*ImportProofResponse) ProtoMessage()

func (*ImportProofResponse) ProtoReflect

func (x *ImportProofResponse) ProtoReflect() protoreflect.Message

func (*ImportProofResponse) Reset

func (x *ImportProofResponse) Reset()

func (*ImportProofResponse) String

func (x *ImportProofResponse) String() string

type TapDevClient

type TapDevClient interface {
	// tapcli: `dev importproof`
	// ImportProof attempts to import a proof file into the daemon. If successful,
	// a new asset will be inserted on disk, spendable using the specified target
	// script key, and internal key.
	ImportProof(ctx context.Context, in *ImportProofRequest, opts ...grpc.CallOption) (*ImportProofResponse, error)
}

TapDevClient is the client API for TapDev 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 NewTapDevClient

func NewTapDevClient(cc grpc.ClientConnInterface) TapDevClient

type TapDevServer

type TapDevServer interface {
	// tapcli: `dev importproof`
	// ImportProof attempts to import a proof file into the daemon. If successful,
	// a new asset will be inserted on disk, spendable using the specified target
	// script key, and internal key.
	ImportProof(context.Context, *ImportProofRequest) (*ImportProofResponse, error)
	// contains filtered or unexported methods
}

TapDevServer is the server API for TapDev service. All implementations must embed UnimplementedTapDevServer for forward compatibility

type UnimplementedTapDevServer

type UnimplementedTapDevServer struct {
}

UnimplementedTapDevServer must be embedded to have forward compatible implementations.

func (UnimplementedTapDevServer) ImportProof

type UnsafeTapDevServer

type UnsafeTapDevServer interface {
	// contains filtered or unexported methods
}

UnsafeTapDevServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to TapDevServer will result in compilation errors.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL