service

package
v0.0.0-...-e797cc8 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2020 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

See https://www.sohamkamani.com/blog/golang/2019-01-01-jwt-authentication/

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BroadcastMessage

type BroadcastMessage struct {
	OriginTime     time.Time         `json:"originTime,string"`
	OriginID       string            `json:"originId"`
	OriginEntity   string            `json:"originEntity"`
	OriginEntityID string            `json:"originEntityId"`
	OriginText     string            `json:"originText"`
	OriginUserId   string            `json:"originUserId"`
	OriginUsername string            `json:"originUsername"`
	Streams        []BroadcastStream `json:"streams"`
}

@TODO Move this structure definition into the Swagger Specification

type BroadcastStream

type BroadcastStream struct {
	StreamID int64  `json:"streamId"`
	TopicID  int64  `json:"topicId"`
	Track    string `json:"track"`
}

@TODO Move this structure definition into the Swagger Specification

type BroadcasterInterface

type BroadcasterInterface interface {
	Broadcast(channel string, data []byte)
}

BroadcasterInterface defines dependency which used for service configuration If service have a specified broadcaster then all processed tweets will be pushed to the broadcaster

type Claims

type Claims struct {
	UserID int64  `json:"userId"`
	Email  string `json:"email"`
	jwt.StandardClaims
}

type Service

type Service struct {
	API *operations.TweetwatchAPI
	// contains filtered or unexported fields
}

func (*Service) CreateStreamHandler

func (service *Service) CreateStreamHandler(params operations.CreateStreamParams, user *models.User) middleware.Responder

func (*Service) CreateTopicHandler

func (service *Service) CreateTopicHandler(params operations.CreateTopicParams, user *models.User) middleware.Responder

func (*Service) DeleteStreamHandler

func (service *Service) DeleteStreamHandler(params operations.DeleteStreamParams, user *models.User) middleware.Responder

func (*Service) DeleteTopicHandler

func (service *Service) DeleteTopicHandler(params operations.DeleteTopicParams, user *models.User) middleware.Responder

func (*Service) GetStatusHandler

func (service *Service) GetStatusHandler(params operations.GetStatusParams, user *models.User) middleware.Responder

func (*Service) GetStreamsHandler

func (service *Service) GetStreamsHandler(params operations.GetStreamsParams, user *models.User) middleware.Responder

func (*Service) GetTopicTweetsHandler

func (service *Service) GetTopicTweetsHandler(params operations.GetTopicTweetsParams, user *models.User) middleware.Responder

func (*Service) GetUserTopicsHandler

func (service *Service) GetUserTopicsHandler(params operations.GetUserTopicsParams, user *models.User) middleware.Responder

func (*Service) JWTAuth

func (service *Service) JWTAuth(token string) (*models.User, error)

func (*Service) LoginHandler

func (service *Service) LoginHandler(params operations.LoginParams) middleware.Responder

func (*Service) SignUpHandler

func (service *Service) SignUpHandler(params operations.SignupParams) middleware.Responder

func (*Service) Up

func (service *Service) Up()

func (*Service) UpdateStreamHandler

func (service *Service) UpdateStreamHandler(params operations.UpdateStreamParams, user *models.User) middleware.Responder

func (*Service) UpdateTopicHandler

func (service *Service) UpdateTopicHandler(params operations.UpdateTopicParams, user *models.User) middleware.Responder

Jump to

Keyboard shortcuts

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