2023-07-10 07:17:02 +00:00
|
|
|
package fic
|
|
|
|
|
|
|
|
type GenerateType int
|
|
|
|
|
|
|
|
const (
|
|
|
|
GenPublic GenerateType = iota
|
|
|
|
GenEvents
|
|
|
|
GenTeam
|
|
|
|
GenTeams
|
|
|
|
GenThemes
|
|
|
|
GenTeamIssues
|
|
|
|
)
|
|
|
|
|
|
|
|
type GenStruct struct {
|
|
|
|
Id string `json:"id"`
|
|
|
|
Type GenerateType `json:"type"`
|
|
|
|
TeamId int64 `json:"team_id,omitempty"`
|
2023-07-10 10:10:03 +00:00
|
|
|
ended chan error
|
|
|
|
}
|
|
|
|
|
|
|
|
func (gs *GenStruct) GenEnded() chan error {
|
|
|
|
gs.ended = make(chan error, 1)
|
|
|
|
return gs.ended
|
|
|
|
}
|
|
|
|
|
|
|
|
func (gs *GenStruct) GetEnded() chan error {
|
|
|
|
return gs.ended
|
|
|
|
}
|
|
|
|
|
|
|
|
func (gs *GenStruct) End(err error) {
|
|
|
|
if gs.ended != nil {
|
|
|
|
gs.ended <- err
|
|
|
|
}
|
2023-07-10 07:17:02 +00:00
|
|
|
}
|