v2

package
v1.2.8 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2022 License: GPL-3.0 Imports: 18 Imported by: 0

Documentation

Overview

Package v2 is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var (
	StkStatus_name = map[int32]string{
		0: "STK_STATUS_UNKNOWN",
		1: "STK_REQUEST_FAILED",
		3: "STK_REQUEST_SUBMITED",
		4: "STK_RESULT_SUCCESS",
		5: "STK_RESULT_FAILED",
		6: "STK_SUCCESS",
		7: "STK_FAILED",
	}
	StkStatus_value = map[string]int32{
		"STK_STATUS_UNKNOWN":   0,
		"STK_REQUEST_FAILED":   1,
		"STK_REQUEST_SUBMITED": 3,
		"STK_RESULT_SUCCESS":   4,
		"STK_RESULT_FAILED":    5,
		"STK_SUCCESS":          6,
		"STK_FAILED":           7,
	}
)

Enum value maps for StkStatus.

View Source
var (
	StkOrderField_name = map[int32]string{
		0: "STK_ORDER_FIELD_UNSPECIFIED",
		1: "CREATE_TIMESTAMP",
		2: "TRANSACTION_TIMESTAMP",
	}
	StkOrderField_value = map[string]int32{
		"STK_ORDER_FIELD_UNSPECIFIED": 0,
		"CREATE_TIMESTAMP":            1,
		"TRANSACTION_TIMESTAMP":       2,
	}
)

Enum value maps for StkOrderField.

View Source
var (
	StkProcessedState_name = map[int32]string{
		0: "STK_PROCESS_STATE_UNSPECIFIED",
		1: "STK_PROCESSED",
		2: "STK_NOT_PROCESSED",
	}
	StkProcessedState_value = map[string]int32{
		"STK_PROCESS_STATE_UNSPECIFIED": 0,
		"STK_PROCESSED":                 1,
		"STK_NOT_PROCESSED":             2,
	}
)

Enum value maps for StkProcessedState.

View Source
var File_stk_v2_proto protoreflect.FileDescriptor

Functions

func RegisterStkPushV2Handler

func RegisterStkPushV2Handler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterStkPushV2Handler registers the http handlers for service StkPushV2 to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterStkPushV2HandlerClient

func RegisterStkPushV2HandlerClient(ctx context.Context, mux *runtime.ServeMux, client StkPushV2Client) error

RegisterStkPushV2HandlerClient registers the http handlers for service StkPushV2 to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "StkPushV2Client". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "StkPushV2Client" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "StkPushV2Client" to call the correct interceptors.

func RegisterStkPushV2HandlerFromEndpoint

func RegisterStkPushV2HandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterStkPushV2HandlerFromEndpoint is same as RegisterStkPushV2Handler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterStkPushV2HandlerServer

func RegisterStkPushV2HandlerServer(ctx context.Context, mux *runtime.ServeMux, server StkPushV2Server) error

RegisterStkPushV2HandlerServer registers the http handlers for service StkPushV2 to "mux". UnaryRPC :call StkPushV2Server 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 RegisterStkPushV2HandlerFromEndpoint instead.

func RegisterStkPushV2Server

func RegisterStkPushV2Server(s grpc.ServiceRegistrar, srv StkPushV2Server)

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 (*CreateStkTransactionRequest) GetPublish

func (x *CreateStkTransactionRequest) GetPublish() bool

func (*CreateStkTransactionRequest) ProtoMessage

func (*CreateStkTransactionRequest) ProtoMessage()

func (*CreateStkTransactionRequest) ProtoReflect

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"`
	InitiatorTransactionReference string       `` /* 150-byte string literal not displayed */
	InitiatorCustomerReference    string       `` /* 141-byte string literal not displayed */
	InitiatorCustomerNames        string       `` /* 129-byte string literal not displayed */
	Phone                         string       `protobuf:"bytes,5,opt,name=phone,proto3" json:"phone,omitempty"`
	Amount                        float64      `protobuf:"fixed64,6,opt,name=amount,proto3" json:"amount,omitempty"`
	ShortCode                     string       `protobuf:"bytes,7,opt,name=short_code,json=shortCode,proto3" json:"short_code,omitempty"`
	AccountReference              string       `protobuf:"bytes,8,opt,name=account_reference,json=accountReference,proto3" json:"account_reference,omitempty"`
	TransactionDesc               string       `protobuf:"bytes,9,opt,name=transaction_desc,json=transactionDesc,proto3" json:"transaction_desc,omitempty"`
	Publish                       bool         `protobuf:"varint,10,opt,name=publish,proto3" json:"publish,omitempty"`
	PublishMessage                *PublishInfo `protobuf:"bytes,11,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

func (x *InitiateSTKPushRequest) GetAccountReference() string

func (*InitiateSTKPushRequest) GetAmount

func (x *InitiateSTKPushRequest) GetAmount() float64

func (*InitiateSTKPushRequest) GetInitiatorCustomerNames

func (x *InitiateSTKPushRequest) GetInitiatorCustomerNames() string

func (*InitiateSTKPushRequest) GetInitiatorCustomerReference

func (x *InitiateSTKPushRequest) GetInitiatorCustomerReference() string

func (*InitiateSTKPushRequest) GetInitiatorId

func (x *InitiateSTKPushRequest) GetInitiatorId() string

func (*InitiateSTKPushRequest) GetInitiatorTransactionReference

func (x *InitiateSTKPushRequest) GetInitiatorTransactionReference() 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) GetShortCode

func (x *InitiateSTKPushRequest) GetShortCode() string

func (*InitiateSTKPushRequest) GetTransactionDesc

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"`
	MpesaReceipts                  []string          `protobuf:"bytes,3,rep,name=mpesa_receipts,json=mpesaReceipts,proto3" json:"mpesa_receipts,omitempty"`
	InitiatorCustomerReferences    []string          `` /* 144-byte string literal not displayed */
	InitiatorTransactionReferences []string          `` /* 153-byte string literal not displayed */
	ShortCodes                     []string          `protobuf:"bytes,6,rep,name=short_codes,json=shortCodes,proto3" json:"short_codes,omitempty"`
	StkStatuses                    []StkStatus       `` /* 130-byte string literal not displayed */
	ProcessState                   StkProcessedState `` /* 134-byte string literal not displayed */
	StartTimestamp                 int64             `protobuf:"varint,9,opt,name=start_timestamp,json=startTimestamp,proto3" json:"start_timestamp,omitempty"`
	EndTimestamp                   int64             `protobuf:"varint,10,opt,name=end_timestamp,json=endTimestamp,proto3" json:"end_timestamp,omitempty"`
	OrderField                     StkOrderField     `protobuf:"varint,11,opt,name=order_field,json=orderField,proto3,enum=gidyon.mpesa.StkOrderField" 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) GetInitiatorCustomerReferences

func (x *ListStkTransactionFilter) GetInitiatorCustomerReferences() []string

func (*ListStkTransactionFilter) GetInitiatorTransactionReferences

func (x *ListStkTransactionFilter) GetInitiatorTransactionReferences() []string

func (*ListStkTransactionFilter) GetMpesaReceipts

func (x *ListStkTransactionFilter) GetMpesaReceipts() []string

func (*ListStkTransactionFilter) GetMsisdns

func (x *ListStkTransactionFilter) GetMsisdns() []string

func (*ListStkTransactionFilter) GetOrderField

func (x *ListStkTransactionFilter) GetOrderField() StkOrderField

func (*ListStkTransactionFilter) GetProcessState

func (x *ListStkTransactionFilter) GetProcessState() StkProcessedState

func (*ListStkTransactionFilter) GetShortCodes

func (x *ListStkTransactionFilter) GetShortCodes() []string

func (*ListStkTransactionFilter) GetStartTimestamp

func (x *ListStkTransactionFilter) GetStartTimestamp() int64

func (*ListStkTransactionFilter) GetStkStatuses

func (x *ListStkTransactionFilter) GetStkStatuses() []StkStatus

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 (*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 (*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

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 (*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 (*ProcessStkTransactionRequest) Reset

func (x *ProcessStkTransactionRequest) Reset()

func (*ProcessStkTransactionRequest) 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 StkProcessedState `` /* 140-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() StkProcessedState

func (*PublishStkTransactionRequest) GetPublishMessage

func (x *PublishStkTransactionRequest) GetPublishMessage() *PublishMessage

func (*PublishStkTransactionRequest) ProtoMessage

func (*PublishStkTransactionRequest) ProtoMessage()

func (*PublishStkTransactionRequest) ProtoReflect

func (*PublishStkTransactionRequest) Reset

func (x *PublishStkTransactionRequest) Reset()

func (*PublishStkTransactionRequest) String

type StkOrderField

type StkOrderField int32
const (
	StkOrderField_STK_ORDER_FIELD_UNSPECIFIED StkOrderField = 0
	StkOrderField_CREATE_TIMESTAMP            StkOrderField = 1
	StkOrderField_TRANSACTION_TIMESTAMP       StkOrderField = 2
)

func (StkOrderField) Descriptor

func (StkOrderField) Enum

func (x StkOrderField) Enum() *StkOrderField

func (StkOrderField) EnumDescriptor deprecated

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

Deprecated: Use StkOrderField.Descriptor instead.

func (StkOrderField) Number

func (StkOrderField) String

func (x StkOrderField) String() string

func (StkOrderField) Type

type StkProcessedState

type StkProcessedState int32
const (
	StkProcessedState_STK_PROCESS_STATE_UNSPECIFIED StkProcessedState = 0
	StkProcessedState_STK_PROCESSED                 StkProcessedState = 1
	StkProcessedState_STK_NOT_PROCESSED             StkProcessedState = 2
)

func (StkProcessedState) Descriptor

func (StkProcessedState) Enum

func (StkProcessedState) EnumDescriptor deprecated

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

Deprecated: Use StkProcessedState.Descriptor instead.

func (StkProcessedState) Number

func (StkProcessedState) String

func (x StkProcessedState) String() string

func (StkProcessedState) Type

type StkPushV2Client

type StkPushV2Client 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)
	// 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)
}

StkPushV2Client is the client API for StkPushV2 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 NewStkPushV2Client

func NewStkPushV2Client(cc grpc.ClientConnInterface) StkPushV2Client

type StkPushV2Server

type StkPushV2Server interface {
	// Initiates mpesa payment.
	InitiateSTKPush(context.Context, *InitiateSTKPushRequest) (*InitiateSTKPushResponse, error)
	// Retrieves a single stk payload
	GetStkTransaction(context.Context, *GetStkTransactionRequest) (*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
}

StkPushV2Server is the server API for StkPushV2 service. All implementations must embed UnimplementedStkPushV2Server for forward compatibility

type StkStatus

type StkStatus int32
const (
	StkStatus_STK_STATUS_UNKNOWN   StkStatus = 0
	StkStatus_STK_REQUEST_FAILED   StkStatus = 1
	StkStatus_STK_REQUEST_SUBMITED StkStatus = 3
	StkStatus_STK_RESULT_SUCCESS   StkStatus = 4
	StkStatus_STK_RESULT_FAILED    StkStatus = 5
	StkStatus_STK_SUCCESS          StkStatus = 6
	StkStatus_STK_FAILED           StkStatus = 7
)

func (StkStatus) Descriptor

func (StkStatus) Descriptor() protoreflect.EnumDescriptor

func (StkStatus) Enum

func (x StkStatus) Enum() *StkStatus

func (StkStatus) EnumDescriptor deprecated

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

Deprecated: Use StkStatus.Descriptor instead.

func (StkStatus) Number

func (x StkStatus) Number() protoreflect.EnumNumber

func (StkStatus) String

func (x StkStatus) String() string

func (StkStatus) Type

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"`
	InitiatorTransactionReference string    `` /* 150-byte string literal not displayed */
	InitiatorCustomerReference    string    `` /* 141-byte string literal not displayed */
	InitiatorCustomerNames        string    `` /* 129-byte string literal not displayed */
	ShortCode                     string    `protobuf:"bytes,6,opt,name=short_code,json=shortCode,proto3" json:"short_code,omitempty"`
	AccountReference              string    `protobuf:"bytes,7,opt,name=account_reference,json=accountReference,proto3" json:"account_reference,omitempty"`
	Amount                        string    `protobuf:"bytes,8,opt,name=amount,proto3" json:"amount,omitempty"`
	PhoneNumber                   string    `protobuf:"bytes,9,opt,name=phone_number,json=phoneNumber,proto3" json:"phone_number,omitempty"`
	TransactionDesc               string    `protobuf:"bytes,10,opt,name=transaction_desc,json=transactionDesc,proto3" json:"transaction_desc,omitempty"`
	MerchantRequestId             string    `protobuf:"bytes,11,opt,name=merchant_request_id,json=merchantRequestId,proto3" json:"merchant_request_id,omitempty"`
	CheckoutRequestId             string    `protobuf:"bytes,12,opt,name=checkout_request_id,json=checkoutRequestId,proto3" json:"checkout_request_id,omitempty"`
	StkResponseDescription        string    `` /* 130-byte string literal not displayed */
	StkResponseCode               string    `protobuf:"bytes,14,opt,name=stk_response_code,json=stkResponseCode,proto3" json:"stk_response_code,omitempty"`
	StkResultCode                 string    `protobuf:"bytes,15,opt,name=stk_result_code,json=stkResultCode,proto3" json:"stk_result_code,omitempty"`
	StkResultDesc                 string    `protobuf:"bytes,16,opt,name=stk_result_desc,json=stkResultDesc,proto3" json:"stk_result_desc,omitempty"`
	MpesaReceiptId                string    `protobuf:"bytes,17,opt,name=mpesa_receipt_id,json=mpesaReceiptId,proto3" json:"mpesa_receipt_id,omitempty"`
	Balance                       string    `protobuf:"bytes,18,opt,name=balance,proto3" json:"balance,omitempty"`
	Status                        StkStatus `protobuf:"varint,19,opt,name=status,proto3,enum=gidyon.mpesa.StkStatus" json:"status,omitempty"`
	Source                        string    `protobuf:"bytes,20,opt,name=source,proto3" json:"source,omitempty"`
	Tag                           string    `protobuf:"bytes,21,opt,name=tag,proto3" json:"tag,omitempty"`
	Succeeded                     bool      `protobuf:"varint,22,opt,name=succeeded,proto3" json:"succeeded,omitempty"`
	Processed                     bool      `protobuf:"varint,23,opt,name=processed,proto3" json:"processed,omitempty"`
	TransactionTimestamp          int64     `protobuf:"varint,24,opt,name=transaction_timestamp,json=transactionTimestamp,proto3" json:"transaction_timestamp,omitempty"`
	CreateTimestamp               int64     `protobuf:"varint,25,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

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) GetInitiatorCustomerNames

func (x *StkTransaction) GetInitiatorCustomerNames() string

func (*StkTransaction) GetInitiatorCustomerReference

func (x *StkTransaction) GetInitiatorCustomerReference() string

func (*StkTransaction) GetInitiatorId

func (x *StkTransaction) GetInitiatorId() string

func (*StkTransaction) GetInitiatorTransactionReference

func (x *StkTransaction) GetInitiatorTransactionReference() 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) GetShortCode

func (x *StkTransaction) GetShortCode() string

func (*StkTransaction) GetSource

func (x *StkTransaction) GetSource() string

func (*StkTransaction) GetStatus

func (x *StkTransaction) GetStatus() StkStatus

func (*StkTransaction) GetStkResponseCode

func (x *StkTransaction) GetStkResponseCode() string

func (*StkTransaction) GetStkResponseDescription

func (x *StkTransaction) GetStkResponseDescription() string

func (*StkTransaction) GetStkResultCode

func (x *StkTransaction) GetStkResultCode() string

func (*StkTransaction) GetStkResultDesc

func (x *StkTransaction) GetStkResultDesc() string

func (*StkTransaction) GetSucceeded

func (x *StkTransaction) GetSucceeded() bool

func (*StkTransaction) GetTag

func (x *StkTransaction) GetTag() string

func (*StkTransaction) GetTransactionDesc

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 UnimplementedStkPushV2Server

type UnimplementedStkPushV2Server struct {
}

UnimplementedStkPushV2Server must be embedded to have forward compatible implementations.

func (UnimplementedStkPushV2Server) GetStkTransaction

func (UnimplementedStkPushV2Server) InitiateSTKPush

func (UnimplementedStkPushV2Server) ProcessStkTransaction

func (UnimplementedStkPushV2Server) PublishStkTransaction

type UnsafeStkPushV2Server

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

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

Jump to

Keyboard shortcuts

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