users

package
v1.0.11 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2021 License: MIT Imports: 10 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckPasswordHash

func CheckPasswordHash(password, hash string) bool

CheckPassword hash compares raw password with it's hashed values

func CheckStatusinSession

func CheckStatusinSession(id int64) bool

func HashPassword

func HashPassword(password string) (string, error)

HashPassword hashes given password

func Updatetenant added in v1.0.6

func Updatetenant(token, devicetype string, tenantid int) bool

Types

type Location added in v1.0.9

type Location struct {
	LocationId   int    `json:"locationid"`
	Tenantid     int    `json:"tenantid"`
	Locationname string `json:"locationname"`
	Email        string `json:"email"`
	Contactno    string `json:"contactno"`
	Address      string `json:"address"`
	Suburb       string `json:"suburb"`
	City         string `json:"city"`
	State        string `json:"state"`
	Postcode     string `json:"postcode"`
	Latitude     string `json:"latitude"`
	Longitude    string `json:"longitude"`
	Opentime     string `json:"opentime"`
	Closetime    string `json:"closetime"`
}

func Locationresponse added in v1.0.9

func Locationresponse(userid int) []Location

type Tenant added in v1.0.8

type Tenant struct {
	Subscriptionid       int     `json:"subscriptonid"`
	Moduleid             int     `json:"moduleid"`
	Featureid            int     `json:"featureid"`
	Packageid            int     `json:"packageid"`
	Modulename           string  `json:"modulename"`
	Iconurl              string  `json:"iconurl"`
	Logourl              string  `json:"imageurl"`
	Packagename          string  `json:"packagename"`
	Validiydate          string  `json:"validitydate"`
	Validity             bool    `json:"validity"`
	Subcategoryid        int     `json:"subcategoryid"`
	Categoryid           int     `json:"categoryid"`
	Paymentstatus        bool    `json:"paymentstatus"`
	Subscriptionmethodid string  `json:"subscriptionmethodid"`
	Subscriptionaccid    string  `json:"subscriptionaccid"`
	Taxamount            float64 `json:"taxamount"`
	Taxpercent           string  `json:"taxpercent"`
	Totalamount          float64 `json:"totalamount"`
	Status               string  `json:"status"`
}

func Tenantresponse added in v1.0.8

func Tenantresponse(userid int) []Tenant

type User

type User struct {
	ID                 int    `json:"id"`
	FirstName          string `json:"firstname"`
	LastName           string `json:"lastname"`
	Password           string `json:"password"`
	Email              string `json:"email"`
	Mobile             string `json:"mobile"`
	Dialcode           string `json:"dialcode"`
	Profileimage       string `json:"profileimage"`
	CreatedDate        string `json:"created"`
	Status             string `json:"status"`
	Roleid             int    `json:"roleid"`
	Configid           int    `json:"configid"`
	Referenceid        int    `json:"referenceid"`
	LocationId         int    `json:"locationid"`
	Moduleid           int    `json:"moduleid"`
	Packageid          int    `json:"packageid"`
	Modulename         string `json:"modulename"`
	Tenantname         string `json:"tenantname"`
	Tenantimage        string `json:"tenantimage"`
	Opentime           string `json:"opentime"`
	Closetime          string `json:"closetime"`
	From               string `json:"from"`
	Tenantaccid        string `json:"tenantaccid"`
	Countrycode        string `json:"countrycode"`
	Currencyid         int    `json:"currencyid"`
	Currencysymbol     string `json:"currencysymbol"`
	CurrencyCode       string `json:"currencycode"`
	Devicetype         string `json:"devicetype"`
	Usercountrycode    string `json:"usercountrycode"`
	Usercurrencysymbol string `json:"usercurrencysymbol"`
	UsercurrencyCode   string `json:"usercurrencycode"`
	Tenantstatus       string `json:"tenantstatus"`
	Postcode           string `json:"postcode"`
}

func GetAllUsers

func GetAllUsers() []User

func (*User) Authenticate

func (user *User) Authenticate() bool

func (*User) Checkauthname added in v1.0.6

func (user *User) Checkauthname() bool

func (*User) Create

func (user *User) Create() (int64, error)

func (*User) Createwithoutpassword added in v1.0.6

func (user *User) Createwithoutpassword() (int64, error)

func (*User) Customerauthenticate added in v1.0.6

func (c *User) Customerauthenticate(id int64) (*User, bool, error)

func (*User) GetByUserId

func (user *User) GetByUserId(id int64) (*User, error)

func (*User) GetUserIdByUsername

func (user *User) GetUserIdByUsername(username string) (int, error)

func (*User) Getzeroauth added in v1.0.10

func (c *User) Getzeroauth(custid, config int64) *User

func (*User) InsertToken

func (user *User) InsertToken(token string)

func (*User) InsertUserintoProfile

func (user *User) InsertUserintoProfile() int64

func (*User) LoginResponse added in v1.0.3

func (user *User) LoginResponse(id int64) (*User, error)

func (*User) ResetPassword

func (user *User) ResetPassword() bool

func (*User) RetrieveToken

func (user *User) RetrieveToken(c *gin.Context) bool

func (*User) Updateappuser added in v1.0.6

func (u *User) Updateappuser() (bool, error)

func (*User) Updateuserprofile added in v1.0.6

func (u *User) Updateuserprofile() (bool, error)

func (*User) UserAuthentication

func (user *User) UserAuthentication(id int64) (*User, bool, error)

Jump to

Keyboard shortcuts

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