user

package
v0.0.0-...-808094b Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Messages = messages{
	EmailAlreadyExists: "user_email_already_exists",
	CreateFailed:       "user_create_failed",
	FetchFailed:        "user_fetch_failed",
	ParseFailed:        "user_parse_failed",
}

Functions

This section is empty.

Types

type CreateDto

type CreateDto struct {
	Id             uuid.UUID   `json:"-" neo4j:"id"`
	UserName       string      `json:"userName" neo4j:"userName"`
	Email          string      `json:"email" neo4j:"email"`
	FavoriteGenres []uuid.UUID `json:"favoriteGenres" neo4j:"favoriteGenres"`
}

func (*CreateDto) Build

func (dto *CreateDto) Build() map[string]interface{}

type ListDto

type ListDto struct {
	Id       uuid.UUID `json:"id" neo4j:"id"`
	UserName string    `json:"userName" neo4j:"userName"`
	Email    string    `json:"email" neo4j:"email"`
}

type Repo

type Repo interface {
	GetByEmail(ctx context.Context, email string) (*ListDto, *i18np.Error)
	Create(ctx context.Context, dto CreateDto) (*ListDto, *i18np.Error)
}

func NewRepo

func NewRepo(driver neo4j.DriverWithContext) Repo

Jump to

Keyboard shortcuts

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