auth

package
v0.0.0-...-39cef64 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Router

func Router(app *fiber.App, u UseCase)

Router for auth domain

Types

type Auth

type Auth struct {
	UserID int64
	Type   string
	Secret string
}

type Credentials

type Credentials struct {
	Password string `json:"password"`
	Email    string `json:"email"`
}

type Handler

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

Handler - HTTP auth handler.

func NewHandler

func NewHandler(useCase UseCase) *Handler

NewHandler - a factory function of auth handler.

type Repository

type Repository interface {
	// contains filtered or unexported methods
}

Repository - auth store APIs.

func NewRepository

func NewRepository(db *sqlx.DB, rs *redis.Storage) Repository

NewRepository is a factory function of auth store.

type Topic

type Topic struct {
	UserID int64  `json:"-"`
	Title  string `json:"title"`
	// contains filtered or unexported fields
}

type UseCase

type UseCase interface {
	// contains filtered or unexported methods
}

UseCase - auth usecase APIs.

func NewUseCase

func NewUseCase(repo Repository) UseCase

NewUseCase is a factory function of auth usecase.

type User

type User struct {
	Email string `json:"email"`
	Auth  *Auth  `json:"-"`
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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