Documentation ¶
Index ¶
- func CheckContract(rawAddress string) bool
- func CheckMultiFactor(email string, conn *sql.DB, ctx cont.Context) (bool, error)
- func DeployContract(userAddress string) (string, *contracts.Contrato3)
- func DoRegisterService(w http.ResponseWriter, r *http.Request) models.ResponseRegister
- func GenerateSaltService() []byte
- func GetAuthentication(instance *contracts.Contrato3) bool
- func GetExpirationTime(instance *contracts.Contrato3) *big.Int
- func GetTrustClientsService() []models.TrustClients
- func GetUsersService(w http.ResponseWriter)
- func InsertMultiService(auth models.User) int
- func LoadContract(rawAddress string) *contracts.Contrato3
- func LoginMultiService(user models.User) int
- func LoginService(user models.User) (int, []byte)
- func RefreshTokenService(user models.User) []byte
- func SetAuthentication(instance *contracts.Contrato3, value bool, expirationTime *big.Int) (*types.Transaction, error)
- func TokenResponse(user models.User) (int, []byte)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckContract ¶
CheckContract to check the authentication from the contract
func CheckMultiFactor ¶
CheckMultiFactor check if the user has one second auth factor and it's value
func DeployContract ¶
DeployContract function to deploy one contract into the blockchain
func DoRegisterService ¶
func DoRegisterService(w http.ResponseWriter, r *http.Request) models.ResponseRegister
DoRegisterService one service that insert one user on the DB
func GenerateSaltService ¶
func GenerateSaltService() []byte
GenerateSaltService one service that generate one rand salt
func GetAuthentication ¶
GetAuthentication get the autherithation value for the customer contract
func GetExpirationTime ¶
GetExpirationTime get the expiration time value for the customer contract
func GetTrustClientsService ¶
func GetTrustClientsService() []models.TrustClients
GetTrustClientsService one service that gets all clients from the DB
func GetUsersService ¶
func GetUsersService(w http.ResponseWriter)
GetUsersService one service that gets all users from the DB
func InsertMultiService ¶
InsertMultiService one service that insert one multifactor on the DB
func LoadContract ¶
LoadContract to load one contract from the blockchain
func LoginMultiService ¶
LoginMultiService gets if login is true o false
func LoginService ¶
LoginService gets if login is true o false
func RefreshTokenService ¶
RefreshTokenService one service that uses the Login service to refresh the token one hour
func SetAuthentication ¶
func SetAuthentication(instance *contracts.Contrato3, value bool, expirationTime *big.Int) (*types.Transaction, error)
SetAuthentication set autherithation value for the customer contract
Types ¶
This section is empty.