19 lines
343 B
Go
19 lines
343 B
Go
package entity
|
|
|
|
// Source is square_posts.source.
|
|
type Source int16
|
|
|
|
const (
|
|
SourceUser Source = 0
|
|
SourceBotRSS Source = 1
|
|
)
|
|
|
|
func (s Source) Valid() bool {
|
|
return s == SourceUser || s == SourceBotRSS
|
|
}
|
|
|
|
// IsBot reports whether the post was published by the media bot worker.
|
|
func (s Source) IsBot() bool {
|
|
return s == SourceBotRSS
|
|
}
|