user

package
v1.0.0-beta1 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2022 License: MIT Imports: 2 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       string `gorm:"primaryKey" json:"id"`
	Username string `gorm:"index" json:"username"`
	Password string `json:"password,omitempty"`
	Email    string `json:"email"`
	Avatar   string `json:"avatar"`
}

type UserRepository

type UserRepository interface {
	FindUserByUsername(username string) (User, *exception.AppError)
	UpdateUser(user User) *exception.AppError
}

type UserRepositoryDB

type UserRepositoryDB struct {
	// contains filtered or unexported fields
}

func NewUserRepository

func NewUserRepository() UserRepositoryDB

func (UserRepositoryDB) FindUserByUsername

func (d UserRepositoryDB) FindUserByUsername(username string) (User, *exception.AppError)

func (UserRepositoryDB) UpdateUser

func (d UserRepositoryDB) UpdateUser(user User) *exception.AppError

Jump to

Keyboard shortcuts

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