repository

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AnswerRepository

type AnswerRepository interface {
	CreateAnswers(ctx context.Context, answers *[]model.Answer) error
	GetAnswerByID(id uint) (*model.Answer, error)
	GetAnswersByUserAndQuestionGroup(
		ctx context.Context,
		userID string,
		questionGroupID uint,
	) ([]model.Answer, error)
	UpdateAnswer(answer *model.Answer) error
}

type CampRepository

type CampRepository interface {
	CreateCamp(camp *model.Camp) error
	GetCamps() ([]model.Camp, error)
	GetCampByID(id uint) (*model.Camp, error)
	UpdateCamp(campID uint, camp *model.Camp) error
	DeleteCamp(ctx context.Context, campID uint) error
	AddCampParticipant(ctx context.Context, campID uint, user *model.User) error
	RemoveCampParticipant(ctx context.Context, campID uint, user *model.User) error
	GetCampParticipants(ctx context.Context, campID uint) ([]model.User, error)
}

type EventRepository

type EventRepository interface {
	GetEvents(ctx context.Context, campID uint) ([]model.Event, error)
	GetEventByID(id uint) (*model.Event, error)
	CreateEvent(event *model.Event) error
	UpdateEvent(ctx context.Context, ID uint, event *model.Event) error
	DeleteEvent(ID uint) error
}

type GetOptionsQuery

type GetOptionsQuery struct {
	QuestionID *uint
}

type OptionRepository

type OptionRepository interface {
	CreateOption(option *model.Option) error
	GetOptions(query *GetOptionsQuery) ([]model.Option, error)
}

type PaymentRepository

type PaymentRepository interface {
	CreatePayment(ctx context.Context, payment *model.Payment) error
}

type QuestionGroupRepository

type QuestionGroupRepository interface {
	CreateQuestionGroup(questionGroup *model.QuestionGroup) error
	GetQuestionGroups(ctx context.Context, campID uint) ([]model.QuestionGroup, error)
	GetQuestionGroup(ID uint) (*model.QuestionGroup, error)
	UpdateQuestionGroup(
		ctx context.Context,
		questionGroupID uint,
		questionGroup model.QuestionGroup,
	) error
	DeleteQuestionGroup(ID uint) error
}

type QuestionRepository

type QuestionRepository interface {
	CreateQuestion(question *model.Question) error
	GetQuestions() ([]model.Question, error)
	GetQuestionByID(id uint) (*model.Question, error)
	DeleteQuestionByID(id uint) error
	UpdateQuestion(ctx context.Context, questionID uint, question *model.Question) error
}

type RoomRepository

type RoomRepository interface {
	GetRooms() ([]model.Room, error)
	GetRoomByID(id uint) (*model.Room, error)
	CreateRoom(room *model.Room) error
	UpdateRoom(room *model.Room) error
}

type UserRepository

type UserRepository interface {
	GetOrCreateUser(ctx context.Context, traqID string) (*model.User, error)
	GetUserTraqID(ID uint) (string, error)
	GetStaffs() ([]model.User, error)
	UpdateUser(ctx context.Context, user *model.User) error
}

Directories

Path Synopsis
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.

Jump to

Keyboard shortcuts

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