domain

package
v0.0.0-...-b5678d6 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateSessionParams

type CreateSessionParams struct {
	UserID   uuid.UUID     `json:"user_id"`
	Duration time.Duration `json:"duration"`
}

type CreateUserParams

type CreateUserParams struct {
	Email    string `json:"email"`
	Password string `json:"password"`
}

type Session

type Session struct {
	SessionID string `json:"session_id"`
	UserID    string `json:"user_id"`
}

type SessionRepository

type SessionRepository interface {
	CreateSession(ctx context.Context, arg *CreateSessionParams) (*Session, error)
	GetSessionByID(ctx context.Context, sessionID string) (*Session, error)
	DeleteByID(ctx context.Context, sessionID string) error
}

type SessionUseCase

type SessionUseCase interface {
	CreateSession(ctx context.Context, arg *CreateSessionParams) (*Session, error)
	GetSessionByID(ctx context.Context, sessionID string) (*Session, error)
	DeleteByID(ctx context.Context, sessionID string) error
}

type UserDTO

type UserDTO struct {
	ID       uuid.UUID `json:"id"`
	Email    string    `json:"email"`
	Password string    `json:"password"`
}

type UserDomainService

type UserDomainService interface {
	GetUserByEmail(ctx context.Context, email string) (*UserDTO, error)
	CreateUser(ctx context.Context, arg *CreateUserParams) (*UserDTO, error)
}

Jump to

Keyboard shortcuts

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