bank

package
Version: v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Account_Type_name = map[int32]string{
		0: "UNKNOWN",
		1: "CHECKING",
		2: "SAVING",
		3: "MONEY_MARKET",
		4: "LINE_OF_CREDIT",
		5: "LOAN",
		6: "EQUITIES",
	}
	Account_Type_value = map[string]int32{
		"UNKNOWN":        0,
		"CHECKING":       1,
		"SAVING":         2,
		"MONEY_MARKET":   3,
		"LINE_OF_CREDIT": 4,
		"LOAN":           5,
		"EQUITIES":       6,
	}
)

Enum value maps for Account_Type.

View Source
var (
	DepositRequest_Source_name = map[int32]string{
		0: "UNKNOWN",
		1: "CASH",
		2: "CHECK",
		3: "ACH",
		4: "WIRE",
	}
	DepositRequest_Source_value = map[string]int32{
		"UNKNOWN": 0,
		"CASH":    1,
		"CHECK":   2,
		"ACH":     3,
		"WIRE":    4,
	}
)

Enum value maps for DepositRequest_Source.

View Source
var (
	Void_name = map[int32]string{
		0: "VOID",
	}
	Void_value = map[string]int32{
		"VOID": 0,
	}
)

Enum value maps for Void.

View Source
var Bank_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "bank.Bank",
	HandlerType: (*BankServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "OpenAccount",
			Handler:    _Bank_OpenAccount_Handler,
		},
		{
			MethodName: "CloseAccount",
			Handler:    _Bank_CloseAccount_Handler,
		},
		{
			MethodName: "GetAccounts",
			Handler:    _Bank_GetAccounts_Handler,
		},
		{
			MethodName: "Deposit",
			Handler:    _Bank_Deposit_Handler,
		},
		{
			MethodName: "Withdraw",
			Handler:    _Bank_Withdraw_Handler,
		},
		{
			MethodName: "Transfer",
			Handler:    _Bank_Transfer_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "GetTransactions",
			Handler:       _Bank_GetTransactions_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "bank/bank.proto",
}

Bank_ServiceDesc is the grpc.ServiceDesc for Bank 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_bank_bank_proto protoreflect.FileDescriptor
View Source
var File_bank_support_proto protoreflect.FileDescriptor
View Source
var Support_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "bank.Support",
	HandlerType: (*SupportServer)(nil),
	Methods:     []grpc.MethodDesc{},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "ChatCustomer",
			Handler:       _Support_ChatCustomer_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
		{
			StreamName:    "ChatAgent",
			Handler:       _Support_ChatAgent_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
	},
	Metadata: "bank/support.proto",
}

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

Functions

func RegisterBankServer

func RegisterBankServer(s grpc.ServiceRegistrar, srv BankServer)

func RegisterSupportServer

func RegisterSupportServer(s grpc.ServiceRegistrar, srv SupportServer)

Types

type AcceptChat

type AcceptChat struct {
	SessionId string `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"`
	// contains filtered or unexported fields
}

func (*AcceptChat) Descriptor deprecated

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

Deprecated: Use AcceptChat.ProtoReflect.Descriptor instead.

func (*AcceptChat) GetSessionId

func (x *AcceptChat) GetSessionId() string

func (*AcceptChat) ProtoMessage

func (*AcceptChat) ProtoMessage()

func (*AcceptChat) ProtoReflect

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

func (*AcceptChat) Reset

func (x *AcceptChat) Reset()

func (*AcceptChat) String

func (x *AcceptChat) String() string

type Account

type Account struct {
	AccountNumber uint64       `protobuf:"varint,1,opt,name=account_number,json=accountNumber,proto3" json:"account_number,omitempty"`
	Type          Account_Type `protobuf:"varint,2,opt,name=type,proto3,enum=bank.Account_Type" json:"type,omitempty"`
	BalanceCents  int32        `protobuf:"varint,3,opt,name=balance_cents,json=balanceCents,proto3" json:"balance_cents,omitempty"`
	// contains filtered or unexported fields
}

func (*Account) Descriptor deprecated

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

Deprecated: Use Account.ProtoReflect.Descriptor instead.

func (*Account) GetAccountNumber

func (x *Account) GetAccountNumber() uint64

func (*Account) GetBalanceCents

func (x *Account) GetBalanceCents() int32

func (*Account) GetType

func (x *Account) GetType() Account_Type

func (*Account) ProtoMessage

func (*Account) ProtoMessage()

func (*Account) ProtoReflect

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

func (*Account) Reset

func (x *Account) Reset()

func (*Account) String

func (x *Account) String() string

type Account_Type

type Account_Type int32
const (
	Account_UNKNOWN        Account_Type = 0
	Account_CHECKING       Account_Type = 1
	Account_SAVING         Account_Type = 2
	Account_MONEY_MARKET   Account_Type = 3
	Account_LINE_OF_CREDIT Account_Type = 4
	Account_LOAN           Account_Type = 5
	Account_EQUITIES       Account_Type = 6
)

func (Account_Type) Descriptor

func (Account_Type) Enum

func (x Account_Type) Enum() *Account_Type

func (Account_Type) EnumDescriptor deprecated

func (Account_Type) EnumDescriptor() ([]byte, []int)

Deprecated: Use Account_Type.Descriptor instead.

func (Account_Type) Number

func (Account_Type) String

func (x Account_Type) String() string

func (Account_Type) Type

type AgentMessage

type AgentMessage struct {
	AgentName string `protobuf:"bytes,1,opt,name=agent_name,json=agentName,proto3" json:"agent_name,omitempty"`
	Msg       string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"`
	// contains filtered or unexported fields
}

func (*AgentMessage) Descriptor deprecated

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

Deprecated: Use AgentMessage.ProtoReflect.Descriptor instead.

func (*AgentMessage) GetAgentName

func (x *AgentMessage) GetAgentName() string

func (*AgentMessage) GetMsg

func (x *AgentMessage) GetMsg() string

func (*AgentMessage) ProtoMessage

func (*AgentMessage) ProtoMessage()

func (*AgentMessage) ProtoReflect

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

func (*AgentMessage) Reset

func (x *AgentMessage) Reset()

func (*AgentMessage) String

func (x *AgentMessage) String() string

type BalanceResponse

type BalanceResponse struct {
	AccountNumber uint64 `protobuf:"varint,1,opt,name=account_number,json=accountNumber,proto3" json:"account_number,omitempty"`
	BalanceCents  int32  `protobuf:"varint,2,opt,name=balance_cents,json=balanceCents,proto3" json:"balance_cents,omitempty"`
	// contains filtered or unexported fields
}

func (*BalanceResponse) Descriptor deprecated

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

Deprecated: Use BalanceResponse.ProtoReflect.Descriptor instead.

func (*BalanceResponse) GetAccountNumber

func (x *BalanceResponse) GetAccountNumber() uint64

func (*BalanceResponse) GetBalanceCents

func (x *BalanceResponse) GetBalanceCents() int32

func (*BalanceResponse) ProtoMessage

func (*BalanceResponse) ProtoMessage()

func (*BalanceResponse) ProtoReflect

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

func (*BalanceResponse) Reset

func (x *BalanceResponse) Reset()

func (*BalanceResponse) String

func (x *BalanceResponse) String() string

type BankClient

type BankClient interface {
	// OpenAccount creates an account with the type and given initial deposit
	// as its balance.
	OpenAccount(ctx context.Context, in *OpenAccountRequest, opts ...grpc.CallOption) (*Account, error)
	// CloseAccount closes the indicated account. An account can only be
	// closed if its balance is zero.
	CloseAccount(ctx context.Context, in *CloseAccountRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// GetAccounts lists all accounts for the current customer.
	GetAccounts(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetAccountsResponse, error)
	// GetTransactions streams all transactions that match the given criteria.
	// If the given start date is not specified, transactions since beginning
	// of time are included. Similarly, if the given end date is not specified,
	// transactions all the way to the presnet are included.
	GetTransactions(ctx context.Context, in *GetTransactionsRequest, opts ...grpc.CallOption) (Bank_GetTransactionsClient, error)
	// Deposit increases the balance of an account by depositing funds into it.
	Deposit(ctx context.Context, in *DepositRequest, opts ...grpc.CallOption) (*BalanceResponse, error)
	// Withdraw decreases the balance of an account by withdrawing funds from it.
	Withdraw(ctx context.Context, in *WithdrawRequest, opts ...grpc.CallOption) (*BalanceResponse, error)
	// Transfer moves money from one account to another. The source and destination
	// accounts can be with this bank (e.g. "local" account numbers) or can be
	// external accounts, identified by their ACH routing and account numbers.
	Transfer(ctx context.Context, in *TransferRequest, opts ...grpc.CallOption) (*TransferResponse, error)
}

BankClient is the client API for Bank 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 NewBankClient

func NewBankClient(cc grpc.ClientConnInterface) BankClient

type BankServer

type BankServer interface {
	// OpenAccount creates an account with the type and given initial deposit
	// as its balance.
	OpenAccount(context.Context, *OpenAccountRequest) (*Account, error)
	// CloseAccount closes the indicated account. An account can only be
	// closed if its balance is zero.
	CloseAccount(context.Context, *CloseAccountRequest) (*emptypb.Empty, error)
	// GetAccounts lists all accounts for the current customer.
	GetAccounts(context.Context, *emptypb.Empty) (*GetAccountsResponse, error)
	// GetTransactions streams all transactions that match the given criteria.
	// If the given start date is not specified, transactions since beginning
	// of time are included. Similarly, if the given end date is not specified,
	// transactions all the way to the presnet are included.
	GetTransactions(*GetTransactionsRequest, Bank_GetTransactionsServer) error
	// Deposit increases the balance of an account by depositing funds into it.
	Deposit(context.Context, *DepositRequest) (*BalanceResponse, error)
	// Withdraw decreases the balance of an account by withdrawing funds from it.
	Withdraw(context.Context, *WithdrawRequest) (*BalanceResponse, error)
	// Transfer moves money from one account to another. The source and destination
	// accounts can be with this bank (e.g. "local" account numbers) or can be
	// external accounts, identified by their ACH routing and account numbers.
	Transfer(context.Context, *TransferRequest) (*TransferResponse, error)
	// contains filtered or unexported methods
}

BankServer is the server API for Bank service. All implementations must embed UnimplementedBankServer for forward compatibility

type Bank_GetTransactionsClient

type Bank_GetTransactionsClient interface {
	Recv() (*Transaction, error)
	grpc.ClientStream
}

type Bank_GetTransactionsServer

type Bank_GetTransactionsServer interface {
	Send(*Transaction) error
	grpc.ServerStream
}

type ChatAgentRequest

type ChatAgentRequest struct {

	// Types that are assignable to Req:
	//	*ChatAgentRequest_Accept
	//	*ChatAgentRequest_Msg
	//	*ChatAgentRequest_LeaveSession
	Req isChatAgentRequest_Req `protobuf_oneof:"req"`
	// contains filtered or unexported fields
}

func (*ChatAgentRequest) Descriptor deprecated

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

Deprecated: Use ChatAgentRequest.ProtoReflect.Descriptor instead.

func (*ChatAgentRequest) GetAccept

func (x *ChatAgentRequest) GetAccept() *AcceptChat

func (*ChatAgentRequest) GetLeaveSession

func (x *ChatAgentRequest) GetLeaveSession() Void

func (*ChatAgentRequest) GetMsg

func (x *ChatAgentRequest) GetMsg() string

func (*ChatAgentRequest) GetReq

func (m *ChatAgentRequest) GetReq() isChatAgentRequest_Req

func (*ChatAgentRequest) ProtoMessage

func (*ChatAgentRequest) ProtoMessage()

func (*ChatAgentRequest) ProtoReflect

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

func (*ChatAgentRequest) Reset

func (x *ChatAgentRequest) Reset()

func (*ChatAgentRequest) String

func (x *ChatAgentRequest) String() string

type ChatAgentRequest_Accept

type ChatAgentRequest_Accept struct {
	// accept is used when an agent wants to join a customer chat
	// session. It can be used to connect to a specific session (by
	// ID), or to just accept the session for which the customer has
	// been waiting the longest (e.g. poll a FIFO queue of sessions
	// awaiting a support agent). It is possible for multiple agents
	// to be connected to the same chat session.
	Accept *AcceptChat `protobuf:"bytes,1,opt,name=accept,proto3,oneof"`
}

type ChatAgentRequest_LeaveSession

type ChatAgentRequest_LeaveSession struct {
	// leave_session allows an agent to exit a chat session. They can
	// always re-enter later by sending an accept message for that
	// session ID.
	LeaveSession Void `protobuf:"varint,3,opt,name=leave_session,json=leaveSession,proto3,enum=bank.Void,oneof"`
}

type ChatAgentRequest_Msg

type ChatAgentRequest_Msg struct {
	// msg is used to send a message to the customer. It will also be
	// delivered to any other connected support agents.
	Msg string `protobuf:"bytes,2,opt,name=msg,proto3,oneof"`
}

type ChatAgentResponse

type ChatAgentResponse struct {

	// Types that are assignable to Resp:
	//	*ChatAgentResponse_AcceptedSession
	//	*ChatAgentResponse_Msg
	//	*ChatAgentResponse_SessionEnded
	Resp isChatAgentResponse_Resp `protobuf_oneof:"resp"`
	// contains filtered or unexported fields
}

func (*ChatAgentResponse) Descriptor deprecated

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

Deprecated: Use ChatAgentResponse.ProtoReflect.Descriptor instead.

func (*ChatAgentResponse) GetAcceptedSession

func (x *ChatAgentResponse) GetAcceptedSession() *Session

func (*ChatAgentResponse) GetMsg

func (x *ChatAgentResponse) GetMsg() *ChatEntry

func (*ChatAgentResponse) GetResp

func (m *ChatAgentResponse) GetResp() isChatAgentResponse_Resp

func (*ChatAgentResponse) GetSessionEnded

func (x *ChatAgentResponse) GetSessionEnded() Void

func (*ChatAgentResponse) ProtoMessage

func (*ChatAgentResponse) ProtoMessage()

func (*ChatAgentResponse) ProtoReflect

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

func (*ChatAgentResponse) Reset

func (x *ChatAgentResponse) Reset()

func (*ChatAgentResponse) String

func (x *ChatAgentResponse) String() string

type ChatAgentResponse_AcceptedSession

type ChatAgentResponse_AcceptedSession struct {
	// accepted_session provides the detail of a chat session. The server
	// sends this message after the agent has accepted a chat session.
	AcceptedSession *Session `protobuf:"bytes,1,opt,name=accepted_session,json=acceptedSession,proto3,oneof"`
}

type ChatAgentResponse_Msg

type ChatAgentResponse_Msg struct {
	// msg is sent by the server when the customer, or another support
	// agent, sends a message in stream's current session.
	Msg *ChatEntry `protobuf:"bytes,2,opt,name=msg,proto3,oneof"`
}

type ChatAgentResponse_SessionEnded

type ChatAgentResponse_SessionEnded struct {
	// session_ended notifies the support agent that their currently
	// connected chat session has been terminated by the customer.
	SessionEnded Void `protobuf:"varint,3,opt,name=session_ended,json=sessionEnded,proto3,enum=bank.Void,oneof"`
}

type ChatCustomerRequest

type ChatCustomerRequest struct {

	// Types that are assignable to Req:
	//	*ChatCustomerRequest_Init
	//	*ChatCustomerRequest_Msg
	//	*ChatCustomerRequest_HangUp
	Req isChatCustomerRequest_Req `protobuf_oneof:"req"`
	// contains filtered or unexported fields
}

func (*ChatCustomerRequest) Descriptor deprecated

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

Deprecated: Use ChatCustomerRequest.ProtoReflect.Descriptor instead.

func (*ChatCustomerRequest) GetHangUp

func (x *ChatCustomerRequest) GetHangUp() Void

func (*ChatCustomerRequest) GetInit

func (x *ChatCustomerRequest) GetInit() *InitiateChat

func (*ChatCustomerRequest) GetMsg

func (x *ChatCustomerRequest) GetMsg() string

func (*ChatCustomerRequest) GetReq

func (m *ChatCustomerRequest) GetReq() isChatCustomerRequest_Req

func (*ChatCustomerRequest) ProtoMessage

func (*ChatCustomerRequest) ProtoMessage()

func (*ChatCustomerRequest) ProtoReflect

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

func (*ChatCustomerRequest) Reset

func (x *ChatCustomerRequest) Reset()

func (*ChatCustomerRequest) String

func (x *ChatCustomerRequest) String() string

type ChatCustomerRequest_HangUp

type ChatCustomerRequest_HangUp struct {
	// hang_up is used to terminate a chat session. If a stream
	// is broken, but the session was not terminated, the client
	// may initiate a new stream and use init to resume that
	// session. Sessions are not terminated unless done so
	// explicitly via sending this kind of request on the stream.
	HangUp Void `protobuf:"varint,3,opt,name=hang_up,json=hangUp,proto3,enum=bank.Void,oneof"`
}

type ChatCustomerRequest_Init

type ChatCustomerRequest_Init struct {
	// init is used when a chat stream is not part of a
	// chat session. This is a stream's initial state, as well as
	// the state after a "hang_up" request is sent. This creates
	// a new state session or resumes an existing one.
	Init *InitiateChat `protobuf:"bytes,1,opt,name=init,proto3,oneof"`
}

type ChatCustomerRequest_Msg

type ChatCustomerRequest_Msg struct {
	// msg is used to send the customer's messages to support
	// agents.
	Msg string `protobuf:"bytes,2,opt,name=msg,proto3,oneof"`
}

type ChatCustomerResponse

type ChatCustomerResponse struct {

	// Types that are assignable to Resp:
	//	*ChatCustomerResponse_Session
	//	*ChatCustomerResponse_Msg
	Resp isChatCustomerResponse_Resp `protobuf_oneof:"resp"`
	// contains filtered or unexported fields
}

func (*ChatCustomerResponse) Descriptor deprecated

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

Deprecated: Use ChatCustomerResponse.ProtoReflect.Descriptor instead.

func (*ChatCustomerResponse) GetMsg

func (x *ChatCustomerResponse) GetMsg() *AgentMessage

func (*ChatCustomerResponse) GetResp

func (m *ChatCustomerResponse) GetResp() isChatCustomerResponse_Resp

func (*ChatCustomerResponse) GetSession

func (x *ChatCustomerResponse) GetSession() *Session

func (*ChatCustomerResponse) ProtoMessage

func (*ChatCustomerResponse) ProtoMessage()

func (*ChatCustomerResponse) ProtoReflect

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

func (*ChatCustomerResponse) Reset

func (x *ChatCustomerResponse) Reset()

func (*ChatCustomerResponse) String

func (x *ChatCustomerResponse) String() string

type ChatCustomerResponse_Msg

type ChatCustomerResponse_Msg struct {
	// msg is sent from the server to convey agents' messages to the
	// customer.
	Msg *AgentMessage `protobuf:"bytes,2,opt,name=msg,proto3,oneof"`
}

type ChatCustomerResponse_Session

type ChatCustomerResponse_Session struct {
	// session is sent from the server when the stream is connected
	// to a chat session. This happens after an init request is sent
	// and the stream is connected to either a new or resumed session.
	Session *Session `protobuf:"bytes,1,opt,name=session,proto3,oneof"`
}

type ChatEntry

type ChatEntry struct {
	Date *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=date,proto3" json:"date,omitempty"`
	// Types that are assignable to Entry:
	//	*ChatEntry_CustomerMsg
	//	*ChatEntry_AgentMsg
	Entry isChatEntry_Entry `protobuf_oneof:"entry"`
	// contains filtered or unexported fields
}

func (*ChatEntry) Descriptor deprecated

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

Deprecated: Use ChatEntry.ProtoReflect.Descriptor instead.

func (*ChatEntry) GetAgentMsg

func (x *ChatEntry) GetAgentMsg() *AgentMessage

func (*ChatEntry) GetCustomerMsg

func (x *ChatEntry) GetCustomerMsg() string

func (*ChatEntry) GetDate

func (x *ChatEntry) GetDate() *timestamppb.Timestamp

func (*ChatEntry) GetEntry

func (m *ChatEntry) GetEntry() isChatEntry_Entry

func (*ChatEntry) ProtoMessage

func (*ChatEntry) ProtoMessage()

func (*ChatEntry) ProtoReflect

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

func (*ChatEntry) Reset

func (x *ChatEntry) Reset()

func (*ChatEntry) String

func (x *ChatEntry) String() string

type ChatEntry_AgentMsg

type ChatEntry_AgentMsg struct {
	AgentMsg *AgentMessage `protobuf:"bytes,3,opt,name=agent_msg,json=agentMsg,proto3,oneof"`
}

type ChatEntry_CustomerMsg

type ChatEntry_CustomerMsg struct {
	CustomerMsg string `protobuf:"bytes,2,opt,name=customer_msg,json=customerMsg,proto3,oneof"`
}

type CloseAccountRequest

type CloseAccountRequest struct {
	AccountNumber uint64 `protobuf:"varint,1,opt,name=account_number,json=accountNumber,proto3" json:"account_number,omitempty"`
	// contains filtered or unexported fields
}

func (*CloseAccountRequest) Descriptor deprecated

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

Deprecated: Use CloseAccountRequest.ProtoReflect.Descriptor instead.

func (*CloseAccountRequest) GetAccountNumber

func (x *CloseAccountRequest) GetAccountNumber() uint64

func (*CloseAccountRequest) ProtoMessage

func (*CloseAccountRequest) ProtoMessage()

func (*CloseAccountRequest) ProtoReflect

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

func (*CloseAccountRequest) Reset

func (x *CloseAccountRequest) Reset()

func (*CloseAccountRequest) String

func (x *CloseAccountRequest) String() string

type DepositRequest

type DepositRequest struct {
	AccountNumber uint64                `protobuf:"varint,1,opt,name=account_number,json=accountNumber,proto3" json:"account_number,omitempty"`
	AmountCents   int32                 `protobuf:"varint,2,opt,name=amount_cents,json=amountCents,proto3" json:"amount_cents,omitempty"`
	Source        DepositRequest_Source `protobuf:"varint,3,opt,name=source,proto3,enum=bank.DepositRequest_Source" json:"source,omitempty"`
	Desc          string                `protobuf:"bytes,4,opt,name=desc,proto3" json:"desc,omitempty"`
	// contains filtered or unexported fields
}

func (*DepositRequest) Descriptor deprecated

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

Deprecated: Use DepositRequest.ProtoReflect.Descriptor instead.

func (*DepositRequest) GetAccountNumber

func (x *DepositRequest) GetAccountNumber() uint64

func (*DepositRequest) GetAmountCents

func (x *DepositRequest) GetAmountCents() int32

func (*DepositRequest) GetDesc

func (x *DepositRequest) GetDesc() string

func (*DepositRequest) GetSource

func (x *DepositRequest) GetSource() DepositRequest_Source

func (*DepositRequest) ProtoMessage

func (*DepositRequest) ProtoMessage()

func (*DepositRequest) ProtoReflect

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

func (*DepositRequest) Reset

func (x *DepositRequest) Reset()

func (*DepositRequest) String

func (x *DepositRequest) String() string

type DepositRequest_Source

type DepositRequest_Source int32
const (
	DepositRequest_UNKNOWN DepositRequest_Source = 0
	DepositRequest_CASH    DepositRequest_Source = 1
	DepositRequest_CHECK   DepositRequest_Source = 2
	DepositRequest_ACH     DepositRequest_Source = 3
	DepositRequest_WIRE    DepositRequest_Source = 4
)

func (DepositRequest_Source) Descriptor

func (DepositRequest_Source) Enum

func (DepositRequest_Source) EnumDescriptor deprecated

func (DepositRequest_Source) EnumDescriptor() ([]byte, []int)

Deprecated: Use DepositRequest_Source.Descriptor instead.

func (DepositRequest_Source) Number

func (DepositRequest_Source) String

func (x DepositRequest_Source) String() string

func (DepositRequest_Source) Type

type GetAccountsResponse

type GetAccountsResponse struct {
	Accounts []*Account `protobuf:"bytes,1,rep,name=accounts,proto3" json:"accounts,omitempty"`
	// contains filtered or unexported fields
}

func (*GetAccountsResponse) Descriptor deprecated

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

Deprecated: Use GetAccountsResponse.ProtoReflect.Descriptor instead.

func (*GetAccountsResponse) GetAccounts

func (x *GetAccountsResponse) GetAccounts() []*Account

func (*GetAccountsResponse) ProtoMessage

func (*GetAccountsResponse) ProtoMessage()

func (*GetAccountsResponse) ProtoReflect

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

func (*GetAccountsResponse) Reset

func (x *GetAccountsResponse) Reset()

func (*GetAccountsResponse) String

func (x *GetAccountsResponse) String() string

type GetTransactionsRequest

type GetTransactionsRequest struct {
	AccountNumber uint64                 `protobuf:"varint,1,opt,name=account_number,json=accountNumber,proto3" json:"account_number,omitempty"`
	Start         *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=start,proto3" json:"start,omitempty"`
	End           *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=end,proto3" json:"end,omitempty"`
	// contains filtered or unexported fields
}

func (*GetTransactionsRequest) Descriptor deprecated

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

Deprecated: Use GetTransactionsRequest.ProtoReflect.Descriptor instead.

func (*GetTransactionsRequest) GetAccountNumber

func (x *GetTransactionsRequest) GetAccountNumber() uint64

func (*GetTransactionsRequest) GetEnd

func (*GetTransactionsRequest) GetStart

func (*GetTransactionsRequest) ProtoMessage

func (*GetTransactionsRequest) ProtoMessage()

func (*GetTransactionsRequest) ProtoReflect

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

func (*GetTransactionsRequest) Reset

func (x *GetTransactionsRequest) Reset()

func (*GetTransactionsRequest) String

func (x *GetTransactionsRequest) String() string

type InitiateChat

type InitiateChat struct {
	ResumeSessionId string `protobuf:"bytes,1,opt,name=resume_session_id,json=resumeSessionId,proto3" json:"resume_session_id,omitempty"`
	// contains filtered or unexported fields
}

func (*InitiateChat) Descriptor deprecated

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

Deprecated: Use InitiateChat.ProtoReflect.Descriptor instead.

func (*InitiateChat) GetResumeSessionId

func (x *InitiateChat) GetResumeSessionId() string

func (*InitiateChat) ProtoMessage

func (*InitiateChat) ProtoMessage()

func (*InitiateChat) ProtoReflect

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

func (*InitiateChat) Reset

func (x *InitiateChat) Reset()

func (*InitiateChat) String

func (x *InitiateChat) String() string

type OpenAccountRequest

type OpenAccountRequest struct {
	InitialDepositCents int32        `protobuf:"varint,1,opt,name=initial_deposit_cents,json=initialDepositCents,proto3" json:"initial_deposit_cents,omitempty"`
	Type                Account_Type `protobuf:"varint,2,opt,name=type,proto3,enum=bank.Account_Type" json:"type,omitempty"`
	// contains filtered or unexported fields
}

func (*OpenAccountRequest) Descriptor deprecated

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

Deprecated: Use OpenAccountRequest.ProtoReflect.Descriptor instead.

func (*OpenAccountRequest) GetInitialDepositCents

func (x *OpenAccountRequest) GetInitialDepositCents() int32

func (*OpenAccountRequest) GetType

func (x *OpenAccountRequest) GetType() Account_Type

func (*OpenAccountRequest) ProtoMessage

func (*OpenAccountRequest) ProtoMessage()

func (*OpenAccountRequest) ProtoReflect

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

func (*OpenAccountRequest) Reset

func (x *OpenAccountRequest) Reset()

func (*OpenAccountRequest) String

func (x *OpenAccountRequest) String() string

type Session

type Session struct {
	SessionId    string       `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"`
	CustomerName string       `protobuf:"bytes,2,opt,name=customer_name,json=customerName,proto3" json:"customer_name,omitempty"`
	History      []*ChatEntry `protobuf:"bytes,3,rep,name=history,proto3" json:"history,omitempty"`
	// contains filtered or unexported fields
}

func (*Session) Descriptor deprecated

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

Deprecated: Use Session.ProtoReflect.Descriptor instead.

func (*Session) GetCustomerName

func (x *Session) GetCustomerName() string

func (*Session) GetHistory

func (x *Session) GetHistory() []*ChatEntry

func (*Session) GetSessionId

func (x *Session) GetSessionId() string

func (*Session) ProtoMessage

func (*Session) ProtoMessage()

func (*Session) ProtoReflect

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

func (*Session) Reset

func (x *Session) Reset()

func (*Session) String

func (x *Session) String() string

type SupportClient

type SupportClient interface {
	// ChatCustomer is used by a customer-facing app to send the customer's messages
	// to a chat session. The customer is how initiates and terminates (via "hangup")
	// a chat session. Only customers may invoke this method (e.g. requests must
	// include customer auth credentials).
	ChatCustomer(ctx context.Context, opts ...grpc.CallOption) (Support_ChatCustomerClient, error)
	// ChatAgent is used by an agent-facing app to allow an agent to reply to a
	// customer's messages in a chat session. The agent may accept a chat session,
	// which defaults to the session awaiting an agent for the longest period of time
	// (FIFO queue).
	ChatAgent(ctx context.Context, opts ...grpc.CallOption) (Support_ChatAgentClient, error)
}

SupportClient is the client API for Support 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 NewSupportClient

func NewSupportClient(cc grpc.ClientConnInterface) SupportClient

type SupportServer

type SupportServer interface {
	// ChatCustomer is used by a customer-facing app to send the customer's messages
	// to a chat session. The customer is how initiates and terminates (via "hangup")
	// a chat session. Only customers may invoke this method (e.g. requests must
	// include customer auth credentials).
	ChatCustomer(Support_ChatCustomerServer) error
	// ChatAgent is used by an agent-facing app to allow an agent to reply to a
	// customer's messages in a chat session. The agent may accept a chat session,
	// which defaults to the session awaiting an agent for the longest period of time
	// (FIFO queue).
	ChatAgent(Support_ChatAgentServer) error
	// contains filtered or unexported methods
}

SupportServer is the server API for Support service. All implementations must embed UnimplementedSupportServer for forward compatibility

type Support_ChatAgentClient

type Support_ChatAgentClient interface {
	Send(*ChatAgentRequest) error
	Recv() (*ChatAgentResponse, error)
	grpc.ClientStream
}

type Support_ChatAgentServer

type Support_ChatAgentServer interface {
	Send(*ChatAgentResponse) error
	Recv() (*ChatAgentRequest, error)
	grpc.ServerStream
}

type Support_ChatCustomerClient

type Support_ChatCustomerClient interface {
	Send(*ChatCustomerRequest) error
	Recv() (*ChatCustomerResponse, error)
	grpc.ClientStream
}

type Support_ChatCustomerServer

type Support_ChatCustomerServer interface {
	Send(*ChatCustomerResponse) error
	Recv() (*ChatCustomerRequest, error)
	grpc.ServerStream
}

type Transaction

type Transaction struct {
	AccountNumber uint64                 `protobuf:"varint,1,opt,name=account_number,json=accountNumber,proto3" json:"account_number,omitempty"`
	SeqNumber     uint64                 `protobuf:"varint,2,opt,name=seq_number,json=seqNumber,proto3" json:"seq_number,omitempty"`
	Date          *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=date,proto3" json:"date,omitempty"`
	AmountCents   int32                  `protobuf:"varint,4,opt,name=amount_cents,json=amountCents,proto3" json:"amount_cents,omitempty"`
	Desc          string                 `protobuf:"bytes,5,opt,name=desc,proto3" json:"desc,omitempty"`
	// contains filtered or unexported fields
}

func (*Transaction) Descriptor deprecated

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

Deprecated: Use Transaction.ProtoReflect.Descriptor instead.

func (*Transaction) GetAccountNumber

func (x *Transaction) GetAccountNumber() uint64

func (*Transaction) GetAmountCents

func (x *Transaction) GetAmountCents() int32

func (*Transaction) GetDate

func (x *Transaction) GetDate() *timestamppb.Timestamp

func (*Transaction) GetDesc

func (x *Transaction) GetDesc() string

func (*Transaction) GetSeqNumber

func (x *Transaction) GetSeqNumber() uint64

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

type TransferRequest

type TransferRequest struct {

	// Types that are assignable to Source:
	//	*TransferRequest_SourceAccountNumber
	//	*TransferRequest_ExternalSource
	Source isTransferRequest_Source `protobuf_oneof:"source"`
	// Types that are assignable to Dest:
	//	*TransferRequest_DestAccountNumber
	//	*TransferRequest_ExternalDest
	Dest        isTransferRequest_Dest `protobuf_oneof:"dest"`
	AmountCents int32                  `protobuf:"varint,5,opt,name=amount_cents,json=amountCents,proto3" json:"amount_cents,omitempty"`
	Desc        string                 `protobuf:"bytes,6,opt,name=desc,proto3" json:"desc,omitempty"`
	// contains filtered or unexported fields
}

func (*TransferRequest) Descriptor deprecated

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

Deprecated: Use TransferRequest.ProtoReflect.Descriptor instead.

func (*TransferRequest) GetAmountCents

func (x *TransferRequest) GetAmountCents() int32

func (*TransferRequest) GetDesc

func (x *TransferRequest) GetDesc() string

func (*TransferRequest) GetDest

func (m *TransferRequest) GetDest() isTransferRequest_Dest

func (*TransferRequest) GetDestAccountNumber

func (x *TransferRequest) GetDestAccountNumber() uint64

func (*TransferRequest) GetExternalDest

func (x *TransferRequest) GetExternalDest() *TransferRequest_ExternalAccount

func (*TransferRequest) GetExternalSource

func (x *TransferRequest) GetExternalSource() *TransferRequest_ExternalAccount

func (*TransferRequest) GetSource

func (m *TransferRequest) GetSource() isTransferRequest_Source

func (*TransferRequest) GetSourceAccountNumber

func (x *TransferRequest) GetSourceAccountNumber() uint64

func (*TransferRequest) ProtoMessage

func (*TransferRequest) ProtoMessage()

func (*TransferRequest) ProtoReflect

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

func (*TransferRequest) Reset

func (x *TransferRequest) Reset()

func (*TransferRequest) String

func (x *TransferRequest) String() string

type TransferRequest_DestAccountNumber

type TransferRequest_DestAccountNumber struct {
	DestAccountNumber uint64 `protobuf:"varint,3,opt,name=dest_account_number,json=destAccountNumber,proto3,oneof"`
}

type TransferRequest_ExternalAccount

type TransferRequest_ExternalAccount struct {
	AchRoutingNumber uint64 `protobuf:"varint,1,opt,name=ach_routing_number,json=achRoutingNumber,proto3" json:"ach_routing_number,omitempty"`
	AchAccountNumber uint64 `protobuf:"varint,2,opt,name=ach_account_number,json=achAccountNumber,proto3" json:"ach_account_number,omitempty"`
	// contains filtered or unexported fields
}

func (*TransferRequest_ExternalAccount) Descriptor deprecated

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

Deprecated: Use TransferRequest_ExternalAccount.ProtoReflect.Descriptor instead.

func (*TransferRequest_ExternalAccount) GetAchAccountNumber

func (x *TransferRequest_ExternalAccount) GetAchAccountNumber() uint64

func (*TransferRequest_ExternalAccount) GetAchRoutingNumber

func (x *TransferRequest_ExternalAccount) GetAchRoutingNumber() uint64

func (*TransferRequest_ExternalAccount) ProtoMessage

func (*TransferRequest_ExternalAccount) ProtoMessage()

func (*TransferRequest_ExternalAccount) ProtoReflect

func (*TransferRequest_ExternalAccount) Reset

func (*TransferRequest_ExternalAccount) String

type TransferRequest_ExternalDest

type TransferRequest_ExternalDest struct {
	ExternalDest *TransferRequest_ExternalAccount `protobuf:"bytes,4,opt,name=external_dest,json=externalDest,proto3,oneof"`
}

type TransferRequest_ExternalSource

type TransferRequest_ExternalSource struct {
	ExternalSource *TransferRequest_ExternalAccount `protobuf:"bytes,2,opt,name=external_source,json=externalSource,proto3,oneof"`
}

type TransferRequest_SourceAccountNumber

type TransferRequest_SourceAccountNumber struct {
	SourceAccountNumber uint64 `protobuf:"varint,1,opt,name=source_account_number,json=sourceAccountNumber,proto3,oneof"`
}

type TransferResponse

type TransferResponse struct {
	SrcAccountNumber  uint64 `protobuf:"varint,1,opt,name=src_account_number,json=srcAccountNumber,proto3" json:"src_account_number,omitempty"`
	SrcBalanceCents   int32  `protobuf:"varint,2,opt,name=src_balance_cents,json=srcBalanceCents,proto3" json:"src_balance_cents,omitempty"`
	DestAccountNumber uint64 `protobuf:"varint,3,opt,name=dest_account_number,json=destAccountNumber,proto3" json:"dest_account_number,omitempty"`
	DestBalanceCents  int32  `protobuf:"varint,4,opt,name=dest_balance_cents,json=destBalanceCents,proto3" json:"dest_balance_cents,omitempty"`
	// contains filtered or unexported fields
}

func (*TransferResponse) Descriptor deprecated

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

Deprecated: Use TransferResponse.ProtoReflect.Descriptor instead.

func (*TransferResponse) GetDestAccountNumber

func (x *TransferResponse) GetDestAccountNumber() uint64

func (*TransferResponse) GetDestBalanceCents

func (x *TransferResponse) GetDestBalanceCents() int32

func (*TransferResponse) GetSrcAccountNumber

func (x *TransferResponse) GetSrcAccountNumber() uint64

func (*TransferResponse) GetSrcBalanceCents

func (x *TransferResponse) GetSrcBalanceCents() int32

func (*TransferResponse) ProtoMessage

func (*TransferResponse) ProtoMessage()

func (*TransferResponse) ProtoReflect

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

func (*TransferResponse) Reset

func (x *TransferResponse) Reset()

func (*TransferResponse) String

func (x *TransferResponse) String() string

type UnimplementedBankServer

type UnimplementedBankServer struct {
}

UnimplementedBankServer must be embedded to have forward compatible implementations.

func (UnimplementedBankServer) CloseAccount

func (UnimplementedBankServer) Deposit

func (UnimplementedBankServer) GetAccounts

func (UnimplementedBankServer) GetTransactions

func (UnimplementedBankServer) OpenAccount

func (UnimplementedBankServer) Transfer

func (UnimplementedBankServer) Withdraw

type UnimplementedSupportServer

type UnimplementedSupportServer struct {
}

UnimplementedSupportServer must be embedded to have forward compatible implementations.

func (UnimplementedSupportServer) ChatAgent

func (UnimplementedSupportServer) ChatCustomer

type UnsafeBankServer

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

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

type UnsafeSupportServer

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

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

type Void

type Void int32
const (
	Void_VOID Void = 0
)

func (Void) Descriptor

func (Void) Descriptor() protoreflect.EnumDescriptor

func (Void) Enum

func (x Void) Enum() *Void

func (Void) EnumDescriptor deprecated

func (Void) EnumDescriptor() ([]byte, []int)

Deprecated: Use Void.Descriptor instead.

func (Void) Number

func (x Void) Number() protoreflect.EnumNumber

func (Void) String

func (x Void) String() string

func (Void) Type

func (Void) Type() protoreflect.EnumType

type WithdrawRequest

type WithdrawRequest struct {
	AccountNumber uint64 `protobuf:"varint,1,opt,name=account_number,json=accountNumber,proto3" json:"account_number,omitempty"`
	AmountCents   int32  `protobuf:"varint,2,opt,name=amount_cents,json=amountCents,proto3" json:"amount_cents,omitempty"`
	Desc          string `protobuf:"bytes,3,opt,name=desc,proto3" json:"desc,omitempty"`
	// contains filtered or unexported fields
}

func (*WithdrawRequest) Descriptor deprecated

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

Deprecated: Use WithdrawRequest.ProtoReflect.Descriptor instead.

func (*WithdrawRequest) GetAccountNumber

func (x *WithdrawRequest) GetAccountNumber() uint64

func (*WithdrawRequest) GetAmountCents

func (x *WithdrawRequest) GetAmountCents() int32

func (*WithdrawRequest) GetDesc

func (x *WithdrawRequest) GetDesc() string

func (*WithdrawRequest) ProtoMessage

func (*WithdrawRequest) ProtoMessage()

func (*WithdrawRequest) ProtoReflect

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

func (*WithdrawRequest) Reset

func (x *WithdrawRequest) Reset()

func (*WithdrawRequest) String

func (x *WithdrawRequest) String() string

Jump to

Keyboard shortcuts

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