Documentation ¶
Overview ¶
Package transactionv1 is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func RegisterTransactionServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterTransactionServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client TransactionServiceClient) error
- func RegisterTransactionServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterTransactionServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server TransactionServiceServer) error
- func RegisterTransactionServiceServer(s grpc.ServiceRegistrar, srv TransactionServiceServer)
- type SubmitRequest
- func (*SubmitRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SubmitRequest) GetContract() string
- func (x *SubmitRequest) GetFrom() string
- func (x *SubmitRequest) GetTransaction() *Transaction
- func (*SubmitRequest) ProtoMessage()
- func (x *SubmitRequest) ProtoReflect() protoreflect.Message
- func (x *SubmitRequest) Reset()
- func (x *SubmitRequest) String() string
- func (m *SubmitRequest) Validate() error
- func (m *SubmitRequest) ValidateAll() error
- type SubmitRequestMultiError
- type SubmitRequestValidationError
- func (e SubmitRequestValidationError) Cause() error
- func (e SubmitRequestValidationError) Error() string
- func (e SubmitRequestValidationError) ErrorName() string
- func (e SubmitRequestValidationError) Field() string
- func (e SubmitRequestValidationError) Key() bool
- func (e SubmitRequestValidationError) Reason() string
- type SubmitResponse
- func (*SubmitResponse) Descriptor() ([]byte, []int)deprecated
- func (x *SubmitResponse) GetHash() string
- func (x *SubmitResponse) GetRejectReason() string
- func (*SubmitResponse) ProtoMessage()
- func (x *SubmitResponse) ProtoReflect() protoreflect.Message
- func (x *SubmitResponse) Reset()
- func (x *SubmitResponse) String() string
- func (m *SubmitResponse) Validate() error
- func (m *SubmitResponse) ValidateAll() error
- type SubmitResponseMultiError
- type SubmitResponseValidationError
- func (e SubmitResponseValidationError) Cause() error
- func (e SubmitResponseValidationError) Error() string
- func (e SubmitResponseValidationError) ErrorName() string
- func (e SubmitResponseValidationError) Field() string
- func (e SubmitResponseValidationError) Key() bool
- func (e SubmitResponseValidationError) Reason() string
- type Transaction
- func (*Transaction) Descriptor() ([]byte, []int)deprecated
- func (*Transaction) ProtoMessage()
- func (x *Transaction) ProtoReflect() protoreflect.Message
- func (x *Transaction) Reset()
- func (x *Transaction) String() string
- func (m *Transaction) Validate() error
- func (m *Transaction) ValidateAll() error
- type TransactionMultiError
- type TransactionServiceClient
- type TransactionServiceServer
- type TransactionValidationError
- func (e TransactionValidationError) Cause() error
- func (e TransactionValidationError) Error() string
- func (e TransactionValidationError) ErrorName() string
- func (e TransactionValidationError) Field() string
- func (e TransactionValidationError) Key() bool
- func (e TransactionValidationError) Reason() string
- type UnimplementedTransactionServiceServer
- type UnsafeTransactionServiceServer
Constants ¶
const ( TransactionService_Ping_FullMethodName = "/transaction.v1.TransactionService/Ping" TransactionService_Submit_FullMethodName = "/transaction.v1.TransactionService/Submit" )
Variables ¶
var File_transaction_v1_transaction_proto protoreflect.FileDescriptor
var TransactionService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "transaction.v1.TransactionService", HandlerType: (*TransactionServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Ping", Handler: _TransactionService_Ping_Handler, }, { MethodName: "Submit", Handler: _TransactionService_Submit_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "transaction/v1/transaction.proto", }
TransactionService_ServiceDesc is the grpc.ServiceDesc for TransactionService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterTransactionServiceHandler ¶
func RegisterTransactionServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterTransactionServiceHandler registers the http handlers for service TransactionService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterTransactionServiceHandlerClient ¶
func RegisterTransactionServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client TransactionServiceClient) error
RegisterTransactionServiceHandlerClient registers the http handlers for service TransactionService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "TransactionServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "TransactionServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "TransactionServiceClient" to call the correct interceptors.
func RegisterTransactionServiceHandlerFromEndpoint ¶
func RegisterTransactionServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterTransactionServiceHandlerFromEndpoint is same as RegisterTransactionServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterTransactionServiceHandlerServer ¶
func RegisterTransactionServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server TransactionServiceServer) error
RegisterTransactionServiceHandlerServer registers the http handlers for service TransactionService to "mux". UnaryRPC :call TransactionServiceServer 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 RegisterTransactionServiceHandlerFromEndpoint instead.
func RegisterTransactionServiceServer ¶
func RegisterTransactionServiceServer(s grpc.ServiceRegistrar, srv TransactionServiceServer)
Types ¶
type SubmitRequest ¶
type SubmitRequest struct { From string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` Contract string `protobuf:"bytes,2,opt,name=contract,proto3" json:"contract,omitempty"` Transaction *Transaction `protobuf:"bytes,3,opt,name=transaction,proto3" json:"transaction,omitempty"` // contains filtered or unexported fields }
func (*SubmitRequest) Descriptor
deprecated
func (*SubmitRequest) Descriptor() ([]byte, []int)
Deprecated: Use SubmitRequest.ProtoReflect.Descriptor instead.
func (*SubmitRequest) GetContract ¶
func (x *SubmitRequest) GetContract() string
func (*SubmitRequest) GetFrom ¶
func (x *SubmitRequest) GetFrom() string
func (*SubmitRequest) GetTransaction ¶
func (x *SubmitRequest) GetTransaction() *Transaction
func (*SubmitRequest) ProtoMessage ¶
func (*SubmitRequest) ProtoMessage()
func (*SubmitRequest) ProtoReflect ¶
func (x *SubmitRequest) ProtoReflect() protoreflect.Message
func (*SubmitRequest) Reset ¶
func (x *SubmitRequest) Reset()
func (*SubmitRequest) String ¶
func (x *SubmitRequest) String() string
func (*SubmitRequest) Validate ¶
func (m *SubmitRequest) Validate() error
Validate checks the field values on SubmitRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*SubmitRequest) ValidateAll ¶
func (m *SubmitRequest) ValidateAll() error
ValidateAll checks the field values on SubmitRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in SubmitRequestMultiError, or nil if none found.
type SubmitRequestMultiError ¶
type SubmitRequestMultiError []error
SubmitRequestMultiError is an error wrapping multiple validation errors returned by SubmitRequest.ValidateAll() if the designated constraints aren't met.
func (SubmitRequestMultiError) AllErrors ¶
func (m SubmitRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (SubmitRequestMultiError) Error ¶
func (m SubmitRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type SubmitRequestValidationError ¶
type SubmitRequestValidationError struct {
// contains filtered or unexported fields
}
SubmitRequestValidationError is the validation error returned by SubmitRequest.Validate if the designated constraints aren't met.
func (SubmitRequestValidationError) Cause ¶
func (e SubmitRequestValidationError) Cause() error
Cause function returns cause value.
func (SubmitRequestValidationError) Error ¶
func (e SubmitRequestValidationError) Error() string
Error satisfies the builtin error interface
func (SubmitRequestValidationError) ErrorName ¶
func (e SubmitRequestValidationError) ErrorName() string
ErrorName returns error name.
func (SubmitRequestValidationError) Field ¶
func (e SubmitRequestValidationError) Field() string
Field function returns field value.
func (SubmitRequestValidationError) Key ¶
func (e SubmitRequestValidationError) Key() bool
Key function returns key value.
func (SubmitRequestValidationError) Reason ¶
func (e SubmitRequestValidationError) Reason() string
Reason function returns reason value.
type SubmitResponse ¶
type SubmitResponse struct { Hash *string `protobuf:"bytes,1,opt,name=hash,proto3,oneof" json:"hash,omitempty"` RejectReason *string `protobuf:"bytes,2,opt,name=reject_reason,json=rejectReason,proto3,oneof" json:"reject_reason,omitempty"` // contains filtered or unexported fields }
func (*SubmitResponse) Descriptor
deprecated
func (*SubmitResponse) Descriptor() ([]byte, []int)
Deprecated: Use SubmitResponse.ProtoReflect.Descriptor instead.
func (*SubmitResponse) GetHash ¶
func (x *SubmitResponse) GetHash() string
func (*SubmitResponse) GetRejectReason ¶
func (x *SubmitResponse) GetRejectReason() string
func (*SubmitResponse) ProtoMessage ¶
func (*SubmitResponse) ProtoMessage()
func (*SubmitResponse) ProtoReflect ¶
func (x *SubmitResponse) ProtoReflect() protoreflect.Message
func (*SubmitResponse) Reset ¶
func (x *SubmitResponse) Reset()
func (*SubmitResponse) String ¶
func (x *SubmitResponse) String() string
func (*SubmitResponse) Validate ¶
func (m *SubmitResponse) Validate() error
Validate checks the field values on SubmitResponse with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*SubmitResponse) ValidateAll ¶
func (m *SubmitResponse) ValidateAll() error
ValidateAll checks the field values on SubmitResponse with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in SubmitResponseMultiError, or nil if none found.
type SubmitResponseMultiError ¶
type SubmitResponseMultiError []error
SubmitResponseMultiError is an error wrapping multiple validation errors returned by SubmitResponse.ValidateAll() if the designated constraints aren't met.
func (SubmitResponseMultiError) AllErrors ¶
func (m SubmitResponseMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (SubmitResponseMultiError) Error ¶
func (m SubmitResponseMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type SubmitResponseValidationError ¶
type SubmitResponseValidationError struct {
// contains filtered or unexported fields
}
SubmitResponseValidationError is the validation error returned by SubmitResponse.Validate if the designated constraints aren't met.
func (SubmitResponseValidationError) Cause ¶
func (e SubmitResponseValidationError) Cause() error
Cause function returns cause value.
func (SubmitResponseValidationError) Error ¶
func (e SubmitResponseValidationError) Error() string
Error satisfies the builtin error interface
func (SubmitResponseValidationError) ErrorName ¶
func (e SubmitResponseValidationError) ErrorName() string
ErrorName returns error name.
func (SubmitResponseValidationError) Field ¶
func (e SubmitResponseValidationError) Field() string
Field function returns field value.
func (SubmitResponseValidationError) Key ¶
func (e SubmitResponseValidationError) Key() bool
Key function returns key value.
func (SubmitResponseValidationError) Reason ¶
func (e SubmitResponseValidationError) Reason() string
Reason function returns reason value.
type Transaction ¶
type Transaction struct {
// contains filtered or unexported fields
}
func (*Transaction) Descriptor
deprecated
func (*Transaction) Descriptor() ([]byte, []int)
Deprecated: Use Transaction.ProtoReflect.Descriptor instead.
func (*Transaction) ProtoMessage ¶
func (*Transaction) ProtoMessage()
func (*Transaction) ProtoReflect ¶
func (x *Transaction) ProtoReflect() protoreflect.Message
func (*Transaction) Reset ¶
func (x *Transaction) Reset()
func (*Transaction) String ¶
func (x *Transaction) String() string
func (*Transaction) Validate ¶
func (m *Transaction) Validate() error
Validate checks the field values on Transaction with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*Transaction) ValidateAll ¶
func (m *Transaction) ValidateAll() error
ValidateAll checks the field values on Transaction with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in TransactionMultiError, or nil if none found.
type TransactionMultiError ¶
type TransactionMultiError []error
TransactionMultiError is an error wrapping multiple validation errors returned by Transaction.ValidateAll() if the designated constraints aren't met.
func (TransactionMultiError) AllErrors ¶
func (m TransactionMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (TransactionMultiError) Error ¶
func (m TransactionMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type TransactionServiceClient ¶
type TransactionServiceClient interface { Ping(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*v1.BoolResponse, error) Submit(ctx context.Context, in *SubmitRequest, opts ...grpc.CallOption) (*SubmitResponse, error) }
TransactionServiceClient is the client API for TransactionService 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 NewTransactionServiceClient ¶
func NewTransactionServiceClient(cc grpc.ClientConnInterface) TransactionServiceClient
type TransactionServiceServer ¶
type TransactionServiceServer interface { Ping(context.Context, *emptypb.Empty) (*v1.BoolResponse, error) Submit(context.Context, *SubmitRequest) (*SubmitResponse, error) // contains filtered or unexported methods }
TransactionServiceServer is the server API for TransactionService service. All implementations must embed UnimplementedTransactionServiceServer for forward compatibility
type TransactionValidationError ¶
type TransactionValidationError struct {
// contains filtered or unexported fields
}
TransactionValidationError is the validation error returned by Transaction.Validate if the designated constraints aren't met.
func (TransactionValidationError) Cause ¶
func (e TransactionValidationError) Cause() error
Cause function returns cause value.
func (TransactionValidationError) Error ¶
func (e TransactionValidationError) Error() string
Error satisfies the builtin error interface
func (TransactionValidationError) ErrorName ¶
func (e TransactionValidationError) ErrorName() string
ErrorName returns error name.
func (TransactionValidationError) Field ¶
func (e TransactionValidationError) Field() string
Field function returns field value.
func (TransactionValidationError) Key ¶
func (e TransactionValidationError) Key() bool
Key function returns key value.
func (TransactionValidationError) Reason ¶
func (e TransactionValidationError) Reason() string
Reason function returns reason value.
type UnimplementedTransactionServiceServer ¶
type UnimplementedTransactionServiceServer struct { }
UnimplementedTransactionServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedTransactionServiceServer) Ping ¶
func (UnimplementedTransactionServiceServer) Ping(context.Context, *emptypb.Empty) (*v1.BoolResponse, error)
func (UnimplementedTransactionServiceServer) Submit ¶
func (UnimplementedTransactionServiceServer) Submit(context.Context, *SubmitRequest) (*SubmitResponse, error)
type UnsafeTransactionServiceServer ¶
type UnsafeTransactionServiceServer interface {
// contains filtered or unexported methods
}
UnsafeTransactionServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to TransactionServiceServer will result in compilation errors.