model

package
v0.0.0-...-0bc28f7 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2024 License: GPL-3.0 Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HashPassword

func HashPassword(password string) (string, error)

func UserToProto

func UserToProto(m *User) *gen.User

MetadataToProto converts a User struct into a generated proto counterpart.

Types

type User

type User struct {
	ID        string `json:"id"`
	Email     string `json:"email"`
	Password  string `json:"-"`
	Receivers string `json:"receivers"`
}

func NewUser

func NewUser(email, password string) (*User, error)

func UserFromProto

func UserFromProto(m *gen.User) *User

MetadataFromProto converts a generated proto counterpart into a User struct.

Jump to

Keyboard shortcuts

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