models

package
v0.0.0-...-91b8838 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2022 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Overview

Package models provides the data models for the auth service

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type User

type User struct {
	ID            uint64    `json:"id" gorm:"primaryKey"`
	Uid           string    `json:"uid" gorm:"<-;unique;not null"`
	Name          string    `json:"name" gorm:"<-;unique;not null"`
	Email         string    `json:"email" gorm:"<-;unique;not null"`
	EmailVerified bool      `json:"email_verified" `
	Picture       string    `json:"picture" `
	Role          int       `json:"-"`
	CreatedAt     time.Time `json:"createdAt" gorm:"autoCreateTime"`
	UpdatedAt     time.Time `json:"updatedAt" gorm:"autoUpdateTime"`
}

User model for user

func (*User) FromProtoBuffer

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

FromProtoBuffer takes a pb user and 'loads' the current user with the details

func (*User) ToProtoBuffer

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

ToProtoBuffer returns a protocol buffers version of the User.

Jump to

Keyboard shortcuts

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