Documentation ¶
Index ¶
- Variables
- type EventRepository
- func (r *EventRepository) AddUser(ctx context.Context, eventId, userId int) error
- func (r *EventRepository) DeleteEvent(ctx context.Context, id int) error
- func (r *EventRepository) GetEvent(ctx context.Context, id int) (*entity.Event, error)
- func (r *EventRepository) InsertEvent(ctx context.Context, userId int, event *entity.Event) error
- type SpaceRepository
- func (r *SpaceRepository) AddUser(ctx context.Context, userId, spaceId int) error
- func (r *SpaceRepository) DeleteSpace(ctx context.Context, id int) error
- func (r *SpaceRepository) GetSpace(ctx context.Context, id int) (*entity.Space, error)
- func (r *SpaceRepository) InsertSpace(ctx context.Context, userId int, space *entity.Space) error
- func (r *SpaceRepository) UpdateSpace(ctx context.Context, id int, name, description string) error
- type UserRepository
- func (r *UserRepository) DeleteUser(ctx context.Context, userId, spaceId int) error
- func (r *UserRepository) GetForm(ctx context.Context, userId, spaceId int) (*entity.Form, error)
- func (r *UserRepository) GetUserData(ctx context.Context, id int) (*entity.User, error)
- func (r *UserRepository) GetUserForms(ctx context.Context, userId int) ([]*entity.Form, error)
- func (r *UserRepository) InsertUser(ctx context.Context, user *entity.User) error
- func (r *UserRepository) UpdateForm(ctx context.Context, userId, spaceId int, userTags, pairTags entity.Tags) error
- func (r *UserRepository) UpdateUser(ctx context.Context, id int, firstName, lastName, userName, photoURL string) (*entity.User, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrEventNotFound = errors.New("event not found") ErrEventAlreadyExists = errors.New("event already exists") )
View Source
var ( ErrSpaceNotFound = errors.New("space not found") ErrSpaceAlreadyExists = errors.New("space already exists") )
View Source
var ( ErrUserNotFound = errors.New("user not found") ErrUserAlreadyExists = errors.New("user already exists") )
Functions ¶
This section is empty.
Types ¶
type EventRepository ¶
type EventRepository struct {
// contains filtered or unexported fields
}
func NewEventRepository ¶
func NewEventRepository(once *sync.Once, db *database.Postgres) *EventRepository
func (*EventRepository) AddUser ¶
func (r *EventRepository) AddUser(ctx context.Context, eventId, userId int) error
TODO: Err already joined
func (*EventRepository) DeleteEvent ¶
func (r *EventRepository) DeleteEvent(ctx context.Context, id int) error
func (*EventRepository) InsertEvent ¶
type SpaceRepository ¶
type SpaceRepository struct {
// contains filtered or unexported fields
}
func NewSpaceRepository ¶
func NewSpaceRepository(once *sync.Once, db *database.Postgres) *SpaceRepository
func (*SpaceRepository) AddUser ¶
func (r *SpaceRepository) AddUser(ctx context.Context, userId, spaceId int) error
TODO: err ALready Exists
func (*SpaceRepository) DeleteSpace ¶
func (r *SpaceRepository) DeleteSpace(ctx context.Context, id int) error
func (*SpaceRepository) InsertSpace ¶
func (*SpaceRepository) UpdateSpace ¶
type UserRepository ¶
type UserRepository struct {
// contains filtered or unexported fields
}
func NewUserRepository ¶
func NewUserRepository(once *sync.Once, db *database.Postgres) *UserRepository
func (*UserRepository) DeleteUser ¶
func (r *UserRepository) DeleteUser(ctx context.Context, userId, spaceId int) error
func (*UserRepository) GetUserData ¶
func (*UserRepository) GetUserForms ¶
func (*UserRepository) InsertUser ¶
func (*UserRepository) UpdateForm ¶
func (*UserRepository) UpdateUser ¶
Click to show internal directories.
Click to hide internal directories.