Documentation ¶
Overview ¶
Package v1 is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterStkPushAPIHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterStkPushAPIHandlerClient(ctx context.Context, mux *runtime.ServeMux, client StkPushAPIClient) error
- func RegisterStkPushAPIHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterStkPushAPIHandlerServer(ctx context.Context, mux *runtime.ServeMux, server StkPushAPIServer) error
- func RegisterStkPushAPIServer(s grpc.ServiceRegistrar, srv StkPushAPIServer)
- type CreateStkTransactionRequest
- func (*CreateStkTransactionRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateStkTransactionRequest) GetPayload() *StkTransaction
- func (x *CreateStkTransactionRequest) GetPublish() bool
- func (*CreateStkTransactionRequest) ProtoMessage()
- func (x *CreateStkTransactionRequest) ProtoReflect() protoreflect.Message
- func (x *CreateStkTransactionRequest) Reset()
- func (x *CreateStkTransactionRequest) String() string
- type GetStkTransactionRequest
- func (*GetStkTransactionRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetStkTransactionRequest) GetMpesaReceiptId() string
- func (x *GetStkTransactionRequest) GetTransactionId() string
- func (*GetStkTransactionRequest) ProtoMessage()
- func (x *GetStkTransactionRequest) ProtoReflect() protoreflect.Message
- func (x *GetStkTransactionRequest) Reset()
- func (x *GetStkTransactionRequest) String() string
- type InitiateSTKPushRequest
- func (*InitiateSTKPushRequest) Descriptor() ([]byte, []int)deprecated
- func (x *InitiateSTKPushRequest) GetAccountReference() string
- func (x *InitiateSTKPushRequest) GetAmount() float64
- func (x *InitiateSTKPushRequest) GetInitiatorId() string
- func (x *InitiateSTKPushRequest) GetPhone() string
- func (x *InitiateSTKPushRequest) GetPublish() bool
- func (x *InitiateSTKPushRequest) GetPublishMessage() *PublishInfo
- func (x *InitiateSTKPushRequest) GetTransactionDesc() string
- func (*InitiateSTKPushRequest) ProtoMessage()
- func (x *InitiateSTKPushRequest) ProtoReflect() protoreflect.Message
- func (x *InitiateSTKPushRequest) Reset()
- func (x *InitiateSTKPushRequest) String() string
- type InitiateSTKPushResponse
- func (*InitiateSTKPushResponse) Descriptor() ([]byte, []int)deprecated
- func (x *InitiateSTKPushResponse) GetMessage() string
- func (x *InitiateSTKPushResponse) GetProgress() bool
- func (*InitiateSTKPushResponse) ProtoMessage()
- func (x *InitiateSTKPushResponse) ProtoReflect() protoreflect.Message
- func (x *InitiateSTKPushResponse) Reset()
- func (x *InitiateSTKPushResponse) String() string
- type ListStkTransactionFilter
- func (*ListStkTransactionFilter) Descriptor() ([]byte, []int)deprecated
- func (x *ListStkTransactionFilter) GetEndTimestamp() int64
- func (x *ListStkTransactionFilter) GetMsisdns() []string
- func (x *ListStkTransactionFilter) GetOrderField() v11.OrderField
- func (x *ListStkTransactionFilter) GetProcessState() v1.ProcessedState
- func (x *ListStkTransactionFilter) GetStartTimestamp() int64
- func (x *ListStkTransactionFilter) GetTxDate() string
- func (*ListStkTransactionFilter) ProtoMessage()
- func (x *ListStkTransactionFilter) ProtoReflect() protoreflect.Message
- func (x *ListStkTransactionFilter) Reset()
- func (x *ListStkTransactionFilter) String() string
- type ListStkTransactionsRequest
- func (*ListStkTransactionsRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ListStkTransactionsRequest) GetFilter() *ListStkTransactionFilter
- func (x *ListStkTransactionsRequest) GetPageSize() int32
- func (x *ListStkTransactionsRequest) GetPageToken() string
- func (*ListStkTransactionsRequest) ProtoMessage()
- func (x *ListStkTransactionsRequest) ProtoReflect() protoreflect.Message
- func (x *ListStkTransactionsRequest) Reset()
- func (x *ListStkTransactionsRequest) String() string
- type ListStkTransactionsResponse
- func (*ListStkTransactionsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ListStkTransactionsResponse) GetCollectionCount() int64
- func (x *ListStkTransactionsResponse) GetNextPageToken() string
- func (x *ListStkTransactionsResponse) GetStkTransactions() []*StkTransaction
- func (*ListStkTransactionsResponse) ProtoMessage()
- func (x *ListStkTransactionsResponse) ProtoReflect() protoreflect.Message
- func (x *ListStkTransactionsResponse) Reset()
- func (x *ListStkTransactionsResponse) String() string
- type ProcessStkTransactionRequest
- func (*ProcessStkTransactionRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ProcessStkTransactionRequest) GetMpesaReceiptId() string
- func (x *ProcessStkTransactionRequest) GetProcessed() bool
- func (x *ProcessStkTransactionRequest) GetTransactionId() string
- func (*ProcessStkTransactionRequest) ProtoMessage()
- func (x *ProcessStkTransactionRequest) ProtoReflect() protoreflect.Message
- func (x *ProcessStkTransactionRequest) Reset()
- func (x *ProcessStkTransactionRequest) String() string
- type PublishInfo
- func (*PublishInfo) Descriptor() ([]byte, []int)deprecated
- func (x *PublishInfo) GetChannelName() string
- func (x *PublishInfo) GetOnlyOnSuccess() bool
- func (x *PublishInfo) GetPayload() map[string]string
- func (*PublishInfo) ProtoMessage()
- func (x *PublishInfo) ProtoReflect() protoreflect.Message
- func (x *PublishInfo) Reset()
- func (x *PublishInfo) String() string
- type PublishMessage
- func (*PublishMessage) Descriptor() ([]byte, []int)deprecated
- func (x *PublishMessage) GetInitiatorId() string
- func (x *PublishMessage) GetMpesaReceiptId() string
- func (x *PublishMessage) GetPhoneNumber() string
- func (x *PublishMessage) GetPublishInfo() *PublishInfo
- func (x *PublishMessage) GetTransactionId() string
- func (x *PublishMessage) GetTransactionInfo() *StkTransaction
- func (*PublishMessage) ProtoMessage()
- func (x *PublishMessage) ProtoReflect() protoreflect.Message
- func (x *PublishMessage) Reset()
- func (x *PublishMessage) String() string
- type PublishStkTransactionRequest
- func (*PublishStkTransactionRequest) Descriptor() ([]byte, []int)deprecated
- func (x *PublishStkTransactionRequest) GetProcessedState() v1.ProcessedState
- func (x *PublishStkTransactionRequest) GetPublishMessage() *PublishMessage
- func (*PublishStkTransactionRequest) ProtoMessage()
- func (x *PublishStkTransactionRequest) ProtoReflect() protoreflect.Message
- func (x *PublishStkTransactionRequest) Reset()
- func (x *PublishStkTransactionRequest) String() string
- type StkPushAPIClient
- type StkPushAPIServer
- type StkTransaction
- func (*StkTransaction) Descriptor() ([]byte, []int)deprecated
- func (x *StkTransaction) GetAccountReference() string
- func (x *StkTransaction) GetAmount() string
- func (x *StkTransaction) GetBalance() string
- func (x *StkTransaction) GetCheckoutRequestId() string
- func (x *StkTransaction) GetCreateTimestamp() int64
- func (x *StkTransaction) GetInitiatorId() string
- func (x *StkTransaction) GetMerchantRequestId() string
- func (x *StkTransaction) GetMpesaReceiptId() string
- func (x *StkTransaction) GetPhoneNumber() string
- func (x *StkTransaction) GetProcessed() bool
- func (x *StkTransaction) GetResultCode() string
- func (x *StkTransaction) GetResultDesc() string
- func (x *StkTransaction) GetShortCode() string
- func (x *StkTransaction) GetSucceeded() bool
- func (x *StkTransaction) GetTransactionDesc() string
- func (x *StkTransaction) GetTransactionId() string
- func (x *StkTransaction) GetTransactionTimestamp() int64
- func (*StkTransaction) ProtoMessage()
- func (x *StkTransaction) ProtoReflect() protoreflect.Message
- func (x *StkTransaction) Reset()
- func (x *StkTransaction) String() string
- type UnimplementedStkPushAPIServer
- func (UnimplementedStkPushAPIServer) CreateStkTransaction(context.Context, *CreateStkTransactionRequest) (*StkTransaction, error)
- func (UnimplementedStkPushAPIServer) GetStkTransaction(context.Context, *GetStkTransactionRequest) (*StkTransaction, error)
- func (UnimplementedStkPushAPIServer) InitiateSTKPush(context.Context, *InitiateSTKPushRequest) (*InitiateSTKPushResponse, error)
- func (UnimplementedStkPushAPIServer) ListStkTransactions(context.Context, *ListStkTransactionsRequest) (*ListStkTransactionsResponse, error)
- func (UnimplementedStkPushAPIServer) ProcessStkTransaction(context.Context, *ProcessStkTransactionRequest) (*emptypb.Empty, error)
- func (UnimplementedStkPushAPIServer) PublishStkTransaction(context.Context, *PublishStkTransactionRequest) (*emptypb.Empty, error)
- type UnsafeStkPushAPIServer
Constants ¶
This section is empty.
Variables ¶
var File_stk_v1_proto protoreflect.FileDescriptor
Functions ¶
func RegisterStkPushAPIHandler ¶
func RegisterStkPushAPIHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterStkPushAPIHandler registers the http handlers for service StkPushAPI to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterStkPushAPIHandlerClient ¶
func RegisterStkPushAPIHandlerClient(ctx context.Context, mux *runtime.ServeMux, client StkPushAPIClient) error
RegisterStkPushAPIHandlerClient registers the http handlers for service StkPushAPI to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "StkPushAPIClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "StkPushAPIClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "StkPushAPIClient" to call the correct interceptors.
func RegisterStkPushAPIHandlerFromEndpoint ¶
func RegisterStkPushAPIHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterStkPushAPIHandlerFromEndpoint is same as RegisterStkPushAPIHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterStkPushAPIHandlerServer ¶
func RegisterStkPushAPIHandlerServer(ctx context.Context, mux *runtime.ServeMux, server StkPushAPIServer) error
RegisterStkPushAPIHandlerServer registers the http handlers for service StkPushAPI to "mux". UnaryRPC :call StkPushAPIServer 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 RegisterStkPushAPIHandlerFromEndpoint instead.
func RegisterStkPushAPIServer ¶
func RegisterStkPushAPIServer(s grpc.ServiceRegistrar, srv StkPushAPIServer)
Types ¶
type CreateStkTransactionRequest ¶
type CreateStkTransactionRequest struct { Payload *StkTransaction `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` Publish bool `protobuf:"varint,2,opt,name=publish,proto3" json:"publish,omitempty"` // contains filtered or unexported fields }
func (*CreateStkTransactionRequest) Descriptor
deprecated
func (*CreateStkTransactionRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateStkTransactionRequest.ProtoReflect.Descriptor instead.
func (*CreateStkTransactionRequest) GetPayload ¶
func (x *CreateStkTransactionRequest) GetPayload() *StkTransaction
func (*CreateStkTransactionRequest) GetPublish ¶
func (x *CreateStkTransactionRequest) GetPublish() bool
func (*CreateStkTransactionRequest) ProtoMessage ¶
func (*CreateStkTransactionRequest) ProtoMessage()
func (*CreateStkTransactionRequest) ProtoReflect ¶
func (x *CreateStkTransactionRequest) ProtoReflect() protoreflect.Message
func (*CreateStkTransactionRequest) Reset ¶
func (x *CreateStkTransactionRequest) Reset()
func (*CreateStkTransactionRequest) String ¶
func (x *CreateStkTransactionRequest) String() string
type GetStkTransactionRequest ¶
type GetStkTransactionRequest struct { TransactionId string `protobuf:"bytes,1,opt,name=transaction_id,json=transactionId,proto3" json:"transaction_id,omitempty"` MpesaReceiptId string `protobuf:"bytes,2,opt,name=mpesa_receipt_id,json=mpesaReceiptId,proto3" json:"mpesa_receipt_id,omitempty"` // contains filtered or unexported fields }
func (*GetStkTransactionRequest) Descriptor
deprecated
func (*GetStkTransactionRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetStkTransactionRequest.ProtoReflect.Descriptor instead.
func (*GetStkTransactionRequest) GetMpesaReceiptId ¶
func (x *GetStkTransactionRequest) GetMpesaReceiptId() string
func (*GetStkTransactionRequest) GetTransactionId ¶
func (x *GetStkTransactionRequest) GetTransactionId() string
func (*GetStkTransactionRequest) ProtoMessage ¶
func (*GetStkTransactionRequest) ProtoMessage()
func (*GetStkTransactionRequest) ProtoReflect ¶
func (x *GetStkTransactionRequest) ProtoReflect() protoreflect.Message
func (*GetStkTransactionRequest) Reset ¶
func (x *GetStkTransactionRequest) Reset()
func (*GetStkTransactionRequest) String ¶
func (x *GetStkTransactionRequest) String() string
type InitiateSTKPushRequest ¶
type InitiateSTKPushRequest struct { InitiatorId string `protobuf:"bytes,1,opt,name=initiator_id,json=initiatorId,proto3" json:"initiator_id,omitempty"` Phone string `protobuf:"bytes,2,opt,name=phone,proto3" json:"phone,omitempty"` Amount float64 `protobuf:"fixed64,3,opt,name=amount,proto3" json:"amount,omitempty"` AccountReference string `protobuf:"bytes,4,opt,name=account_reference,json=accountReference,proto3" json:"account_reference,omitempty"` TransactionDesc string `protobuf:"bytes,5,opt,name=transaction_desc,json=transactionDesc,proto3" json:"transaction_desc,omitempty"` Publish bool `protobuf:"varint,6,opt,name=publish,proto3" json:"publish,omitempty"` PublishMessage *PublishInfo `protobuf:"bytes,7,opt,name=publish_message,json=publishMessage,proto3" json:"publish_message,omitempty"` // contains filtered or unexported fields }
func (*InitiateSTKPushRequest) Descriptor
deprecated
func (*InitiateSTKPushRequest) Descriptor() ([]byte, []int)
Deprecated: Use InitiateSTKPushRequest.ProtoReflect.Descriptor instead.
func (*InitiateSTKPushRequest) GetAccountReference ¶ added in v1.2.1
func (x *InitiateSTKPushRequest) GetAccountReference() string
func (*InitiateSTKPushRequest) GetAmount ¶
func (x *InitiateSTKPushRequest) GetAmount() float64
func (*InitiateSTKPushRequest) GetInitiatorId ¶
func (x *InitiateSTKPushRequest) GetInitiatorId() string
func (*InitiateSTKPushRequest) GetPhone ¶
func (x *InitiateSTKPushRequest) GetPhone() string
func (*InitiateSTKPushRequest) GetPublish ¶
func (x *InitiateSTKPushRequest) GetPublish() bool
func (*InitiateSTKPushRequest) GetPublishMessage ¶
func (x *InitiateSTKPushRequest) GetPublishMessage() *PublishInfo
func (*InitiateSTKPushRequest) GetTransactionDesc ¶ added in v1.2.1
func (x *InitiateSTKPushRequest) GetTransactionDesc() string
func (*InitiateSTKPushRequest) ProtoMessage ¶
func (*InitiateSTKPushRequest) ProtoMessage()
func (*InitiateSTKPushRequest) ProtoReflect ¶
func (x *InitiateSTKPushRequest) ProtoReflect() protoreflect.Message
func (*InitiateSTKPushRequest) Reset ¶
func (x *InitiateSTKPushRequest) Reset()
func (*InitiateSTKPushRequest) String ¶
func (x *InitiateSTKPushRequest) String() string
type InitiateSTKPushResponse ¶
type InitiateSTKPushResponse struct { Progress bool `protobuf:"varint,1,opt,name=progress,proto3" json:"progress,omitempty"` Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*InitiateSTKPushResponse) Descriptor
deprecated
func (*InitiateSTKPushResponse) Descriptor() ([]byte, []int)
Deprecated: Use InitiateSTKPushResponse.ProtoReflect.Descriptor instead.
func (*InitiateSTKPushResponse) GetMessage ¶
func (x *InitiateSTKPushResponse) GetMessage() string
func (*InitiateSTKPushResponse) GetProgress ¶
func (x *InitiateSTKPushResponse) GetProgress() bool
func (*InitiateSTKPushResponse) ProtoMessage ¶
func (*InitiateSTKPushResponse) ProtoMessage()
func (*InitiateSTKPushResponse) ProtoReflect ¶
func (x *InitiateSTKPushResponse) ProtoReflect() protoreflect.Message
func (*InitiateSTKPushResponse) Reset ¶
func (x *InitiateSTKPushResponse) Reset()
func (*InitiateSTKPushResponse) String ¶
func (x *InitiateSTKPushResponse) String() string
type ListStkTransactionFilter ¶
type ListStkTransactionFilter struct { TxDate string `protobuf:"bytes,1,opt,name=tx_date,json=txDate,proto3" json:"tx_date,omitempty"` Msisdns []string `protobuf:"bytes,2,rep,name=msisdns,proto3" json:"msisdns,omitempty"` ProcessState v1.ProcessedState `` /* 131-byte string literal not displayed */ StartTimestamp int64 `protobuf:"varint,4,opt,name=start_timestamp,json=startTimestamp,proto3" json:"start_timestamp,omitempty"` EndTimestamp int64 `protobuf:"varint,5,opt,name=end_timestamp,json=endTimestamp,proto3" json:"end_timestamp,omitempty"` OrderField v11.OrderField `protobuf:"varint,6,opt,name=order_field,json=orderField,proto3,enum=gidyon.mpesa.b2c.OrderField" json:"order_field,omitempty"` // contains filtered or unexported fields }
func (*ListStkTransactionFilter) Descriptor
deprecated
func (*ListStkTransactionFilter) Descriptor() ([]byte, []int)
Deprecated: Use ListStkTransactionFilter.ProtoReflect.Descriptor instead.
func (*ListStkTransactionFilter) GetEndTimestamp ¶
func (x *ListStkTransactionFilter) GetEndTimestamp() int64
func (*ListStkTransactionFilter) GetMsisdns ¶
func (x *ListStkTransactionFilter) GetMsisdns() []string
func (*ListStkTransactionFilter) GetOrderField ¶ added in v1.2.3
func (x *ListStkTransactionFilter) GetOrderField() v11.OrderField
func (*ListStkTransactionFilter) GetProcessState ¶
func (x *ListStkTransactionFilter) GetProcessState() v1.ProcessedState
func (*ListStkTransactionFilter) GetStartTimestamp ¶
func (x *ListStkTransactionFilter) GetStartTimestamp() int64
func (*ListStkTransactionFilter) GetTxDate ¶
func (x *ListStkTransactionFilter) GetTxDate() string
func (*ListStkTransactionFilter) ProtoMessage ¶
func (*ListStkTransactionFilter) ProtoMessage()
func (*ListStkTransactionFilter) ProtoReflect ¶
func (x *ListStkTransactionFilter) ProtoReflect() protoreflect.Message
func (*ListStkTransactionFilter) Reset ¶
func (x *ListStkTransactionFilter) Reset()
func (*ListStkTransactionFilter) String ¶
func (x *ListStkTransactionFilter) String() string
type ListStkTransactionsRequest ¶
type ListStkTransactionsRequest struct { PageToken string `protobuf:"bytes,1,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` Filter *ListStkTransactionFilter `protobuf:"bytes,3,opt,name=filter,proto3" json:"filter,omitempty"` // contains filtered or unexported fields }
func (*ListStkTransactionsRequest) Descriptor
deprecated
func (*ListStkTransactionsRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListStkTransactionsRequest.ProtoReflect.Descriptor instead.
func (*ListStkTransactionsRequest) GetFilter ¶
func (x *ListStkTransactionsRequest) GetFilter() *ListStkTransactionFilter
func (*ListStkTransactionsRequest) GetPageSize ¶
func (x *ListStkTransactionsRequest) GetPageSize() int32
func (*ListStkTransactionsRequest) GetPageToken ¶
func (x *ListStkTransactionsRequest) GetPageToken() string
func (*ListStkTransactionsRequest) ProtoMessage ¶
func (*ListStkTransactionsRequest) ProtoMessage()
func (*ListStkTransactionsRequest) ProtoReflect ¶
func (x *ListStkTransactionsRequest) ProtoReflect() protoreflect.Message
func (*ListStkTransactionsRequest) Reset ¶
func (x *ListStkTransactionsRequest) Reset()
func (*ListStkTransactionsRequest) String ¶
func (x *ListStkTransactionsRequest) String() string
type ListStkTransactionsResponse ¶
type ListStkTransactionsResponse struct { NextPageToken string `protobuf:"bytes,1,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` StkTransactions []*StkTransaction `protobuf:"bytes,2,rep,name=stk_transactions,json=stkTransactions,proto3" json:"stk_transactions,omitempty"` CollectionCount int64 `protobuf:"varint,3,opt,name=collection_count,json=collectionCount,proto3" json:"collection_count,omitempty"` // contains filtered or unexported fields }
func (*ListStkTransactionsResponse) Descriptor
deprecated
func (*ListStkTransactionsResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListStkTransactionsResponse.ProtoReflect.Descriptor instead.
func (*ListStkTransactionsResponse) GetCollectionCount ¶ added in v1.2.3
func (x *ListStkTransactionsResponse) GetCollectionCount() int64
func (*ListStkTransactionsResponse) GetNextPageToken ¶
func (x *ListStkTransactionsResponse) GetNextPageToken() string
func (*ListStkTransactionsResponse) GetStkTransactions ¶
func (x *ListStkTransactionsResponse) GetStkTransactions() []*StkTransaction
func (*ListStkTransactionsResponse) ProtoMessage ¶
func (*ListStkTransactionsResponse) ProtoMessage()
func (*ListStkTransactionsResponse) ProtoReflect ¶
func (x *ListStkTransactionsResponse) ProtoReflect() protoreflect.Message
func (*ListStkTransactionsResponse) Reset ¶
func (x *ListStkTransactionsResponse) Reset()
func (*ListStkTransactionsResponse) String ¶
func (x *ListStkTransactionsResponse) String() string
type ProcessStkTransactionRequest ¶
type ProcessStkTransactionRequest struct { TransactionId string `protobuf:"bytes,1,opt,name=transaction_id,json=transactionId,proto3" json:"transaction_id,omitempty"` MpesaReceiptId string `protobuf:"bytes,2,opt,name=mpesa_receipt_id,json=mpesaReceiptId,proto3" json:"mpesa_receipt_id,omitempty"` Processed bool `protobuf:"varint,3,opt,name=processed,proto3" json:"processed,omitempty"` // contains filtered or unexported fields }
func (*ProcessStkTransactionRequest) Descriptor
deprecated
func (*ProcessStkTransactionRequest) Descriptor() ([]byte, []int)
Deprecated: Use ProcessStkTransactionRequest.ProtoReflect.Descriptor instead.
func (*ProcessStkTransactionRequest) GetMpesaReceiptId ¶
func (x *ProcessStkTransactionRequest) GetMpesaReceiptId() string
func (*ProcessStkTransactionRequest) GetProcessed ¶
func (x *ProcessStkTransactionRequest) GetProcessed() bool
func (*ProcessStkTransactionRequest) GetTransactionId ¶
func (x *ProcessStkTransactionRequest) GetTransactionId() string
func (*ProcessStkTransactionRequest) ProtoMessage ¶
func (*ProcessStkTransactionRequest) ProtoMessage()
func (*ProcessStkTransactionRequest) ProtoReflect ¶
func (x *ProcessStkTransactionRequest) ProtoReflect() protoreflect.Message
func (*ProcessStkTransactionRequest) Reset ¶
func (x *ProcessStkTransactionRequest) Reset()
func (*ProcessStkTransactionRequest) String ¶
func (x *ProcessStkTransactionRequest) String() string
type PublishInfo ¶
type PublishInfo struct { OnlyOnSuccess bool `protobuf:"varint,1,opt,name=only_on_success,json=onlyOnSuccess,proto3" json:"only_on_success,omitempty"` ChannelName string `protobuf:"bytes,2,opt,name=channel_name,json=channelName,proto3" json:"channel_name,omitempty"` Payload map[string]string `` /* 155-byte string literal not displayed */ // contains filtered or unexported fields }
func (*PublishInfo) Descriptor
deprecated
func (*PublishInfo) Descriptor() ([]byte, []int)
Deprecated: Use PublishInfo.ProtoReflect.Descriptor instead.
func (*PublishInfo) GetChannelName ¶
func (x *PublishInfo) GetChannelName() string
func (*PublishInfo) GetOnlyOnSuccess ¶
func (x *PublishInfo) GetOnlyOnSuccess() bool
func (*PublishInfo) GetPayload ¶
func (x *PublishInfo) GetPayload() map[string]string
func (*PublishInfo) ProtoMessage ¶
func (*PublishInfo) ProtoMessage()
func (*PublishInfo) ProtoReflect ¶
func (x *PublishInfo) ProtoReflect() protoreflect.Message
func (*PublishInfo) Reset ¶
func (x *PublishInfo) Reset()
func (*PublishInfo) String ¶
func (x *PublishInfo) String() string
type PublishMessage ¶
type PublishMessage struct { InitiatorId string `protobuf:"bytes,1,opt,name=initiator_id,json=initiatorId,proto3" json:"initiator_id,omitempty"` TransactionId string `protobuf:"bytes,2,opt,name=transaction_id,json=transactionId,proto3" json:"transaction_id,omitempty"` MpesaReceiptId string `protobuf:"bytes,3,opt,name=mpesa_receipt_id,json=mpesaReceiptId,proto3" json:"mpesa_receipt_id,omitempty"` PhoneNumber string `protobuf:"bytes,4,opt,name=phone_number,json=phoneNumber,proto3" json:"phone_number,omitempty"` PublishInfo *PublishInfo `protobuf:"bytes,5,opt,name=publish_info,json=publishInfo,proto3" json:"publish_info,omitempty"` TransactionInfo *StkTransaction `protobuf:"bytes,6,opt,name=transaction_info,json=transactionInfo,proto3" json:"transaction_info,omitempty"` // contains filtered or unexported fields }
func (*PublishMessage) Descriptor
deprecated
func (*PublishMessage) Descriptor() ([]byte, []int)
Deprecated: Use PublishMessage.ProtoReflect.Descriptor instead.
func (*PublishMessage) GetInitiatorId ¶
func (x *PublishMessage) GetInitiatorId() string
func (*PublishMessage) GetMpesaReceiptId ¶
func (x *PublishMessage) GetMpesaReceiptId() string
func (*PublishMessage) GetPhoneNumber ¶
func (x *PublishMessage) GetPhoneNumber() string
func (*PublishMessage) GetPublishInfo ¶
func (x *PublishMessage) GetPublishInfo() *PublishInfo
func (*PublishMessage) GetTransactionId ¶
func (x *PublishMessage) GetTransactionId() string
func (*PublishMessage) GetTransactionInfo ¶
func (x *PublishMessage) GetTransactionInfo() *StkTransaction
func (*PublishMessage) ProtoMessage ¶
func (*PublishMessage) ProtoMessage()
func (*PublishMessage) ProtoReflect ¶
func (x *PublishMessage) ProtoReflect() protoreflect.Message
func (*PublishMessage) Reset ¶
func (x *PublishMessage) Reset()
func (*PublishMessage) String ¶
func (x *PublishMessage) String() string
type PublishStkTransactionRequest ¶
type PublishStkTransactionRequest struct { PublishMessage *PublishMessage `protobuf:"bytes,1,opt,name=publish_message,json=publishMessage,proto3" json:"publish_message,omitempty"` ProcessedState v1.ProcessedState `` /* 137-byte string literal not displayed */ // contains filtered or unexported fields }
func (*PublishStkTransactionRequest) Descriptor
deprecated
func (*PublishStkTransactionRequest) Descriptor() ([]byte, []int)
Deprecated: Use PublishStkTransactionRequest.ProtoReflect.Descriptor instead.
func (*PublishStkTransactionRequest) GetProcessedState ¶
func (x *PublishStkTransactionRequest) GetProcessedState() v1.ProcessedState
func (*PublishStkTransactionRequest) GetPublishMessage ¶
func (x *PublishStkTransactionRequest) GetPublishMessage() *PublishMessage
func (*PublishStkTransactionRequest) ProtoMessage ¶
func (*PublishStkTransactionRequest) ProtoMessage()
func (*PublishStkTransactionRequest) ProtoReflect ¶
func (x *PublishStkTransactionRequest) ProtoReflect() protoreflect.Message
func (*PublishStkTransactionRequest) Reset ¶
func (x *PublishStkTransactionRequest) Reset()
func (*PublishStkTransactionRequest) String ¶
func (x *PublishStkTransactionRequest) String() string
type StkPushAPIClient ¶
type StkPushAPIClient interface { // Initiates mpesa payment. InitiateSTKPush(ctx context.Context, in *InitiateSTKPushRequest, opts ...grpc.CallOption) (*InitiateSTKPushResponse, error) // Retrieves a single stk payload GetStkTransaction(ctx context.Context, in *GetStkTransactionRequest, opts ...grpc.CallOption) (*StkTransaction, error) // Creates a record of stk push response sent to callback CreateStkTransaction(ctx context.Context, in *CreateStkTransactionRequest, opts ...grpc.CallOption) (*StkTransaction, error) // Retrieves a collection of stk push payloads ListStkTransactions(ctx context.Context, in *ListStkTransactionsRequest, opts ...grpc.CallOption) (*ListStkTransactionsResponse, error) // Processes stk push payload updating its status ProcessStkTransaction(ctx context.Context, in *ProcessStkTransactionRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) // Publishes stk push payload for consumers PublishStkTransaction(ctx context.Context, in *PublishStkTransactionRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) }
StkPushAPIClient is the client API for StkPushAPI 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 NewStkPushAPIClient ¶
func NewStkPushAPIClient(cc grpc.ClientConnInterface) StkPushAPIClient
type StkPushAPIServer ¶
type StkPushAPIServer interface { // Initiates mpesa payment. InitiateSTKPush(context.Context, *InitiateSTKPushRequest) (*InitiateSTKPushResponse, error) // Retrieves a single stk payload GetStkTransaction(context.Context, *GetStkTransactionRequest) (*StkTransaction, error) // Creates a record of stk push response sent to callback CreateStkTransaction(context.Context, *CreateStkTransactionRequest) (*StkTransaction, error) // Retrieves a collection of stk push payloads ListStkTransactions(context.Context, *ListStkTransactionsRequest) (*ListStkTransactionsResponse, error) // Processes stk push payload updating its status ProcessStkTransaction(context.Context, *ProcessStkTransactionRequest) (*emptypb.Empty, error) // Publishes stk push payload for consumers PublishStkTransaction(context.Context, *PublishStkTransactionRequest) (*emptypb.Empty, error) // contains filtered or unexported methods }
StkPushAPIServer is the server API for StkPushAPI service. All implementations must embed UnimplementedStkPushAPIServer for forward compatibility
type StkTransaction ¶
type StkTransaction struct { InitiatorId string `protobuf:"bytes,1,opt,name=initiator_id,json=initiatorId,proto3" json:"initiator_id,omitempty"` TransactionId string `protobuf:"bytes,2,opt,name=transaction_id,json=transactionId,proto3" json:"transaction_id,omitempty"` MerchantRequestId string `protobuf:"bytes,3,opt,name=merchant_request_id,json=merchantRequestId,proto3" json:"merchant_request_id,omitempty"` CheckoutRequestId string `protobuf:"bytes,4,opt,name=checkout_request_id,json=checkoutRequestId,proto3" json:"checkout_request_id,omitempty"` ShortCode string `protobuf:"bytes,5,opt,name=short_code,json=shortCode,proto3" json:"short_code,omitempty"` AccountReference string `protobuf:"bytes,6,opt,name=account_reference,json=accountReference,proto3" json:"account_reference,omitempty"` TransactionDesc string `protobuf:"bytes,7,opt,name=transaction_desc,json=transactionDesc,proto3" json:"transaction_desc,omitempty"` ResultCode string `protobuf:"bytes,8,opt,name=result_code,json=resultCode,proto3" json:"result_code,omitempty"` ResultDesc string `protobuf:"bytes,9,opt,name=result_desc,json=resultDesc,proto3" json:"result_desc,omitempty"` Amount string `protobuf:"bytes,10,opt,name=amount,proto3" json:"amount,omitempty"` MpesaReceiptId string `protobuf:"bytes,11,opt,name=mpesa_receipt_id,json=mpesaReceiptId,proto3" json:"mpesa_receipt_id,omitempty"` Balance string `protobuf:"bytes,12,opt,name=balance,proto3" json:"balance,omitempty"` PhoneNumber string `protobuf:"bytes,13,opt,name=phone_number,json=phoneNumber,proto3" json:"phone_number,omitempty"` Succeeded bool `protobuf:"varint,14,opt,name=succeeded,proto3" json:"succeeded,omitempty"` Processed bool `protobuf:"varint,15,opt,name=processed,proto3" json:"processed,omitempty"` TransactionTimestamp int64 `protobuf:"varint,16,opt,name=transaction_timestamp,json=transactionTimestamp,proto3" json:"transaction_timestamp,omitempty"` CreateTimestamp int64 `protobuf:"varint,17,opt,name=create_timestamp,json=createTimestamp,proto3" json:"create_timestamp,omitempty"` // contains filtered or unexported fields }
func (*StkTransaction) Descriptor
deprecated
func (*StkTransaction) Descriptor() ([]byte, []int)
Deprecated: Use StkTransaction.ProtoReflect.Descriptor instead.
func (*StkTransaction) GetAccountReference ¶ added in v1.2.1
func (x *StkTransaction) GetAccountReference() string
func (*StkTransaction) GetAmount ¶
func (x *StkTransaction) GetAmount() string
func (*StkTransaction) GetBalance ¶
func (x *StkTransaction) GetBalance() string
func (*StkTransaction) GetCheckoutRequestId ¶
func (x *StkTransaction) GetCheckoutRequestId() string
func (*StkTransaction) GetCreateTimestamp ¶
func (x *StkTransaction) GetCreateTimestamp() int64
func (*StkTransaction) GetInitiatorId ¶
func (x *StkTransaction) GetInitiatorId() string
func (*StkTransaction) GetMerchantRequestId ¶
func (x *StkTransaction) GetMerchantRequestId() string
func (*StkTransaction) GetMpesaReceiptId ¶
func (x *StkTransaction) GetMpesaReceiptId() string
func (*StkTransaction) GetPhoneNumber ¶
func (x *StkTransaction) GetPhoneNumber() string
func (*StkTransaction) GetProcessed ¶
func (x *StkTransaction) GetProcessed() bool
func (*StkTransaction) GetResultCode ¶
func (x *StkTransaction) GetResultCode() string
func (*StkTransaction) GetResultDesc ¶
func (x *StkTransaction) GetResultDesc() string
func (*StkTransaction) GetShortCode ¶ added in v1.2.1
func (x *StkTransaction) GetShortCode() string
func (*StkTransaction) GetSucceeded ¶
func (x *StkTransaction) GetSucceeded() bool
func (*StkTransaction) GetTransactionDesc ¶ added in v1.2.1
func (x *StkTransaction) GetTransactionDesc() string
func (*StkTransaction) GetTransactionId ¶
func (x *StkTransaction) GetTransactionId() string
func (*StkTransaction) GetTransactionTimestamp ¶
func (x *StkTransaction) GetTransactionTimestamp() int64
func (*StkTransaction) ProtoMessage ¶
func (*StkTransaction) ProtoMessage()
func (*StkTransaction) ProtoReflect ¶
func (x *StkTransaction) ProtoReflect() protoreflect.Message
func (*StkTransaction) Reset ¶
func (x *StkTransaction) Reset()
func (*StkTransaction) String ¶
func (x *StkTransaction) String() string
type UnimplementedStkPushAPIServer ¶
type UnimplementedStkPushAPIServer struct { }
UnimplementedStkPushAPIServer must be embedded to have forward compatible implementations.
func (UnimplementedStkPushAPIServer) CreateStkTransaction ¶
func (UnimplementedStkPushAPIServer) CreateStkTransaction(context.Context, *CreateStkTransactionRequest) (*StkTransaction, error)
func (UnimplementedStkPushAPIServer) GetStkTransaction ¶
func (UnimplementedStkPushAPIServer) GetStkTransaction(context.Context, *GetStkTransactionRequest) (*StkTransaction, error)
func (UnimplementedStkPushAPIServer) InitiateSTKPush ¶
func (UnimplementedStkPushAPIServer) InitiateSTKPush(context.Context, *InitiateSTKPushRequest) (*InitiateSTKPushResponse, error)
func (UnimplementedStkPushAPIServer) ListStkTransactions ¶
func (UnimplementedStkPushAPIServer) ListStkTransactions(context.Context, *ListStkTransactionsRequest) (*ListStkTransactionsResponse, error)
func (UnimplementedStkPushAPIServer) ProcessStkTransaction ¶
func (UnimplementedStkPushAPIServer) ProcessStkTransaction(context.Context, *ProcessStkTransactionRequest) (*emptypb.Empty, error)
func (UnimplementedStkPushAPIServer) PublishStkTransaction ¶
func (UnimplementedStkPushAPIServer) PublishStkTransaction(context.Context, *PublishStkTransactionRequest) (*emptypb.Empty, error)
type UnsafeStkPushAPIServer ¶
type UnsafeStkPushAPIServer interface {
// contains filtered or unexported methods
}
UnsafeStkPushAPIServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to StkPushAPIServer will result in compilation errors.