user

package
v0.0.0-...-a74fbde Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2017 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const PasswordMinLength = 8

PasswordMinLength パスワードの最低文字数

Variables

This section is empty.

Functions

func Add

func Add(email string, name string, pass string) (uint, error)

Add ユーザー登録する

func AddForgetPassword

func AddForgetPassword(email string, keyword string) error

AddForgetPassword 忘れたパスワードを追加する

func DeleteByEmail

func DeleteByEmail(email string) error

DeleteByEmail メールアドレスから削除する

func GetByEmail

func GetByEmail(email string) (models.UserMaster, error)

GetByEmail メールアドレスから取得する

func GetByEmailAndPassword

func GetByEmailAndPassword(email string, password string) (u models.UserMaster, err error)

GetByEmailAndPassword メールアドレスとパスワードから取得する

func GetForgetPasswordByEmail

func GetForgetPasswordByEmail(email string) (models.UserForgetPassword, error)

GetForgetPasswordByEmail メールアドレスから忘れたパスワードを取得する

func GetIDAndAddProfileImage

func GetIDAndAddProfileImage(uID int) (uint, error)

GetIDAndAddProfileImage プロフィール画像を追加してIDを取得する

func GetMaptByUserIDList

func GetMaptByUserIDList(userIDList []int) (map[int]User, error)

GetMaptByUserIDList ユーザIDリストからマップを取得する

func GetPassword

func GetPassword(pass string) string

GetPassword パスワードを取得する

func IsUpdatePassword

func IsUpdatePassword(email string, keyword string) (bool, error)

IsUpdatePassword パスワードが更新可能か判定する

func Upadate

func Upadate(uID int, n string) error

Upadate 更新する

func UpadateToPassword

func UpadateToPassword(email string, password string) error

UpadateToPassword パスワードを更新する

func UpadateToProfileImageID

func UpadateToProfileImageID(uID int, pID int) error

UpadateToProfileImageID プロフィール画像IDを更新する

Types

type Profile

type Profile struct {
	ID      uint      `json:"id"`
	UserID  int       `json:"userID"`
	Created time.Time `json:"created"`
}

Profile プロフィール

func GetProfileImageListByUserID

func GetProfileImageListByUserID(uID int) ([]Profile, error)

GetProfileImageListByUserID ユーザIDからプロフィール画像リストを取得する

type User

type User struct {
	ID             uint   `json:"id"`
	Name           string `json:"name"`
	ProfileImageID int    `json:"profileImageID"`
}

User ユーザー情報

func GetByUserID

func GetByUserID(userID int) (User, error)

GetByUserID ユーザIDから取得する

Jump to

Keyboard shortcuts

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