models

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2023 License: MIT Imports: 3 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) FromProtoBuffer

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

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

func (*User) ToProtoBuffer

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

ToProtoBuffer 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