bitcoin

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Bitcoin_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "bitcoin",
	HandlerType: (*BitcoinServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GenerateToAddress",
			Handler:    _Bitcoin_GenerateToAddress_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "bitcoin_client.proto",
}

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

View Source
var File_bitcoin_client_proto protoreflect.FileDescriptor

Functions

func RegisterBitcoinServer

func RegisterBitcoinServer(s grpc.ServiceRegistrar, srv BitcoinServer)

Types

type BitcoinClient

type BitcoinClient interface {
	GenerateToAddress(ctx context.Context, in *GenerateToAddressRequest, opts ...grpc.CallOption) (*GenerateToAddressResponse, error)
}

BitcoinClient is the client API for Bitcoin 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 NewBitcoinClient

func NewBitcoinClient(cc grpc.ClientConnInterface) BitcoinClient

type BitcoinServer

type BitcoinServer interface {
	GenerateToAddress(context.Context, *GenerateToAddressRequest) (*GenerateToAddressResponse, error)
	// contains filtered or unexported methods
}

BitcoinServer is the server API for Bitcoin service. All implementations must embed UnimplementedBitcoinServer for forward compatibility

type GenerateToAddressRequest

type GenerateToAddressRequest struct {
	Address     string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	NumOfBlocks uint32 `protobuf:"varint,2,opt,name=numOfBlocks,proto3" json:"numOfBlocks,omitempty"`
	// contains filtered or unexported fields
}

func (*GenerateToAddressRequest) Descriptor deprecated

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

Deprecated: Use GenerateToAddressRequest.ProtoReflect.Descriptor instead.

func (*GenerateToAddressRequest) GetAddress

func (x *GenerateToAddressRequest) GetAddress() string

func (*GenerateToAddressRequest) GetNumOfBlocks

func (x *GenerateToAddressRequest) GetNumOfBlocks() uint32

func (*GenerateToAddressRequest) ProtoMessage

func (*GenerateToAddressRequest) ProtoMessage()

func (*GenerateToAddressRequest) ProtoReflect

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

func (*GenerateToAddressRequest) Reset

func (x *GenerateToAddressRequest) Reset()

func (*GenerateToAddressRequest) String

func (x *GenerateToAddressRequest) String() string

type GenerateToAddressResponse

type GenerateToAddressResponse struct {
	Hashes []string `protobuf:"bytes,1,rep,name=hashes,proto3" json:"hashes,omitempty"`
	// contains filtered or unexported fields
}

func (*GenerateToAddressResponse) Descriptor deprecated

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

Deprecated: Use GenerateToAddressResponse.ProtoReflect.Descriptor instead.

func (*GenerateToAddressResponse) GetHashes

func (x *GenerateToAddressResponse) GetHashes() []string

func (*GenerateToAddressResponse) ProtoMessage

func (*GenerateToAddressResponse) ProtoMessage()

func (*GenerateToAddressResponse) ProtoReflect

func (*GenerateToAddressResponse) Reset

func (x *GenerateToAddressResponse) Reset()

func (*GenerateToAddressResponse) String

func (x *GenerateToAddressResponse) String() string

type MockBitcoinClient added in v0.3.1

type MockBitcoinClient struct {
	mock.Mock
}

MockBitcoinClient is an autogenerated mock type for the BitcoinClient type

func NewMockBitcoinClient added in v0.3.1

func NewMockBitcoinClient(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockBitcoinClient

NewMockBitcoinClient creates a new instance of MockBitcoinClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockBitcoinClient) EXPECT added in v0.3.1

func (*MockBitcoinClient) GenerateToAddress added in v0.3.1

GenerateToAddress provides a mock function with given fields: ctx, in, opts

type MockBitcoinClient_Expecter added in v0.3.1

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

func (*MockBitcoinClient_Expecter) GenerateToAddress added in v0.3.1

func (_e *MockBitcoinClient_Expecter) GenerateToAddress(ctx interface{}, in interface{}, opts ...interface{}) *MockBitcoinClient_GenerateToAddress_Call

GenerateToAddress is a helper method to define mock.On call

  • ctx context.Context
  • in *GenerateToAddressRequest
  • opts ...grpc.CallOption

type MockBitcoinClient_GenerateToAddress_Call added in v0.3.1

type MockBitcoinClient_GenerateToAddress_Call struct {
	*mock.Call
}

MockBitcoinClient_GenerateToAddress_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GenerateToAddress'

func (*MockBitcoinClient_GenerateToAddress_Call) Return added in v0.3.1

func (*MockBitcoinClient_GenerateToAddress_Call) Run added in v0.3.1

func (*MockBitcoinClient_GenerateToAddress_Call) RunAndReturn added in v0.3.1

type UnimplementedBitcoinServer

type UnimplementedBitcoinServer struct {
}

UnimplementedBitcoinServer must be embedded to have forward compatible implementations.

type UnsafeBitcoinServer

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

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

Jump to

Keyboard shortcuts

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