handlers

package
v0.0.0-...-fbf9a92 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2021 License: GPL-3.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func API

func API(cfg *config.Config, db *db.DB, es *elastic.Client, authenticator *auth.Authenticator, mail *mailer.Mailer, streamer *redis.Service) http.Handler

API : Returns an new API

func Broadcast

func Broadcast(stream proto.Twitter_StreamClient, m *melody.Melody)

Broadcast Receives Messages from the Streaming Service and Broadcasts back to websocket

func ResponseError

func ResponseError(c *gin.Context, s int, e string)

ResponseError ...

func ResponseJSON

func ResponseJSON(c *gin.Context, d interface{})

ResponseJSON ...

Types

type Annotations

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

Annotations Controller

func (*Annotations) Create

func (ctrl *Annotations) Create(c *gin.Context)

Create New Annotation

func (*Annotations) GetRandom

func (ctrl *Annotations) GetRandom(c *gin.Context)

GetRandom Gets a random document from ES

type Metrics

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

Metrics Controller

func (*Metrics) CountByUser

func (ctrl *Metrics) CountByUser(c *gin.Context)

CountByUser ...

func (*Metrics) GetVolumeByUser

func (ctrl *Metrics) GetVolumeByUser(c *gin.Context)

GetVolumeByUser ...

type Response

type Response struct {
	Success bool        `json:"success"`
	Error   string      `json:"error,omitempty"`
	Data    interface{} `json:"data,omitempty"`
	Code    int         `json:"code"`
}

Response : JSON Response Object

type Users

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

Users Controller

func (*Users) OAuthTwitter

func (ctrl *Users) OAuthTwitter(c *gin.Context)

OAuthTwitter Atuhorizes Twitter using gothic

func (*Users) OAuthTwitterCB

func (ctrl *Users) OAuthTwitterCB(c *gin.Context)

OAuthTwitterCB Twitter Authorization Callback using gothic

func (*Users) SendPin

func (ctrl *Users) SendPin(c *gin.Context)

SendPin Send New OTP

func (*Users) Token

func (ctrl *Users) Token(c *gin.Context)

Token Authorize App

func (*Users) Update

func (ctrl *Users) Update(c *gin.Context)

Update User Handler

func (*Users) Verify

func (ctrl *Users) Verify(c *gin.Context)

Verify OTP

Jump to

Keyboard shortcuts

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