model

package
v0.0.0-...-858496e Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2024 License: GPL-3.0 Imports: 3 Imported by: 0

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:"-"`
}

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