network

package
v0.0.0-...-9ca138e Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2018 License: MIT Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthVerifiedUser

func AuthVerifiedUser(writer http.ResponseWriter, request *http.Request)

func Login

func Login(writer http.ResponseWriter, request *http.Request)

func PrepareExecutor

func PrepareExecutor(database *gorm.DB, emailConfig EmailConfiguration)

func ValidateSession

func ValidateSession(writer http.ResponseWriter, request *http.Request)

func VerifyRegistration

func VerifyRegistration(w http.ResponseWriter, r *http.Request)

Types

type EmailConfiguration

type EmailConfiguration interface {
	GetGmailLogin() string

	GetGmailPassword() string

	GetGmailFrom() string

	GetDomain() string
}

type Executor

type Executor interface {
	AuthUser(info structures.AuthInfo) (*db.Session, error)

	VerifyRegister(registerID uuid.UUID) error

	Login(info structures.LoginInfo) (uuid.UUID, error)

	ValidateSession(info structures.ValidateSessionInfo) (uuid.UUID, error)
}

func GetExecutor

func GetExecutor() Executor

type ExecutorImpl

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

func (*ExecutorImpl) AuthUser

func (e *ExecutorImpl) AuthUser(info structures.AuthInfo) (*db.Session, error)

func (*ExecutorImpl) Login

func (e *ExecutorImpl) Login(info structures.LoginInfo) (uuid.UUID, error)

func (*ExecutorImpl) ValidateSession

func (e *ExecutorImpl) ValidateSession(info structures.ValidateSessionInfo) (uuid.UUID, error)

func (*ExecutorImpl) VerifyRegister

func (e *ExecutorImpl) VerifyRegister(registerID uuid.UUID) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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