transaction

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2020 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterTransactionServiceHandler

func RegisterTransactionServiceHandler(s server.Server, hdlr TransactionServiceHandler, opts ...server.HandlerOption) error

Types

type ReadRequest

type ReadRequest struct {
	Key                  string   `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ReadRequest) Descriptor

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

func (*ReadRequest) GetKey

func (m *ReadRequest) GetKey() string

func (*ReadRequest) ProtoMessage

func (*ReadRequest) ProtoMessage()

func (*ReadRequest) Reset

func (m *ReadRequest) Reset()

func (*ReadRequest) String

func (m *ReadRequest) String() string

func (*ReadRequest) Validate

func (m *ReadRequest) Validate() error

Validate is disabled for ReadRequest. This method will always return nil.

func (*ReadRequest) XXX_DiscardUnknown

func (m *ReadRequest) XXX_DiscardUnknown()

func (*ReadRequest) XXX_Marshal

func (m *ReadRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ReadRequest) XXX_Merge

func (m *ReadRequest) XXX_Merge(src proto.Message)

func (*ReadRequest) XXX_Size

func (m *ReadRequest) XXX_Size() int

func (*ReadRequest) XXX_Unmarshal

func (m *ReadRequest) XXX_Unmarshal(b []byte) error

type ReadRequestValidationError

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

ReadRequestValidationError is the validation error returned by ReadRequest.Validate if the designated constraints aren't met.

func (ReadRequestValidationError) Cause

Cause function returns cause value.

func (ReadRequestValidationError) Error

Error satisfies the builtin error interface

func (ReadRequestValidationError) ErrorName

func (e ReadRequestValidationError) ErrorName() string

ErrorName returns error name.

func (ReadRequestValidationError) Field

Field function returns field value.

func (ReadRequestValidationError) Key

Key function returns key value.

func (ReadRequestValidationError) Reason

Reason function returns reason value.

type TransactionEvent

type TransactionEvent struct {
	// request
	Req []byte `protobuf:"bytes,1,opt,name=req,proto3" json:"req,omitempty"`
	// responce
	Rsp                  []byte   `protobuf:"bytes,2,opt,name=rsp,proto3" json:"rsp,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Transaction Event

func (*TransactionEvent) Descriptor

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

func (*TransactionEvent) GetReq

func (m *TransactionEvent) GetReq() []byte

func (*TransactionEvent) GetRsp

func (m *TransactionEvent) GetRsp() []byte

func (*TransactionEvent) ProtoMessage

func (*TransactionEvent) ProtoMessage()

func (*TransactionEvent) Reset

func (m *TransactionEvent) Reset()

func (*TransactionEvent) String

func (m *TransactionEvent) String() string

func (*TransactionEvent) Validate

func (m *TransactionEvent) Validate() error

Validate checks the field values on TransactionEvent with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

func (*TransactionEvent) XXX_DiscardUnknown

func (m *TransactionEvent) XXX_DiscardUnknown()

func (*TransactionEvent) XXX_Marshal

func (m *TransactionEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*TransactionEvent) XXX_Merge

func (m *TransactionEvent) XXX_Merge(src proto.Message)

func (*TransactionEvent) XXX_Size

func (m *TransactionEvent) XXX_Size() int

func (*TransactionEvent) XXX_Unmarshal

func (m *TransactionEvent) XXX_Unmarshal(b []byte) error

type TransactionEventValidationError

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

TransactionEventValidationError is the validation error returned by TransactionEvent.Validate if the designated constraints aren't met.

func (TransactionEventValidationError) Cause

Cause function returns cause value.

func (TransactionEventValidationError) Error

Error satisfies the builtin error interface

func (TransactionEventValidationError) ErrorName

ErrorName returns error name.

func (TransactionEventValidationError) Field

Field function returns field value.

func (TransactionEventValidationError) Key

Key function returns key value.

func (TransactionEventValidationError) Reason

Reason function returns reason value.

type TransactionService

type TransactionService interface {
	Read(ctx context.Context, in *ReadRequest, opts ...client.CallOption) (*TransactionEvent, error)
	Write(ctx context.Context, in *WriteRequest, opts ...client.CallOption) (*empty.Empty, error)
}

func NewTransactionService

func NewTransactionService(name string, c client.Client) TransactionService

type TransactionServiceHandler

type TransactionServiceHandler interface {
	Read(context.Context, *ReadRequest, *TransactionEvent) error
	Write(context.Context, *WriteRequest, *empty.Empty) error
}

type WriteRequest

type WriteRequest struct {
	Key                  string            `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	Event                *TransactionEvent `protobuf:"bytes,2,opt,name=event,proto3" json:"event,omitempty"`
	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
	XXX_unrecognized     []byte            `json:"-"`
	XXX_sizecache        int32             `json:"-"`
}

func (*WriteRequest) Descriptor

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

func (*WriteRequest) GetEvent

func (m *WriteRequest) GetEvent() *TransactionEvent

func (*WriteRequest) GetKey

func (m *WriteRequest) GetKey() string

func (*WriteRequest) ProtoMessage

func (*WriteRequest) ProtoMessage()

func (*WriteRequest) Reset

func (m *WriteRequest) Reset()

func (*WriteRequest) String

func (m *WriteRequest) String() string

func (*WriteRequest) Validate

func (m *WriteRequest) Validate() error

Validate is disabled for WriteRequest. This method will always return nil.

func (*WriteRequest) XXX_DiscardUnknown

func (m *WriteRequest) XXX_DiscardUnknown()

func (*WriteRequest) XXX_Marshal

func (m *WriteRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*WriteRequest) XXX_Merge

func (m *WriteRequest) XXX_Merge(src proto.Message)

func (*WriteRequest) XXX_Size

func (m *WriteRequest) XXX_Size() int

func (*WriteRequest) XXX_Unmarshal

func (m *WriteRequest) XXX_Unmarshal(b []byte) error

type WriteRequestValidationError

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

WriteRequestValidationError is the validation error returned by WriteRequest.Validate if the designated constraints aren't met.

func (WriteRequestValidationError) Cause

Cause function returns cause value.

func (WriteRequestValidationError) Error

Error satisfies the builtin error interface

func (WriteRequestValidationError) ErrorName

func (e WriteRequestValidationError) ErrorName() string

ErrorName returns error name.

func (WriteRequestValidationError) Field

Field function returns field value.

func (WriteRequestValidationError) Key

Key function returns key value.

func (WriteRequestValidationError) Reason

Reason function returns reason value.

Jump to

Keyboard shortcuts

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