Documentation ¶
Index ¶
- func InsertParticipant(user *User, recruitment *Recruitment, alternate bool) error
- type Channel
- func (c *Channel) DiscordIdStr() string
- func (c *Channel) IsEnabledRecruitment() bool
- func (c *Channel) LoadLocation() *time.Location
- func (c *Channel) UpdateExpireDuration(expireDuration uint32) error
- func (c *Channel) UpdateExpireDurationForReserve(expireDurationForReserve uint32) error
- func (c *Channel) UpdateLanguage(language string) error
- func (c *Channel) UpdateRecruitment(isRecruitment bool) error
- func (c *Channel) UpdateReserveLimitTime(reserveLimitTime uint32) error
- func (c *Channel) UpdateTimezone(timezone string) error
- type Nickname
- type Participant
- type Recruitment
- func FetchActiveRecruitmentWithLabel(channel *Channel, label int) (*Recruitment, error)
- func FetchActiveRecruitments(channel *Channel) ([]*Recruitment, error)
- func InsertRecruitment(user *User, channel *Channel, title string, capacity uint32, ...) (*Recruitment, string, error)
- func ResurrectClosedRecruitment(channel *Channel) (*Recruitment, error)
- func (r *Recruitment) AuthorName() string
- func (r *Recruitment) CloseRecruitment() error
- func (r *Recruitment) ExpireAtTime(timezone *time.Location) string
- func (r *Recruitment) GetTitle() string
- func (r *Recruitment) IsParticipantsFull() bool
- func (r *Recruitment) IsPastExpireAt() bool
- func (r *Recruitment) IsPastReserveAt() bool
- func (r *Recruitment) JoinParticipant(user *User, channel *Channel) (bool, error)
- func (r *Recruitment) JoinParticipantAlternate(user *User, channel *Channel) (bool, error)
- func (r *Recruitment) LeaveParticipant(user *User, channel *Channel) (bool, error)
- func (r *Recruitment) MemberNames(alternate bool) []string
- func (r *Recruitment) NotifyRecruitment() error
- func (r *Recruitment) ParticipantCount() int
- func (r *Recruitment) ProcessOnTime(now time.Time) (bool, bool, error)
- func (r *Recruitment) Reload(channel *Channel)
- func (r *Recruitment) ReserveAtTime(timezone *time.Location) string
- func (r *Recruitment) UpdateTweetId(id int64) error
- func (r *Recruitment) VacantSize() int
- type TwitterConfig
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InsertParticipant ¶
func InsertParticipant(user *User, recruitment *Recruitment, alternate bool) error
Types ¶
type Channel ¶
type Channel struct { gorm.Model DiscordChannelId int64 DiscordGuildId int64 Recruitment bool Timezone string Language string ReserveLimitTime uint32 ExpireDuration uint32 ExpireDurationForReserve uint32 TwitterConfigId uint32 }
func FetchAllChannels ¶
func FindChannel ¶
func FindOrCreateChannel ¶
func (*Channel) DiscordIdStr ¶
func (*Channel) IsEnabledRecruitment ¶
func (*Channel) LoadLocation ¶
func (*Channel) UpdateExpireDuration ¶
func (*Channel) UpdateExpireDurationForReserve ¶
func (*Channel) UpdateLanguage ¶
func (*Channel) UpdateRecruitment ¶
func (*Channel) UpdateReserveLimitTime ¶
func (*Channel) UpdateTimezone ¶
type Nickname ¶
func FindNickname ¶
type Participant ¶
type Participant struct { gorm.Model DiscordUserId int64 RecruitmentId uint32 Alternate bool User User `gorm:"foreignkey:DiscordUserId;references:discord_user_id"` }
func (*Participant) Delete ¶
func (p *Participant) Delete() error
type Recruitment ¶
type Recruitment struct { gorm.Model DiscordChannelId int64 Label uint32 Title string EncryptedTitle []byte Capacity uint32 Active bool Notified bool TweetId int64 ReserveAt *time.Time ExpireAt *time.Time Participants []Participant `gorm:"foreignkey:RecruitmentId"` }
func FetchActiveRecruitmentWithLabel ¶
func FetchActiveRecruitmentWithLabel(channel *Channel, label int) (*Recruitment, error)
指定ラベルの募集を取得する ユーザー名、ニックネームは取得しない
func FetchActiveRecruitments ¶
func FetchActiveRecruitments(channel *Channel) ([]*Recruitment, error)
指定チャンネルの全募集を取得する ユーザー名、ニックネームも取得する
func InsertRecruitment ¶
func ResurrectClosedRecruitment ¶
func ResurrectClosedRecruitment(channel *Channel) (*Recruitment, error)
func (*Recruitment) AuthorName ¶
func (r *Recruitment) AuthorName() string
func (*Recruitment) CloseRecruitment ¶
func (r *Recruitment) CloseRecruitment() error
func (*Recruitment) ExpireAtTime ¶
func (r *Recruitment) ExpireAtTime(timezone *time.Location) string
func (*Recruitment) GetTitle ¶
func (r *Recruitment) GetTitle() string
func (*Recruitment) IsParticipantsFull ¶
func (r *Recruitment) IsParticipantsFull() bool
func (*Recruitment) IsPastExpireAt ¶
func (r *Recruitment) IsPastExpireAt() bool
func (*Recruitment) IsPastReserveAt ¶
func (r *Recruitment) IsPastReserveAt() bool
予定時間が過ぎている、もしくは予定がなければtrue 予定時間が存在してまだ過ぎていないならfalse
func (*Recruitment) JoinParticipant ¶
func (r *Recruitment) JoinParticipant(user *User, channel *Channel) (bool, error)
func (*Recruitment) JoinParticipantAlternate ¶
func (r *Recruitment) JoinParticipantAlternate(user *User, channel *Channel) (bool, error)
func (*Recruitment) LeaveParticipant ¶
func (r *Recruitment) LeaveParticipant(user *User, channel *Channel) (bool, error)
func (*Recruitment) MemberNames ¶
func (r *Recruitment) MemberNames(alternate bool) []string
func (*Recruitment) NotifyRecruitment ¶
func (r *Recruitment) NotifyRecruitment() error
func (*Recruitment) ParticipantCount ¶
func (r *Recruitment) ParticipantCount() int
func (*Recruitment) ProcessOnTime ¶
func (*Recruitment) Reload ¶
func (r *Recruitment) Reload(channel *Channel)
func (*Recruitment) ReserveAtTime ¶
func (r *Recruitment) ReserveAtTime(timezone *time.Location) string
func (*Recruitment) UpdateTweetId ¶
func (r *Recruitment) UpdateTweetId(id int64) error
func (*Recruitment) VacantSize ¶
func (r *Recruitment) VacantSize() int
type TwitterConfig ¶
type TwitterConfig struct { gorm.Model ConsumerKey string ConsumerSecret string AccessToken string AccessTokenSecret string Title string }
func FindTwitterConfig ¶
func FindTwitterConfig(id uint32) (*TwitterConfig, error)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.