user

package
v0.0.0-...-7cf6ef0 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2018 License: Apache-2.0 Imports: 30 Imported by: 1

Documentation

Overview

Copyright 2018. bolaxy.org authors.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright 2018. bolaxy.org authors.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

View Source
const (
	VerifyOwnerApprove int = iota + 1
	VerifyOwnerReject
)

认证股东

View Source
const TOKEN_EXP = 24

Variables

This section is empty.

Functions

func ActiveRecovery

func ActiveRecovery(voucherVo *VoucherVo) reterror.ErrModel

ActiveRecovery active new owner account

func AddAdmin

func AddAdmin(add string, accountID int) reterror.ErrModel

AddAdmin add

func DelAdmin

func DelAdmin(accountID, id int) reterror.ErrModel

DelAdmin delete admin

func DelayTaskNum

func DelayTaskNum(account string, usertype, accountID int) reterror.ErrModel

DelayTaskNum get to-do tasks

func DisableAcc

func DisableAcc(accID int, adminAcc string) reterror.ErrModel

DisableAcc disable account

func FindUserStatus

func FindUserStatus(userVo *UserVo) reterror.ErrModel

FindUserStatus check user registered status

func GetAccountsByType

func GetAccountsByType(userType int) reterror.ErrModel

GetAccountsByType get users by user type

func GetAllUsers

func GetAllUsers() reterror.ErrModel

GetAllUsers get available users

func GetBlockHeight

func GetBlockHeight() reterror.ErrModel

GetBlockHeight get block height

func GetPubkeys

func GetPubkeys(account string) reterror.ErrModel

GetPubkeys 获取被恢复股东签名的用户公钥

func GetRegList

func GetRegList() reterror.ErrModel

GetRegList account list to be verified

func GetUserByID

func GetUserByID(id int) reterror.ErrModel

GetUserByID get user info by id

func GetVersion

func GetVersion() reterror.ErrModel

GetVersion get api version

func HasRecovery

func HasRecovery(account string) reterror.ErrModel

HasRecovery check if owner has recovery apply

func InsideLetter

func InsideLetter(lang string, accountId, userType, page int) reterror.ErrModel

InsideLetter send message

func Login

func Login(user *UserVo) reterror.ErrModel

Login login

func ModifyPassword

func ModifyPassword(mp *ModifyPSD, name string) reterror.ErrModel

ModifyPassword modify password

func ReSignUp

func ReSignUp(appID string) reterror.ErrModel

ReSignUp re-signup

func ReadLetter

func ReadLetter(accountId, id int) reterror.ErrModel

ReadLetter mark message as readed

func RecoveryList

func RecoveryList(account string, pubkey string) reterror.ErrModel

RecoveryList list of recovery account

func RecoveryOwner

func RecoveryOwner(user *UserVo) reterror.ErrModel

RecoveryOwner owner account recovery

func RecoveryResult

func RecoveryResult(regID int, appID string) reterror.ErrModel

RecoveryResult get recovery result

func RegList

func RegList(userVo *UserVo) reterror.ErrModel

RegList get users to be verified

func ResetRecovery

func ResetRecovery(account string) reterror.ErrModel

ResetRecovery reset owner recovery

func Scan

func Scan(userVo *UserVo) reterror.ErrModel

Scan submit member info for qrcode scaned

func SetUser

func SetUser(user *PAccount, operatorId int) reterror.ErrModel

SetUser set user info

func Signup

func Signup(user *UserVo) reterror.ErrModel

Signup sign up

func SubRecovery

func SubRecovery(appID string, account string, regID int, operator string) reterror.ErrModel

SubRecovery submit recovery account info

func UserTree

func UserTree(userPubKey string) reterror.ErrModel

UserTree generate user tree structure by level

func VerifyPwd

func VerifyPwd(pwd string, account string, id int) reterror.ErrModel

VerifyPwd verify password and return user info

func VerifyRecovery

func VerifyRecovery(account string, voucherVo *VoucherVo) reterror.ErrModel

VerifyRecovery verify owner

func VerifyUser

func VerifyUser(userVo *UserVo) reterror.ErrModel

VerifyUser verify user

func VoucherVerifyRecovery

func VoucherVerifyRecovery(account string, voucherVo *VoucherVo) reterror.ErrModel

VoucherVerifyRecovery recovery owner (voucher part)

Types

type AccountTree

type AccountTree struct {
	Name        string
	AppId       string
	PubKey      string
	Msg         string
	SourceAppId string
	Children    []AccountTree
}

type AccountTreeWithCoreInfo

type AccountTreeWithCoreInfo struct {
	AccTree []AccountTree     `json:"trees"`
	Voucher VoucherPubkeyInfo `json:"voucher"`
}

type Letter

type Letter struct {
	ID      int
	Title   string
	Status  int
	Time    time.Time
	Content string
	Type    int
	Param   string
	Warn    bool
}

type ModifyPSD

type ModifyPSD struct {
	ID          int    `form:"id"`
	Page        int    `form:"page"`
	OldPassword string `form:"old_psd"`
	NewPassword string `form:"new_psd"`
}

type PAccount

type PAccount struct {
	ID       *int    `form:"account_id" binding:"exists"`
	AuthID   *string `form:"auth_id" binding:"exists"`
	DepID    *int    `form:"dep_id" binding:"exists"`
	UserType *int    `form:"user_type" binding:"exists"`
}

type UserVo

type UserVo struct {
	ID           int    `form:"account_id"`
	Name         string `form:"name"`
	AppId        string `form:"app_id"`
	PubKey       string `form:"pub_key"`
	Pwd          string `form:"pwd"`
	Msg          string `form:"msg"`
	NewAppId     string `form:"new_app_id"`
	Status       int    `form:"status"` // 2.approval 3.reject
	RefuseReason string `form:"refuse_reason"`
	UserType     int    `form:"user_type"`
	AuthID       string `form:"auth_id"`
	Add          string `form:"add"`
	DepID        int    `form:"dep_id"`
	RegID        int    `form:"reg_id"`
	Level        int
}

type VoucherPubkeyInfo

type VoucherPubkeyInfo struct {
	ENPublickey string
	ENKey       string
}

type VoucherVo

type VoucherVo struct {
	AppId     string `form:"app_id"`
	AppName   string `form:"name"`
	AesKey    string `form:"aeskey"`
	PubKey    string `form:"pub_key"`
	Pwd       string `form:"pwd"`
	Msg       string `form:"msg"`
	Sign      string `form:"sign"`
	Timestamp int64  `form:"timestamp"`
	Password  string `form:"string"`
	BakAction string `form:"bak_action"`
	Status    int    `form:"status"`
	RegId     int    `form:"reg_id"`
	Replaced  string `form:"replaced"`
}

Jump to

Keyboard shortcuts

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