domain

package
v0.0.0-...-64d506c Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrBadCredentials  = errors.New("email/password combination don't work")
	ErrUnauthenticated = errors.New("unauthenticated")
	ErrForbidden       = errors.New("unauthorized")
)

Functions

This section is empty.

Types

type Domain

type Domain struct {
	UsersRepo   postgres.UsersRepo
	MeetupsRepo postgres.MeetupsRepo
}

func NewDomain

func NewDomain(usersRepo postgres.UsersRepo, meetupsRepo postgres.MeetupsRepo) *Domain

func (*Domain) CreateMeetup

func (d *Domain) CreateMeetup(ctx context.Context, input models.NewMeetup) (*models.Meetup, error)

func (*Domain) DeleteMeetup

func (d *Domain) DeleteMeetup(ctx context.Context, id string) (bool, error)

func (*Domain) Login

func (d *Domain) Login(ctx context.Context, input models.LoginInput) (*models.AuthResponse, error)

func (*Domain) Register

func (d *Domain) Register(ctx context.Context, input models.RegisterInput) (*models.AuthResponse, error)

func (*Domain) UpdateMeetup

func (d *Domain) UpdateMeetup(ctx context.Context, id string, input models.UpdateMeetup) (*models.Meetup, error)

type Ownable

type Ownable interface {
	IsOwner(user *models.User) bool
}

Jump to

Keyboard shortcuts

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