user

package
v0.0.0-...-2246c2a Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Repository

type Repository interface {
	// CreateUser ...
	CreateUser(ctx context.Context, user User) (returnData User, err error)

	// GetUserByEmail ...
	GetUserByEmail(ctx context.Context, user User) (returnData User, err error)

	// GetUserByID ...
	GetUserByID(ctx context.Context, id int64) (returnData User, err error)
}

Repository ...

func NewDB

func NewDB(d *driversql.Database) Repository

NewDB ...

func NewRepo

func NewRepo(db Repository) Repository

type User

type User struct {
	ID        int64          `json:"id" deepcopier:"ID"`
	Email     string         `json:"email" deepcopier:"email"`
	FullName  string         `json:"full_name" deepcopier:"FullName"`
	Phone     string         `json:"phone" deepcopier:"Phone"`
	Password  string         `json:"password,omitempty" deepcopier:"Password"`
	CreatedAt time.Time      `json:"created_at"`
	UpdatedAt time.Time      `json:"updated_at"`
	DeletedAt gorm.DeletedAt `json:"deleted_at"`
}

func (User) TableName

func (User) TableName() string

TableName ...

Jump to

Keyboard shortcuts

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