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: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LoginRes

type LoginRes struct {
	AccessToken string    `json:"access_token"`
	ExpiredAt   time.Time `json:"expired_at"`
}

type Res

type Res 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"`
	CreatedAt time.Time `json:"created_at"`
	UpdatedAt time.Time `json:"updated_at"`
}

type Service

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

	// Login ...
	Login(ctx context.Context, param User) (returnData LoginRes, err error)

	// Profile ...
	Profile(ctx context.Context, id int64) (returnData Res, err error)
}

Service ...

func NewSrv

func NewSrv(repo *repository.Repositories, token token.IToken) Service

NewSrv ..

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

Jump to

Keyboard shortcuts

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