meetingplatformhandler

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: May 3, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MeetingPlatformHandler

type MeetingPlatformHandler struct {
	AuthMiddleware  *authmiddleware.AuthMiddleware
	PlatformService *domain.MeetingPlatformService
	OAuthService    *domain.OAuthInfoService
}

MeetingPlatformHandler is the handler that manages operations on MeetingPlatforms for the API.

func Provide

func Provide(authMiddleware *authmiddleware.AuthMiddleware, meetingProviderService domain.MeetingPlatformService, oauthService domain.OAuthInfoService) *MeetingPlatformHandler

Provide returns a MeetingPlatformHandler configured with the provided AuthMiddleware, MeetingPlatformService, and OAuthService.

func (*MeetingPlatformHandler) Auth

func (m *MeetingPlatformHandler) Auth(c *gin.Context)

Auth attempts to authenticate a user against a MeetingPlatform using the provide authorization code. A 200 OK status is returned if OAuth tokens were successfully retrieved from the MeetingPlatform for the user. A 400 BAD REQUEST response is returned if the user already has OAuth tokens stored for the MeetingPlatform or if the provided authorization code was not validated by the platform. A 500 INTERNAL SERVER ERROR is returned if an error occurs.

func (*MeetingPlatformHandler) GetAllAuth

func (m *MeetingPlatformHandler) GetAllAuth(c *gin.Context)

func (*MeetingPlatformHandler) GetAllPlatforms

func (m *MeetingPlatformHandler) GetAllPlatforms(c *gin.Context)

GetAllPlatforms retrieves all configured MeetingPlatforms and returns them as a JSON response.

func (*MeetingPlatformHandler) GetAuth

func (m *MeetingPlatformHandler) GetAuth(c *gin.Context)

GetAuth attempts to get find an OAuthInfo object for the user that sent the request for the provided platform. If an OAuthInfo object exists, a 200 OK status is returned, otherwise a 404 NOT FOUND status is returned.

func (*MeetingPlatformHandler) Register

func (m *MeetingPlatformHandler) Register(parentGroup *gin.RouterGroup) error

Register creates 4 endpoints to manage MeetingPlatforms. / (GET) - Gets all available MeetingPlatforms /:platform/auth (POST) - Attempts to authenticate to the specified MeetingPlatform /:platform/auth (GET) - Attempts to get the Auth for the specified MeetingPlatform /:userid/platforms (GET) - GetAllAuth

Jump to

Keyboard shortcuts

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