communication

package
v0.0.0-...-4648e5f Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Communicator

type Communicator interface {
	GetUserInfo(userID string) (models.User, error)
	SendInitConfirmation(request *models.VerifyRequest) error
	SendVerificationMessage(request *models.VerifyRequest) error
	SendCompletionMessage(request *models.VerifyRequest) error
	SendFailedVerificationMessage(request *models.VerifyRequest) error
}

func NewCommunicator

func NewCommunicator(cfg *config.Config) Communicator

type SlackService

type SlackService struct {
	Client   *slack.Client
	Messages config.Messages
	BaseURL  string
}

func (*SlackService) GetUserInfo

func (s *SlackService) GetUserInfo(userID string) (models.User, error)

func (*SlackService) SendCompletionMessage

func (s *SlackService) SendCompletionMessage(request *models.VerifyRequest) error

TODO: The message needs to go to the same CHANNEL where the message was initiated

func (*SlackService) SendFailedVerificationMessage

func (s *SlackService) SendFailedVerificationMessage(request *models.VerifyRequest) error

func (*SlackService) SendInitConfirmation

func (s *SlackService) SendInitConfirmation(request *models.VerifyRequest) error

func (*SlackService) SendVerificationMessage

func (s *SlackService) SendVerificationMessage(request *models.VerifyRequest) error

Jump to

Keyboard shortcuts

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