public

package
v0.0.0-...-179f7ef Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2019 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PublicEnv

type PublicEnv struct {
	Logger     goKitLog.Logger
	PublicRepo PublicRepositoryInterface
	Common     lib.CommonService
}

func (*PublicEnv) Login

func (env *PublicEnv) Login(w http.ResponseWriter, r *http.Request)

func (*PublicEnv) Ping

func (env *PublicEnv) Ping(w http.ResponseWriter, r *http.Request)

func (*PublicEnv) Register

func (env *PublicEnv) Register(w http.ResponseWriter, r *http.Request)

type PublicRepository

type PublicRepository struct {
	Db     *gorm.DB
	Logger log.Logger
}

func (*PublicRepository) CreateUser

func (repo *PublicRepository) CreateUser(inputUser map[string]interface{}) (*models.User, error)

func (*PublicRepository) CreateUserLogin

func (repo *PublicRepository) CreateUserLogin(userId string, token string) error

func (*PublicRepository) FindToken

func (repo *PublicRepository) FindToken(token string) (models.UsersLogin, error)

func (*PublicRepository) GenerateApiKey

func (repo *PublicRepository) GenerateApiKey() string

func (*PublicRepository) IncrementUserCount

func (repo *PublicRepository) IncrementUserCount() error

func (*PublicRepository) IsEmailUnique

func (repo *PublicRepository) IsEmailUnique(email string) error

func (*PublicRepository) ValidateEmailPasswordFromDB

func (repo *PublicRepository) ValidateEmailPasswordFromDB(email string, password string) (*models.User, error)

type PublicRepositoryInterface

type PublicRepositoryInterface interface {
	IsEmailUnique(email string) error
	CreateUser(inputUser map[string]interface{}) (*models.User, error)
	CreateUserLogin(userId string, token string) error
	ValidateEmailPasswordFromDB(email string, password string) (*models.User, error)
	FindToken(token string) (models.UsersLogin, error)
	IncrementUserCount() error
}

Jump to

Keyboard shortcuts

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