repository

package
v0.0.0-...-a9a82f6 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2023 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
}

func NewEvent

func NewEvent() *Event

func (*Event) CreateEvent

func (r *Event) CreateEvent(tx godb.Queryer, ctx context.Context, userID, typeID int32, date time.Time) (*entity.Event, error)

func (*Event) CreateType

func (r *Event) CreateType(tx godb.Queryer, ctx context.Context, userID int32, name string, isVisible bool) (*entity.EventType, error)

func (*Event) DeleteEvent

func (r *Event) DeleteEvent(tx godb.Queryer, ctx context.Context, userID, id int32) error

func (*Event) DeleteType

func (r *Event) DeleteType(tx godb.Queryer, ctx context.Context, userID, id int32) error

func (*Event) EditType

func (r *Event) EditType(tx godb.Queryer, ctx context.Context, userID, id int32, name string, isVisible bool) (*entity.EventType, error)

func (*Event) FriendsFeed

func (r *Event) FriendsFeed(tx godb.Queryer, ctx context.Context, userID int32) ([]*dto.FeedResponseDTO, int32, error)

func (*Event) ListEvent

func (r *Event) ListEvent(tx godb.Queryer, ctx context.Context, filter *dto.ListEventFilter) ([]*entity.Event, int32, error)

func (*Event) ListType

func (r *Event) ListType(tx godb.Queryer, ctx context.Context, userID int32, onlyVisible bool) ([]*entity.EventType, int32, error)

type Friend

type Friend struct {
}

func NewFriend

func NewFriend() *Friend
func (r *Friend) CreateFriendshipLink(tx godb.Queryer, ctx context.Context, userID, withUserID int32) ([]*entity.Friend, error)

func (*Friend) CreateInvite

func (r *Friend) CreateInvite(tx godb.Queryer, ctx context.Context, userID, withUserID int32) (*entity.FriendInvite, error)

func (*Friend) DeleteInvite

func (r *Friend) DeleteInvite(tx godb.Queryer, ctx context.Context, userID, inviteID int32) error

func (*Friend) GetFriendByUserID

func (r *Friend) GetFriendByUserID(tx godb.Queryer, ctx context.Context, userID, withUserID int32) (*entity.Friend, error)

func (*Friend) GetInviteByID

func (r *Friend) GetInviteByID(tx godb.Queryer, ctx context.Context, userID, id int32) (*entity.FriendInvite, error)

func (*Friend) GetInviteByUserID

func (r *Friend) GetInviteByUserID(tx godb.Queryer, ctx context.Context, userID, withUserID int32) (*entity.FriendInvite, error)

func (*Friend) ListOfFriends

func (r *Friend) ListOfFriends(tx godb.Queryer, ctx context.Context, userID int32) ([]*entity.User, int32, error)

func (*Friend) ListPendingInvitations

func (r *Friend) ListPendingInvitations(tx godb.Queryer, ctx context.Context, userID int32) ([]*dto.InviteListResponseDTO, int32, error)

type IEvent

type IEvent interface {
	CreateType(tx godb.Queryer, ctx context.Context, userID int32, name string, isVisible bool) (*entity.EventType, error)
	DeleteType(tx godb.Queryer, ctx context.Context, userID, id int32) error
	ListType(tx godb.Queryer, ctx context.Context, userID int32, onlyVisible bool) ([]*entity.EventType, int32, error)
	EditType(tx godb.Queryer, ctx context.Context, userID, id int32, name string, isVisible bool) (*entity.EventType, error)

	CreateEvent(tx godb.Queryer, ctx context.Context, userID, eventTypeID int32, date time.Time) (*entity.Event, error)
	DeleteEvent(tx godb.Queryer, ctx context.Context, userID, id int32) error
	ListEvent(tx godb.Queryer, ctx context.Context, filter *dto.ListEventFilter) ([]*entity.Event, int32, error)

	FriendsFeed(tx godb.Queryer, ctx context.Context, userID int32) ([]*dto.FeedResponseDTO, int32, error)
}

type IFriend

type IFriend interface {
	CreateInvite(tx godb.Queryer, ctx context.Context, userID, id int32) (*entity.FriendInvite, error)
	ListPendingInvitations(tx godb.Queryer, ctx context.Context, userID int32) ([]*dto.InviteListResponseDTO, int32, error)
	DeleteInvite(tx godb.Queryer, ctx context.Context, userID, id int32) error
	GetInviteByUserID(tx godb.Queryer, ctx context.Context, userID, withUserID int32) (*entity.FriendInvite, error)
	GetInviteByID(tx godb.Queryer, ctx context.Context, userID, id int32) (*entity.FriendInvite, error)

	GetFriendByUserID(tx godb.Queryer, ctx context.Context, userID, withUserID int32) (*entity.Friend, error)
	CreateFriendshipLink(tx godb.Queryer, ctx context.Context, userID, withUserID int32) ([]*entity.Friend, error)
	ListOfFriends(tx godb.Queryer, ctx context.Context, userID int32) ([]*entity.User, int32, error)
}

type IPassword

type IPassword interface {
	Create(tx godb.Queryer, ctx context.Context, userID int32, passwordHash string) (*entity.Password, error)
	GetByUserID(tx godb.Queryer, ctx context.Context, userID int32) (*entity.Password, error)
	Update(tx godb.Queryer, ctx context.Context, id int32, passwordHash string) (*entity.Password, error)
	IncreaseFailedAttempts(tx godb.Queryer, ctx context.Context, id int32) (*entity.Password, error)
	ResetFailedAttempts(tx godb.Queryer, ctx context.Context, id int32) (*entity.Password, error)
}

type ISession

type ISession interface {
	CreateOrUpdate(tx godb.Queryer, ctx context.Context, userID int32, sessionHash string) (*entity.Session, error)
	GetByUserID(tx godb.Queryer, ctx context.Context, sessionHash string) (*entity.Session, error)
	DeleteByID(tx godb.Queryer, ctx context.Context, id int32) error
}

type IUser

type IUser interface {
	GetByID(tx godb.Queryer, ctx context.Context, id int32, showPrivateInfo bool) (*entity.User, error)
	GetByName(tx godb.Queryer, ctx context.Context, name string) (*entity.User, error)
	Create(tx godb.Queryer, ctx context.Context, name, displayedName string) (*entity.User, error)
	UpdateProfile(tx godb.Queryer, ctx context.Context, req *dto.UpdateProfileDTO) (*entity.User, error)
	UpdateImage(tx godb.Queryer, ctx context.Context, req *dto.UpdateProfileImageDTO) (*entity.User, error)
}

type Password

type Password struct {
}

func NewPassword

func NewPassword() *Password

func (*Password) Create

func (r *Password) Create(tx godb.Queryer, ctx context.Context, userID int32, passwordHash string) (*entity.Password, error)

func (*Password) GetByUserID

func (r *Password) GetByUserID(tx godb.Queryer, ctx context.Context, userID int32) (*entity.Password, error)

func (*Password) IncreaseFailedAttempts

func (r *Password) IncreaseFailedAttempts(tx godb.Queryer, ctx context.Context, id int32) (*entity.Password, error)

func (*Password) ResetFailedAttempts

func (r *Password) ResetFailedAttempts(tx godb.Queryer, ctx context.Context, id int32) (*entity.Password, error)

func (*Password) Update

func (r *Password) Update(tx godb.Queryer, ctx context.Context, id int32, passwordHash string) (*entity.Password, error)

type Session

type Session struct {
}

func NewSession

func NewSession() *Session

func (*Session) CreateOrUpdate

func (r *Session) CreateOrUpdate(tx godb.Queryer, ctx context.Context, userID int32, sessionHash string) (*entity.Session, error)

func (*Session) DeleteByID

func (r *Session) DeleteByID(tx godb.Queryer, ctx context.Context, id int32) error

func (*Session) GetByUserID

func (r *Session) GetByUserID(tx godb.Queryer, ctx context.Context, sessionHash string) (*entity.Session, error)

type User

type User struct {
}

func NewUser

func NewUser() *User

func (*User) Create

func (r *User) Create(tx godb.Queryer, ctx context.Context, name, displayedName string) (*entity.User, error)

func (*User) GetByID

func (r *User) GetByID(tx godb.Queryer, ctx context.Context, id int32, showPrivateInfo bool) (*entity.User, error)

func (*User) GetByName

func (r *User) GetByName(tx godb.Queryer, ctx context.Context, name string) (*entity.User, error)

func (*User) UpdateImage

func (r *User) UpdateImage(tx godb.Queryer, ctx context.Context, req *dto.UpdateProfileImageDTO) (*entity.User, error)

func (*User) UpdateProfile

func (r *User) UpdateProfile(tx godb.Queryer, ctx context.Context, req *dto.UpdateProfileDTO) (*entity.User, error)

Jump to

Keyboard shortcuts

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