rest

package
v0.0.29 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2021 License: MIT Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// StaticDir is the directory that contains schemata, default images etc
	StaticDir = "github.com/savannahghi/engagementcore:/static/"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type PresentationHandlers

type PresentationHandlers interface {
	GoogleCloudPubSubHandler(w http.ResponseWriter, r *http.Request)
	GetFeed() http.HandlerFunc

	GetFeedItem() http.HandlerFunc

	GetNudge() http.HandlerFunc

	GetAction() http.HandlerFunc

	PublishFeedItem() http.HandlerFunc

	DeleteFeedItem() http.HandlerFunc

	ResolveFeedItem() http.HandlerFunc

	PinFeedItem() http.HandlerFunc

	UnpinFeedItem() http.HandlerFunc

	HideFeedItem() http.HandlerFunc

	ShowFeedItem() http.HandlerFunc

	UnresolveFeedItem() http.HandlerFunc

	PublishNudge() http.HandlerFunc

	ResolveNudge() http.HandlerFunc

	ResolveDefaultNudge() http.HandlerFunc

	UnresolveNudge() http.HandlerFunc

	HideNudge() http.HandlerFunc

	ShowNudge() http.HandlerFunc

	DeleteNudge() http.HandlerFunc

	PublishAction() http.HandlerFunc

	DeleteAction() http.HandlerFunc

	PostMessage() http.HandlerFunc

	DeleteMessage() http.HandlerFunc

	ProcessEvent() http.HandlerFunc

	Upload() http.HandlerFunc

	FindUpload() http.HandlerFunc

	SendEmail() http.HandlerFunc

	SendToMany() http.HandlerFunc

	GetNotificationHandler() http.HandlerFunc

	GetIncomingMessageHandler() http.HandlerFunc

	GetFallbackHandler() http.HandlerFunc

	PhoneNumberVerificationCodeHandler() http.HandlerFunc

	SendOTPHandler() http.HandlerFunc

	SendRetryOTPHandler() http.HandlerFunc

	VerifyRetryOTPHandler() http.HandlerFunc

	VerifyRetryEmailOTPHandler() http.HandlerFunc

	SendNotificationHandler() http.HandlerFunc

	UpdateMailgunDeliveryStatus() http.HandlerFunc

	DataDeletionRequestCallback() http.HandlerFunc

	GetTwilioVideoCallbackFunc() http.HandlerFunc

	SendTemporaryPIN() http.HandlerFunc
}

PresentationHandlers represents all the REST API logic

func NewPresentationHandlers

func NewPresentationHandlers(infrastructure infrastructure.Interactor, usecases usecases.Interactor) PresentationHandlers

NewPresentationHandlers initializes a new rest handlers usecase

type PresentationHandlersImpl

type PresentationHandlersImpl struct {
	// contains filtered or unexported fields
}

PresentationHandlersImpl represents the usecase implementation object

func (PresentationHandlersImpl) DataDeletionRequestCallback

func (p PresentationHandlersImpl) DataDeletionRequestCallback() http.HandlerFunc

DataDeletionRequestCallback is a Facebook's data deletion request callback

func (PresentationHandlersImpl) DeleteAction

func (p PresentationHandlersImpl) DeleteAction() http.HandlerFunc

DeleteAction permanently removes an action from a user's feed

func (PresentationHandlersImpl) DeleteFeedItem

func (p PresentationHandlersImpl) DeleteFeedItem() http.HandlerFunc

DeleteFeedItem removes a feed item

func (PresentationHandlersImpl) DeleteMessage

func (p PresentationHandlersImpl) DeleteMessage() http.HandlerFunc

DeleteMessage removes a message from a thread

func (PresentationHandlersImpl) DeleteNudge

func (p PresentationHandlersImpl) DeleteNudge() http.HandlerFunc

DeleteNudge permanently deletes a nudge

func (PresentationHandlersImpl) FindUpload

func (p PresentationHandlersImpl) FindUpload() http.HandlerFunc

FindUpload retrieves an upload by it's ID

func (PresentationHandlersImpl) GetAction

GetAction retrieves a single action

func (PresentationHandlersImpl) GetFallbackHandler

func (p PresentationHandlersImpl) GetFallbackHandler() http.HandlerFunc

GetFallbackHandler returns a handler that processes an Africa's Talking payment notification

func (PresentationHandlersImpl) GetFeed

GetFeed retrieves and serves a feed

func (PresentationHandlersImpl) GetFeedItem

func (p PresentationHandlersImpl) GetFeedItem() http.HandlerFunc

GetFeedItem retrieves a single feed item

func (PresentationHandlersImpl) GetIncomingMessageHandler

func (p PresentationHandlersImpl) GetIncomingMessageHandler() http.HandlerFunc

GetIncomingMessageHandler returns a handler that processes an Africa's Talking payment notification

func (PresentationHandlersImpl) GetNotificationHandler

func (p PresentationHandlersImpl) GetNotificationHandler() http.HandlerFunc

GetNotificationHandler returns a handler that processes an Africa's Talking payment notification

func (PresentationHandlersImpl) GetNudge

GetNudge retrieves a single nudge

func (PresentationHandlersImpl) GetTwilioVideoCallbackFunc

func (p PresentationHandlersImpl) GetTwilioVideoCallbackFunc() http.HandlerFunc

GetTwilioVideoCallbackFunc generates a Twilio Video callback handling function.

Twilio sends the data with the "Content-Type" header to “application/x-www-urlencoded”.

func (PresentationHandlersImpl) GoogleCloudPubSubHandler

func (p PresentationHandlersImpl) GoogleCloudPubSubHandler(
	w http.ResponseWriter,
	r *http.Request,
)

GoogleCloudPubSubHandler receives push messages from Google Cloud Pub-Sub

func (PresentationHandlersImpl) HideFeedItem

func (p PresentationHandlersImpl) HideFeedItem() http.HandlerFunc

HideFeedItem marks a feed item as done

func (PresentationHandlersImpl) HideNudge

HideNudge marks a nudge as not resolved

func (PresentationHandlersImpl) PhoneNumberVerificationCodeHandler

func (p PresentationHandlersImpl) PhoneNumberVerificationCodeHandler() http.HandlerFunc

PhoneNumberVerificationCodeHandler process ISC request to PhoneNumberVerificationCode

func (PresentationHandlersImpl) PinFeedItem

func (p PresentationHandlersImpl) PinFeedItem() http.HandlerFunc

PinFeedItem marks a feed item as done

func (PresentationHandlersImpl) PostMessage

func (p PresentationHandlersImpl) PostMessage() http.HandlerFunc

PostMessage adds a message to a thread

func (PresentationHandlersImpl) ProcessEvent

func (p PresentationHandlersImpl) ProcessEvent() http.HandlerFunc

ProcessEvent saves an event

func (PresentationHandlersImpl) PublishAction

func (p PresentationHandlersImpl) PublishAction() http.HandlerFunc

PublishAction posts a new action to a user's feed

func (PresentationHandlersImpl) PublishFeedItem

func (p PresentationHandlersImpl) PublishFeedItem() http.HandlerFunc

PublishFeedItem posts a feed item

func (PresentationHandlersImpl) PublishNudge

func (p PresentationHandlersImpl) PublishNudge() http.HandlerFunc

PublishNudge posts a new nudge

func (PresentationHandlersImpl) ResolveDefaultNudge

func (p PresentationHandlersImpl) ResolveDefaultNudge() http.HandlerFunc

ResolveDefaultNudge marks a default nudges as resolved

func (PresentationHandlersImpl) ResolveFeedItem

func (p PresentationHandlersImpl) ResolveFeedItem() http.HandlerFunc

ResolveFeedItem marks a feed item as done

func (PresentationHandlersImpl) ResolveNudge

func (p PresentationHandlersImpl) ResolveNudge() http.HandlerFunc

ResolveNudge marks a nudge as resolved

func (PresentationHandlersImpl) SendEmail

SendEmail sends the specified email to the recipient(s) specified in `to` and returns the status

func (PresentationHandlersImpl) SendNotificationHandler

func (p PresentationHandlersImpl) SendNotificationHandler() http.HandlerFunc

SendNotificationHandler sends a data message to the specified registration tokens.

func (PresentationHandlersImpl) SendOTPHandler

func (p PresentationHandlersImpl) SendOTPHandler() http.HandlerFunc

SendOTPHandler is an isc api that generates and sends an otp to an msisdn

func (PresentationHandlersImpl) SendRetryOTPHandler

func (p PresentationHandlersImpl) SendRetryOTPHandler() http.HandlerFunc

SendRetryOTPHandler is an isc api that generates fallback OTPs when Africa is talking sms fails

func (PresentationHandlersImpl) SendTemporaryPIN

func (p PresentationHandlersImpl) SendTemporaryPIN() http.HandlerFunc

SendTemporaryPIN is a twilio endpoint to send PIN via whatsapp and SMS

func (PresentationHandlersImpl) SendToMany

func (p PresentationHandlersImpl) SendToMany() http.HandlerFunc

SendToMany sends a data message to the specified recipient

func (PresentationHandlersImpl) ShowFeedItem

func (p PresentationHandlersImpl) ShowFeedItem() http.HandlerFunc

ShowFeedItem marks a feed item as done

func (PresentationHandlersImpl) ShowNudge

ShowNudge marks a nudge as not resolved

func (PresentationHandlersImpl) UnpinFeedItem

func (p PresentationHandlersImpl) UnpinFeedItem() http.HandlerFunc

UnpinFeedItem marks a feed item as done

func (PresentationHandlersImpl) UnresolveFeedItem

func (p PresentationHandlersImpl) UnresolveFeedItem() http.HandlerFunc

UnresolveFeedItem marks a feed item as not resolved

func (PresentationHandlersImpl) UnresolveNudge

func (p PresentationHandlersImpl) UnresolveNudge() http.HandlerFunc

UnresolveNudge marks a nudge as not resolved

func (PresentationHandlersImpl) UpdateMailgunDeliveryStatus

func (p PresentationHandlersImpl) UpdateMailgunDeliveryStatus() http.HandlerFunc

UpdateMailgunDeliveryStatus gets the status of the sent emails and logs them in the database

func (PresentationHandlersImpl) Upload

Upload saves an upload in cloud storage

func (PresentationHandlersImpl) VerifyRetryEmailOTPHandler

func (p PresentationHandlersImpl) VerifyRetryEmailOTPHandler() http.HandlerFunc

VerifyRetryEmailOTPHandler is an isc api that confirms OTPs earlier sent via email.

func (PresentationHandlersImpl) VerifyRetryOTPHandler

func (p PresentationHandlersImpl) VerifyRetryOTPHandler() http.HandlerFunc

VerifyRetryOTPHandler is an isc api that confirms OTPs earlier sent

Jump to

Keyboard shortcuts

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