pb

package
v0.0.0-...-60fd75b Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2023 License: BSD-3-Clause Imports: 23 Imported by: 0

Documentation

Overview

Package pb is a generated protocol buffer package.

It is generated from these files:

bank.proto
cache.proto
timer.proto

It has these top-level messages:

DepositRequest
DepositReply
SetRequest
SetResponse
GetRequest
GetResponse
TickRequest
TickResponse

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthBank = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowBank   = fmt.Errorf("proto: integer overflow")
)
View Source
var (
	ErrInvalidLengthCache = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowCache   = fmt.Errorf("proto: integer overflow")
)
View Source
var (
	ErrInvalidLengthTimer = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTimer   = fmt.Errorf("proto: integer overflow")
)
View Source
var BankClientCommand = &cobra.Command{
	Use: "bank",
}
View Source
var CacheClientCommand = &cobra.Command{
	Use: "cache",
}
View Source
var TimerClientCommand = &cobra.Command{
	Use: "timer",
}

Functions

func RegisterBankServer

func RegisterBankServer(s *grpc.Server, srv BankServer)

func RegisterCacheServer

func RegisterCacheServer(s *grpc.Server, srv CacheServer)

func RegisterTimerServer

func RegisterTimerServer(s *grpc.Server, srv TimerServer)

Types

type BankClient

type BankClient interface {
	Deposit(ctx context.Context, in *DepositRequest, opts ...grpc.CallOption) (*DepositReply, error)
}

func NewBankClient

func NewBankClient(cc *grpc.ClientConn) BankClient

type BankServer

type BankServer interface {
	Deposit(context.Context, *DepositRequest) (*DepositReply, error)
}

type CacheClient

type CacheClient interface {
	Set(ctx context.Context, in *SetRequest, opts ...grpc.CallOption) (*SetResponse, error)
	Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error)
	MultiSet(ctx context.Context, opts ...grpc.CallOption) (Cache_MultiSetClient, error)
	MultiGet(ctx context.Context, opts ...grpc.CallOption) (Cache_MultiGetClient, error)
}

func NewCacheClient

func NewCacheClient(cc *grpc.ClientConn) CacheClient

type Cache_MultiGetClient

type Cache_MultiGetClient interface {
	Send(*GetRequest) error
	Recv() (*GetResponse, error)
	grpc.ClientStream
}

type Cache_MultiGetServer

type Cache_MultiGetServer interface {
	Send(*GetResponse) error
	Recv() (*GetRequest, error)
	grpc.ServerStream
}

type Cache_MultiSetClient

type Cache_MultiSetClient interface {
	Send(*SetRequest) error
	CloseAndRecv() (*SetResponse, error)
	grpc.ClientStream
}

type Cache_MultiSetServer

type Cache_MultiSetServer interface {
	SendAndClose(*SetResponse) error
	Recv() (*SetRequest, error)
	grpc.ServerStream
}

type DepositReply

type DepositReply struct {
	Account string  `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"`
	Balance float64 `protobuf:"fixed64,2,opt,name=balance,proto3" json:"balance,omitempty"`
}

func (*DepositReply) Descriptor

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

func (*DepositReply) Marshal

func (m *DepositReply) Marshal() (dAtA []byte, err error)

func (*DepositReply) MarshalTo

func (m *DepositReply) MarshalTo(dAtA []byte) (int, error)

func (*DepositReply) ProtoMessage

func (*DepositReply) ProtoMessage()

func (*DepositReply) Reset

func (m *DepositReply) Reset()

func (*DepositReply) Size

func (m *DepositReply) Size() (n int)

func (*DepositReply) String

func (m *DepositReply) String() string

func (*DepositReply) Unmarshal

func (m *DepositReply) Unmarshal(dAtA []byte) error

type DepositRequest

type DepositRequest struct {
	Account string  `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"`
	Amount  float64 `protobuf:"fixed64,2,opt,name=amount,proto3" json:"amount,omitempty"`
}

func (*DepositRequest) Descriptor

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

func (*DepositRequest) Marshal

func (m *DepositRequest) Marshal() (dAtA []byte, err error)

func (*DepositRequest) MarshalTo

func (m *DepositRequest) MarshalTo(dAtA []byte) (int, error)

func (*DepositRequest) ProtoMessage

func (*DepositRequest) ProtoMessage()

func (*DepositRequest) Reset

func (m *DepositRequest) Reset()

func (*DepositRequest) Size

func (m *DepositRequest) Size() (n int)

func (*DepositRequest) String

func (m *DepositRequest) String() string

func (*DepositRequest) Unmarshal

func (m *DepositRequest) Unmarshal(dAtA []byte) error

type GetRequest

type GetRequest struct {
	Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
}

func (*GetRequest) Descriptor

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

func (*GetRequest) Marshal

func (m *GetRequest) Marshal() (dAtA []byte, err error)

func (*GetRequest) MarshalTo

func (m *GetRequest) MarshalTo(dAtA []byte) (int, error)

func (*GetRequest) ProtoMessage

func (*GetRequest) ProtoMessage()

func (*GetRequest) Reset

func (m *GetRequest) Reset()

func (*GetRequest) Size

func (m *GetRequest) Size() (n int)

func (*GetRequest) String

func (m *GetRequest) String() string

func (*GetRequest) Unmarshal

func (m *GetRequest) Unmarshal(dAtA []byte) error

type GetResponse

type GetResponse struct {
	Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
}

func (*GetResponse) Descriptor

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

func (*GetResponse) Marshal

func (m *GetResponse) Marshal() (dAtA []byte, err error)

func (*GetResponse) MarshalTo

func (m *GetResponse) MarshalTo(dAtA []byte) (int, error)

func (*GetResponse) ProtoMessage

func (*GetResponse) ProtoMessage()

func (*GetResponse) Reset

func (m *GetResponse) Reset()

func (*GetResponse) Size

func (m *GetResponse) Size() (n int)

func (*GetResponse) String

func (m *GetResponse) String() string

func (*GetResponse) Unmarshal

func (m *GetResponse) Unmarshal(dAtA []byte) error

type SetRequest

type SetRequest struct {
	Key   string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
}

func (*SetRequest) Descriptor

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

func (*SetRequest) Marshal

func (m *SetRequest) Marshal() (dAtA []byte, err error)

func (*SetRequest) MarshalTo

func (m *SetRequest) MarshalTo(dAtA []byte) (int, error)

func (*SetRequest) ProtoMessage

func (*SetRequest) ProtoMessage()

func (*SetRequest) Reset

func (m *SetRequest) Reset()

func (*SetRequest) Size

func (m *SetRequest) Size() (n int)

func (*SetRequest) String

func (m *SetRequest) String() string

func (*SetRequest) Unmarshal

func (m *SetRequest) Unmarshal(dAtA []byte) error

type SetResponse

type SetResponse struct {
}

func (*SetResponse) Descriptor

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

func (*SetResponse) Marshal

func (m *SetResponse) Marshal() (dAtA []byte, err error)

func (*SetResponse) MarshalTo

func (m *SetResponse) MarshalTo(dAtA []byte) (int, error)

func (*SetResponse) ProtoMessage

func (*SetResponse) ProtoMessage()

func (*SetResponse) Reset

func (m *SetResponse) Reset()

func (*SetResponse) Size

func (m *SetResponse) Size() (n int)

func (*SetResponse) String

func (m *SetResponse) String() string

func (*SetResponse) Unmarshal

func (m *SetResponse) Unmarshal(dAtA []byte) error

type TickRequest

type TickRequest struct {
	Interval int32 `protobuf:"varint,1,opt,name=interval,proto3" json:"interval,omitempty"`
}

func (*TickRequest) Descriptor

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

func (*TickRequest) Marshal

func (m *TickRequest) Marshal() (dAtA []byte, err error)

func (*TickRequest) MarshalTo

func (m *TickRequest) MarshalTo(dAtA []byte) (int, error)

func (*TickRequest) ProtoMessage

func (*TickRequest) ProtoMessage()

func (*TickRequest) Reset

func (m *TickRequest) Reset()

func (*TickRequest) Size

func (m *TickRequest) Size() (n int)

func (*TickRequest) String

func (m *TickRequest) String() string

func (*TickRequest) Unmarshal

func (m *TickRequest) Unmarshal(dAtA []byte) error

type TickResponse

type TickResponse struct {
	Time string `protobuf:"bytes,1,opt,name=time,proto3" json:"time,omitempty"`
}

func (*TickResponse) Descriptor

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

func (*TickResponse) Marshal

func (m *TickResponse) Marshal() (dAtA []byte, err error)

func (*TickResponse) MarshalTo

func (m *TickResponse) MarshalTo(dAtA []byte) (int, error)

func (*TickResponse) ProtoMessage

func (*TickResponse) ProtoMessage()

func (*TickResponse) Reset

func (m *TickResponse) Reset()

func (*TickResponse) Size

func (m *TickResponse) Size() (n int)

func (*TickResponse) String

func (m *TickResponse) String() string

func (*TickResponse) Unmarshal

func (m *TickResponse) Unmarshal(dAtA []byte) error

type TimerClient

type TimerClient interface {
	Tick(ctx context.Context, in *TickRequest, opts ...grpc.CallOption) (Timer_TickClient, error)
}

func NewTimerClient

func NewTimerClient(cc *grpc.ClientConn) TimerClient

type TimerServer

type TimerServer interface {
	Tick(*TickRequest, Timer_TickServer) error
}

type Timer_TickClient

type Timer_TickClient interface {
	Recv() (*TickResponse, error)
	grpc.ClientStream
}

type Timer_TickServer

type Timer_TickServer interface {
	Send(*TickResponse) error
	grpc.ServerStream
}

Jump to

Keyboard shortcuts

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