models

package
v0.0.0-...-9ef7b20 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type User

type User struct {
	Id       bson.ObjectId `bson:"_id"`
	Name     string        `bson:"name"`
	Email    string        `bson:"email"`
	Password string        `bson:"password"`
	Role     string        `bson:"role"`
	Created  time.Time     `bson:"created"`
	Updated  time.Time     `bson:"updated"`
}

User provides the user instance for authentication job.

func (*User) FromProto

func (u *User) FromProto(user *pb.User)

FromProto gets user from protocol buffer and converts to the user structure.

func (*User) ToProto

func (u *User) ToProto() *pb.User

ToProto converts the user structure into a protocol buffer user structure.

Jump to

Keyboard shortcuts

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