profile

package
v0.0.0-...-57b518e Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrIncorrectPassword = echo.NewHTTPError(http.StatusBadRequest, "incorrect old password")
	ErrInsecurePassword  = echo.NewHTTPError(http.StatusBadRequest, "insecure password")
)

Custom errors

Functions

This section is empty.

Types

type Profile

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

func Initialize

func Initialize(db *sqlx.DB, userDB user.UserDB) Profile

Initialize initalizes profile application service with defaults

func New

func New(db *sqlx.DB, pdb ProfileDB, usrDB user.UserDB) Profile

New creates new profile application service

func (Profile) Create

func (p Profile) Create(c echo.Context, profile authapi.Profile) error

Change changes user's password

func (Profile) FetchProfileByExternalID

func (p Profile) FetchProfileByExternalID(c echo.Context, externalID string) (authapi.Profile, error)

type ProfileDB

type ProfileDB interface {
	Create(sqlx.DB, authapi.Profile) error
	FetchProfileByExternalID(db sqlx.DB, externalID string) (authapi.Profile, error)
}

type Service

type Service interface {
	Create(echo.Context, authapi.Profile) error
	FetchProfileByExternalID(c echo.Context, externalID string) (authapi.Profile, error)
}

Directories

Path Synopsis
platform

Jump to

Keyboard shortcuts

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