repository

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2026 License: MIT Imports: 3 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrCampNotFound        = errors.New("camp not found")
	ErrCampAlreadyExists   = errors.New("camp with this display ID already exists")
	ErrParticipantNotFound = errors.New("participant not found")
)
View Source
var (
	ErrRoomNotFound            = errors.New("room not found")
	ErrUserOrRoomGroupNotFound = errors.New("user or room group not found")
	ErrUserAlreadyAssigned     = errors.New(
		"some users are already assigned to another room in this camp",
	)
)
View Source
var ErrMessageNotFound = errors.New("message not found")
View Source
var ErrPaymentNotFound = errors.New("payment not found")
View Source
var ErrRollCallNotFound = errors.New("roll call not found")
View Source
var ErrRollCallReactionAlreadyExists = errors.New("roll call reaction already exists")
View Source
var ErrRollCallReactionNotFound = errors.New("roll call reaction not found")
View Source
var ErrRoomGroupNotFound = errors.New("room group not found")
View Source
var ErrUserNotFound = errors.New("user not found")

Functions

This section is empty.

Types

type ActivityRepository added in v1.1.0

type ActivityRepository interface {
	CreateActivity(ctx context.Context, activity *model.Activity) error
	GetActivitiesByCampID(ctx context.Context, campID uint) ([]model.Activity, error)
}

type AnswerRepository

type AnswerRepository interface {
	CreateAnswer(ctx context.Context, answer *model.Answer) error
	CreateAnswers(ctx context.Context, answers *[]model.Answer) error
	GetAnswerByID(ctx context.Context, id uint) (*model.Answer, error)
	GetAnswers(ctx context.Context, query GetAnswersQuery) ([]model.Answer, error)
	UpdateAnswer(ctx context.Context, answerID uint, answer *model.Answer) error
}

type CampRepository

type CampRepository interface {
	CreateCamp(camp *model.Camp) error
	GetCamps() ([]model.Camp, error)
	GetCampByID(ctx context.Context, id uint) (*model.Camp, error)
	UpdateCamp(ctx context.Context, 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)
	IsCampParticipant(ctx context.Context, campID uint, userID string) (bool, 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 GetAnswersQuery added in v0.5.0

type GetAnswersQuery struct {
	UserID                 *string
	QuestionGroupID        *uint
	QuestionID             *uint
	IncludePrivateAnswers  bool
	IncludeNonParticipants bool
}

type GetOptionsQuery

type GetOptionsQuery struct {
	QuestionID *uint
}

type MessageRepository added in v0.7.2

type MessageRepository interface {
	// CreateMessage メッセージをデータベースに作成します
	CreateMessage(ctx context.Context, message *model.Message) error
	// GetReadyToSendMessages 送信予定時刻を過ぎた未送信のメッセージを取得します
	GetReadyToSendMessages(ctx context.Context) ([]model.Message, error)
	// UpdateMessage メッセージの情報を更新します
	UpdateMessage(ctx context.Context, messageID uint, message *model.Message) error
}

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
	GetPayments(ctx context.Context, campID uint) ([]model.Payment, error)
	GetPaymentByUserID(ctx context.Context, campID uint, userID string) (*model.Payment, error)
	UpdatePayment(ctx context.Context, paymentID uint, payment *model.Payment) error
	GetPaymentByID(ctx context.Context, paymentID uint) (*model.Payment, error)
}

type QuestionGroupRepository

type QuestionGroupRepository interface {
	CreateQuestionGroup(questionGroup *model.QuestionGroup) error
	GetQuestionGroups(ctx context.Context, campID uint) ([]model.QuestionGroup, error)
	GetQuestionGroup(ctx context.Context, 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 RollCallReactionRepository added in v0.8.1

type RollCallReactionRepository interface {
	CreateRollCallReaction(ctx context.Context, reaction *model.RollCallReaction) error
	GetRollCallReactions(ctx context.Context, rollCallID uint) ([]model.RollCallReaction, error)
	GetRollCallReactionByID(ctx context.Context, reactionID uint) (*model.RollCallReaction, error)
	UpdateRollCallReaction(
		ctx context.Context,
		reactionID uint,
		reaction *model.RollCallReaction,
	) error
	DeleteRollCallReaction(ctx context.Context, reactionID uint) error
}

type RollCallRepository added in v0.7.3

type RollCallRepository interface {
	CreateRollCall(ctx context.Context, rollCall *model.RollCall) error
	GetRollCalls(ctx context.Context, campID uint) ([]model.RollCall, error)
}

type RoomGroupRepository added in v0.7.0

type RoomGroupRepository interface {
	CreateRoomGroup(ctx context.Context, roomGroup *model.RoomGroup) error
	UpdateRoomGroup(ctx context.Context, roomGroupID uint, roomGroup *model.RoomGroup) error
	GetRoomGroupByID(ctx context.Context, roomGroupID uint) (*model.RoomGroup, error)
	GetRoomGroups(ctx context.Context, campID uint) ([]model.RoomGroup, error)
	DeleteRoomGroup(ctx context.Context, roomGroupID uint) error
}

type RoomRepository

type RoomRepository interface {
	GetRooms() ([]model.Room, error)
	GetRoomByID(ctx context.Context, roomID uint) (*model.Room, error)
	GetRoomByUserID(ctx context.Context, campID uint, userID string) (*model.Room, error)
	GetRoomCampID(ctx context.Context, roomID uint) (uint, error)
	CreateRoom(ctx context.Context, room *model.Room) error
	UpdateRoom(ctx context.Context, roomID uint, room *model.Room) error
	DeleteRoom(ctx context.Context, roomID uint) error
}

type RoomStatusRepository added in v1.1.0

type RoomStatusRepository interface {
	SetRoomStatus(
		ctx context.Context,
		roomID uint,
		status model.RoomStatus,
		operatorID string,
	) error
	GetRoomStatusLogs(ctx context.Context, roomID uint) ([]model.RoomStatusLog, 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 mockrepository is a generated GoMock package.
Package mockrepository is a generated GoMock package.

Jump to

Keyboard shortcuts

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