controllers

package
v0.0.0-...-15e17f2 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthController

type AuthController struct{}

func (*AuthController) CreateJWT

func (a *AuthController) CreateJWT(user *models.User) (string, error)

CreateJWT creates a new JWT token for the given user.

type Controller

type Controller struct {
	Auth AuthController
	User UserController

	SaramaConfig *sarama.Config
	DB           *gorm.DB
	// contains filtered or unexported fields
}

func NewController

func NewController(db *gorm.DB, brokers_ []string, partitions int32) *Controller

func (*Controller) Initialize

func (c *Controller) Initialize()

func (*Controller) SetBrokers

func (c *Controller) SetBrokers(b []string)

func (*Controller) SetSaramaConfig

func (c *Controller) SetSaramaConfig(config *sarama.Config)

func (*Controller) SetWorkerPoolSize

func (c *Controller) SetWorkerPoolSize(size int)

type UserController

type UserController struct {
	Model          models.User
	DB             *gorm.DB
	AuthController AuthController
}

func NewUserController

func NewUserController(db *gorm.DB) UserController

func (*UserController) GetMe

func (u *UserController) GetMe(c *fiber.Ctx) error

func (*UserController) LogoutUser

func (u *UserController) LogoutUser(c *fiber.Ctx) error

func (*UserController) RefreshToken

func (u *UserController) RefreshToken(ctx *fiber.Ctx) error

func (*UserController) SendMessage

func (u *UserController) SendMessage(c *fiber.Ctx) error

func (*UserController) SignInUser

func (u *UserController) SignInUser(c *fiber.Ctx) error

func (*UserController) SignUpUser

func (u *UserController) SignUpUser(c *fiber.Ctx) error

Jump to

Keyboard shortcuts

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