Documentation
¶
Index ¶
- Variables
- type AnswerRepository
- type CampRepository
- type EventRepository
- type GetAnswersQuery
- type GetOptionsQuery
- type MessageRepository
- type OptionRepository
- type PaymentRepository
- type QuestionGroupRepository
- type QuestionRepository
- type Repository
- type RollCallReactionRepository
- type RollCallRepository
- type RoomGroupRepository
- type RoomRepository
- type UserRepository
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrCampNotFound = errors.New("camp not found") ErrParticipantNotFound = errors.New("participant not found") )
View Source
var ( ErrRoomNotFound = errors.New("room not found") ErrUserOrRoomGroupNotFound = errors.New("user or room group not found") )
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 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 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 GetAnswersQuery ¶ added in v0.5.0
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 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 Repository ¶
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 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)
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
}
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package mockrepository is a generated GoMock package.
|
Package mockrepository is a generated GoMock package. |
Click to show internal directories.
Click to hide internal directories.