stk_v1

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2023 License: GPL-3.0, MIT Imports: 18 Imported by: 0

Documentation

Overview

Package stk_v1 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_SUBMITED",
		2: "STK_REQUEST_FAILED",
		3: "STK_REQUEST_SUCCESS",
		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_SUBMITED": 1,
		"STK_REQUEST_FAILED":   2,
		"STK_REQUEST_SUCCESS":  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 (
	ListStkTransactionsView_name = map[int32]string{
		0: "BASIC_VIEW",
		1: "DATA_ONLY_VIEW",
		2: "MINIMAL_VIEW",
	}
	ListStkTransactionsView_value = map[string]int32{
		"BASIC_VIEW":     0,
		"DATA_ONLY_VIEW": 1,
		"MINIMAL_VIEW":   2,
	}
)

Enum value maps for ListStkTransactionsView.

View Source
var File_stk_v1_proto protoreflect.FileDescriptor

Functions

func RegisterStkPushV1Handler

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

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

func RegisterStkPushV1HandlerClient

func RegisterStkPushV1HandlerClient(ctx context.Context, mux *runtime.ServeMux, client StkPushV1Client) error

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

func RegisterStkPushV1HandlerFromEndpoint

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

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

func RegisterStkPushV1HandlerServer

func RegisterStkPushV1HandlerServer(ctx context.Context, mux *runtime.ServeMux, server StkPushV1Server) error

RegisterStkPushV1HandlerServer registers the http handlers for service StkPushV1 to "mux". UnaryRPC :call StkPushV1Server 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 RegisterStkPushV1HandlerFromEndpoint instead.

func RegisterStkPushV1Server

func RegisterStkPushV1Server(s grpc.ServiceRegistrar, srv StkPushV1Server)

Types

type CreateStkTransactionRequest

type CreateStkTransactionRequest struct {
	Payload *StkTransaction `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,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) 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  uint64 `protobuf:"varint,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() uint64

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 InitiateSTKRequest

type InitiateSTKRequest 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 (*InitiateSTKRequest) Descriptor deprecated

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

Deprecated: Use InitiateSTKRequest.ProtoReflect.Descriptor instead.

func (*InitiateSTKRequest) GetAccountReference

func (x *InitiateSTKRequest) GetAccountReference() string

func (*InitiateSTKRequest) GetAmount

func (x *InitiateSTKRequest) GetAmount() float64

func (*InitiateSTKRequest) GetInitiatorCustomerNames

func (x *InitiateSTKRequest) GetInitiatorCustomerNames() string

func (*InitiateSTKRequest) GetInitiatorCustomerReference

func (x *InitiateSTKRequest) GetInitiatorCustomerReference() string

func (*InitiateSTKRequest) GetInitiatorId

func (x *InitiateSTKRequest) GetInitiatorId() string

func (*InitiateSTKRequest) GetInitiatorTransactionReference

func (x *InitiateSTKRequest) GetInitiatorTransactionReference() string

func (*InitiateSTKRequest) GetPhone

func (x *InitiateSTKRequest) GetPhone() string

func (*InitiateSTKRequest) GetPublish

func (x *InitiateSTKRequest) GetPublish() bool

func (*InitiateSTKRequest) GetPublishMessage

func (x *InitiateSTKRequest) GetPublishMessage() *PublishInfo

func (*InitiateSTKRequest) GetShortCode

func (x *InitiateSTKRequest) GetShortCode() string

func (*InitiateSTKRequest) GetTransactionDesc

func (x *InitiateSTKRequest) GetTransactionDesc() string

func (*InitiateSTKRequest) ProtoMessage

func (*InitiateSTKRequest) ProtoMessage()

func (*InitiateSTKRequest) ProtoReflect

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

func (*InitiateSTKRequest) Reset

func (x *InitiateSTKRequest) Reset()

func (*InitiateSTKRequest) String

func (x *InitiateSTKRequest) String() string

type InitiateSTKResponse

type InitiateSTKResponse 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 (*InitiateSTKResponse) Descriptor deprecated

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

Deprecated: Use InitiateSTKResponse.ProtoReflect.Descriptor instead.

func (*InitiateSTKResponse) GetMessage

func (x *InitiateSTKResponse) GetMessage() string

func (*InitiateSTKResponse) GetProgress

func (x *InitiateSTKResponse) GetProgress() bool

func (*InitiateSTKResponse) ProtoMessage

func (*InitiateSTKResponse) ProtoMessage()

func (*InitiateSTKResponse) ProtoReflect

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

func (*InitiateSTKResponse) Reset

func (x *InitiateSTKResponse) Reset()

func (*InitiateSTKResponse) String

func (x *InitiateSTKResponse) 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       `` /* 133-byte string literal not displayed */
	ProcessState                   StkProcessedState `` /* 137-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     `` /* 128-byte string literal not displayed */
	// 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"`
	View      ListStkTransactionsView   `protobuf:"varint,4,opt,name=view,proto3,enum=gidyon.mpesastk.ListStkTransactionsView" json:"view,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) GetView added in v0.0.4

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 ListStkTransactionsView added in v0.0.4

type ListStkTransactionsView int32
const (
	ListStkTransactionsView_BASIC_VIEW     ListStkTransactionsView = 0
	ListStkTransactionsView_DATA_ONLY_VIEW ListStkTransactionsView = 1
	ListStkTransactionsView_MINIMAL_VIEW   ListStkTransactionsView = 2
)

func (ListStkTransactionsView) Descriptor added in v0.0.4

func (ListStkTransactionsView) Enum added in v0.0.4

func (ListStkTransactionsView) EnumDescriptor deprecated added in v0.0.4

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

Deprecated: Use ListStkTransactionsView.Descriptor instead.

func (ListStkTransactionsView) Number added in v0.0.4

func (ListStkTransactionsView) String added in v0.0.4

func (x ListStkTransactionsView) String() string

func (ListStkTransactionsView) Type added in v0.0.4

type ProcessStkTransactionRequest

type ProcessStkTransactionRequest struct {
	TransactionId  uint64 `protobuf:"varint,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() uint64

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 {
	TransactionId   uint64          `protobuf:"varint,1,opt,name=transaction_id,json=transactionId,proto3" json:"transaction_id,omitempty"`
	InitiatorId     string          `protobuf:"bytes,2,opt,name=initiator_id,json=initiatorId,proto3" json:"initiator_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() uint64

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 `` /* 143-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 StkPushV1Client

type StkPushV1Client interface {
	// Initiates mpesa stk.
	InitiateSTK(ctx context.Context, in *InitiateSTKRequest, opts ...grpc.CallOption) (*InitiateSTKResponse, error)
	// Retrieves a single stk transaction.
	GetStkTransaction(ctx context.Context, in *GetStkTransactionRequest, opts ...grpc.CallOption) (*StkTransaction, error)
	// Retrieves a collection of stk transactions.
	ListStkTransactions(ctx context.Context, in *ListStkTransactionsRequest, opts ...grpc.CallOption) (*ListStkTransactionsResponse, error)
	// Processes stk transaction updating its status.
	ProcessStkTransaction(ctx context.Context, in *ProcessStkTransactionRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// Publishes stk transaction to consumers.
	PublishStkTransaction(ctx context.Context, in *PublishStkTransactionRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
}

StkPushV1Client is the client API for StkPushV1 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 NewStkPushV1Client

func NewStkPushV1Client(cc grpc.ClientConnInterface) StkPushV1Client

type StkPushV1Server

type StkPushV1Server interface {
	// Initiates mpesa stk.
	InitiateSTK(context.Context, *InitiateSTKRequest) (*InitiateSTKResponse, error)
	// Retrieves a single stk transaction.
	GetStkTransaction(context.Context, *GetStkTransactionRequest) (*StkTransaction, error)
	// Retrieves a collection of stk transactions.
	ListStkTransactions(context.Context, *ListStkTransactionsRequest) (*ListStkTransactionsResponse, error)
	// Processes stk transaction updating its status.
	ProcessStkTransaction(context.Context, *ProcessStkTransactionRequest) (*emptypb.Empty, error)
	// Publishes stk transaction to consumers.
	PublishStkTransaction(context.Context, *PublishStkTransactionRequest) (*emptypb.Empty, error)
	// contains filtered or unexported methods
}

StkPushV1Server is the server API for StkPushV1 service. All implementations must embed UnimplementedStkPushV1Server for forward compatibility

type StkStatus

type StkStatus int32
const (
	StkStatus_STK_STATUS_UNKNOWN   StkStatus = 0
	StkStatus_STK_REQUEST_SUBMITED StkStatus = 1
	StkStatus_STK_REQUEST_FAILED   StkStatus = 2
	StkStatus_STK_REQUEST_SUCCESS  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 {
	TransactionId              uint64    `protobuf:"varint,1,opt,name=transaction_id,json=transactionId,proto3" json:"transaction_id,omitempty"`
	InitiatorId                string    `protobuf:"bytes,2,opt,name=initiator_id,json=initiatorId,proto3" json:"initiator_id,omitempty"`
	InitiatorCustomerReference string    `` /* 141-byte string literal not displayed */
	InitiatorCustomerNames     string    `` /* 129-byte string literal not displayed */
	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"`
	Amount                     string    `protobuf:"bytes,7,opt,name=amount,proto3" json:"amount,omitempty"`
	PhoneNumber                string    `protobuf:"bytes,8,opt,name=phone_number,json=phoneNumber,proto3" json:"phone_number,omitempty"`
	TransactionDesc            string    `protobuf:"bytes,9,opt,name=transaction_desc,json=transactionDesc,proto3" json:"transaction_desc,omitempty"`
	MerchantRequestId          string    `protobuf:"bytes,10,opt,name=merchant_request_id,json=merchantRequestId,proto3" json:"merchant_request_id,omitempty"`
	CheckoutRequestId          string    `protobuf:"bytes,11,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,13,opt,name=stk_response_code,json=stkResponseCode,proto3" json:"stk_response_code,omitempty"`
	StkResultCode              string    `protobuf:"bytes,14,opt,name=stk_result_code,json=stkResultCode,proto3" json:"stk_result_code,omitempty"`
	StkResultDesc              string    `protobuf:"bytes,15,opt,name=stk_result_desc,json=stkResultDesc,proto3" json:"stk_result_desc,omitempty"`
	MpesaReceiptId             string    `protobuf:"bytes,16,opt,name=mpesa_receipt_id,json=mpesaReceiptId,proto3" json:"mpesa_receipt_id,omitempty"`
	Balance                    string    `protobuf:"bytes,17,opt,name=balance,proto3" json:"balance,omitempty"`
	Status                     StkStatus `protobuf:"varint,18,opt,name=status,proto3,enum=gidyon.mpesastk.StkStatus" json:"status,omitempty"`
	Source                     string    `protobuf:"bytes,19,opt,name=source,proto3" json:"source,omitempty"`
	Tag                        string    `protobuf:"bytes,20,opt,name=tag,proto3" json:"tag,omitempty"`
	Succeeded                  bool      `protobuf:"varint,21,opt,name=succeeded,proto3" json:"succeeded,omitempty"`
	Processed                  bool      `protobuf:"varint,22,opt,name=processed,proto3" json:"processed,omitempty"`
	TransactionTimestamp       int64     `protobuf:"varint,23,opt,name=transaction_timestamp,json=transactionTimestamp,proto3" json:"transaction_timestamp,omitempty"`
	CreateTimestamp            int64     `protobuf:"varint,24,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) 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() uint64

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 TriggerSTKRequest added in v0.0.4

type TriggerSTKRequest struct {
	Phone            string  `protobuf:"bytes,1,opt,name=phone,proto3" json:"phone,omitempty"`
	Amount           float64 `protobuf:"fixed64,2,opt,name=amount,proto3" json:"amount,omitempty"`
	AccountReference string  `protobuf:"bytes,3,opt,name=account_reference,json=accountReference,proto3" json:"account_reference,omitempty"`
	TransactionDesc  string  `protobuf:"bytes,4,opt,name=transaction_desc,json=transactionDesc,proto3" json:"transaction_desc,omitempty"`
	WaitDur          int64   `protobuf:"varint,5,opt,name=wait_dur,json=waitDur,proto3" json:"wait_dur,omitempty"`
	// contains filtered or unexported fields
}

func (*TriggerSTKRequest) Descriptor deprecated added in v0.0.4

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

Deprecated: Use TriggerSTKRequest.ProtoReflect.Descriptor instead.

func (*TriggerSTKRequest) GetAccountReference added in v0.0.4

func (x *TriggerSTKRequest) GetAccountReference() string

func (*TriggerSTKRequest) GetAmount added in v0.0.4

func (x *TriggerSTKRequest) GetAmount() float64

func (*TriggerSTKRequest) GetPhone added in v0.0.4

func (x *TriggerSTKRequest) GetPhone() string

func (*TriggerSTKRequest) GetTransactionDesc added in v0.0.4

func (x *TriggerSTKRequest) GetTransactionDesc() string

func (*TriggerSTKRequest) GetWaitDur added in v0.0.4

func (x *TriggerSTKRequest) GetWaitDur() int64

func (*TriggerSTKRequest) ProtoMessage added in v0.0.4

func (*TriggerSTKRequest) ProtoMessage()

func (*TriggerSTKRequest) ProtoReflect added in v0.0.4

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

func (*TriggerSTKRequest) Reset added in v0.0.4

func (x *TriggerSTKRequest) Reset()

func (*TriggerSTKRequest) String added in v0.0.4

func (x *TriggerSTKRequest) String() string

type TriggerSTKResponse added in v0.0.4

type TriggerSTKResponse struct {
	Phone            string  `protobuf:"bytes,1,opt,name=phone,proto3" json:"phone,omitempty"`
	Amount           float64 `protobuf:"fixed64,2,opt,name=amount,proto3" json:"amount,omitempty"`
	AccountReference string  `protobuf:"bytes,3,opt,name=account_reference,json=accountReference,proto3" json:"account_reference,omitempty"`
	TransactionDesc  string  `protobuf:"bytes,4,opt,name=transaction_desc,json=transactionDesc,proto3" json:"transaction_desc,omitempty"`
	WaitDur          int64   `protobuf:"varint,5,opt,name=wait_dur,json=waitDur,proto3" json:"wait_dur,omitempty"`
	// contains filtered or unexported fields
}

func (*TriggerSTKResponse) Descriptor deprecated added in v0.0.4

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

Deprecated: Use TriggerSTKResponse.ProtoReflect.Descriptor instead.

func (*TriggerSTKResponse) GetAccountReference added in v0.0.4

func (x *TriggerSTKResponse) GetAccountReference() string

func (*TriggerSTKResponse) GetAmount added in v0.0.4

func (x *TriggerSTKResponse) GetAmount() float64

func (*TriggerSTKResponse) GetPhone added in v0.0.4

func (x *TriggerSTKResponse) GetPhone() string

func (*TriggerSTKResponse) GetTransactionDesc added in v0.0.4

func (x *TriggerSTKResponse) GetTransactionDesc() string

func (*TriggerSTKResponse) GetWaitDur added in v0.0.4

func (x *TriggerSTKResponse) GetWaitDur() int64

func (*TriggerSTKResponse) ProtoMessage added in v0.0.4

func (*TriggerSTKResponse) ProtoMessage()

func (*TriggerSTKResponse) ProtoReflect added in v0.0.4

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

func (*TriggerSTKResponse) Reset added in v0.0.4

func (x *TriggerSTKResponse) Reset()

func (*TriggerSTKResponse) String added in v0.0.4

func (x *TriggerSTKResponse) String() string

type UnimplementedStkPushV1Server

type UnimplementedStkPushV1Server struct {
}

UnimplementedStkPushV1Server must be embedded to have forward compatible implementations.

func (UnimplementedStkPushV1Server) GetStkTransaction

func (UnimplementedStkPushV1Server) InitiateSTK

func (UnimplementedStkPushV1Server) ProcessStkTransaction

func (UnimplementedStkPushV1Server) PublishStkTransaction

type UnsafeStkPushV1Server

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

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

Jump to

Keyboard shortcuts

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