auth

package
v0.0.0-...-efcb511 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateHandlers

func CreateHandlers(r *gin.RouterGroup, s Service, l log.Logger)

CreateHandlers sets up routing to the HTTP request

Types

type AuthenticationRequest

type AuthenticationRequest struct {
	UserName string `json:"username" binding:"required"`
	Password string `json:"password" binding:"required"`
}

AuthenticationRequest request model sent to authenticate players

type Controller

type Controller interface {
	AuthorizeUser(c *gin.Context)
}

Controller contains interface for authentication handlers

type Repository

type Repository interface {
	FindPlayerBy(username string) error
}

Repository contains interfaces for authentication services

func NewRepository

func NewRepository(db *database.DB, l log.Logger) Repository

NewRepository creates a new instance for authentication repository

type Service

type Service interface {
}

Service contains interfaces for authentication services

func NewService

func NewService(r Repository, l log.Logger) Service

NewService creates new authentication service

Jump to

Keyboard shortcuts

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