Documentation ¶
Index ¶
- Constants
- Variables
- func NewAdministration(client *mastodon.Client, db client.DB) service.Administration
- func NewIncrement(environment config.Environment, client *mastodon.Client, db client.DB) service.Increment
- func NewReply(client *mastodon.Client) service.Reply
- func NewUpdate(environment config.Environment, client *mastodon.Client, db client.DB) service.Update
Constants ¶
View Source
const (
MaxTootLength = 500
)
Variables ¶
View Source
var ( ExecutedAdministrationEventsTotal = promauto.NewCounter(prometheus.CounterOpts{ Namespace: "ejaculation_counter", Name: "executed_administration_events_total", Help: "Total number of administration events replied through API.", }) ExecutedAdministrationEventsErrorsTotal = promauto.NewCounter(prometheus.CounterOpts{ Namespace: "ejaculation_counter", Name: "executed_administration_events_errors_total", Help: "Total number of errors triggered when replying to administration through API.", }) )
View Source
var ( IncrementTotal = promauto.NewCounter(prometheus.CounterOpts{ Namespace: "ejaculation_counter", Name: "increment_total", Help: "Total number of increment through API.", }) IncrementErrorTotal = promauto.NewCounterVec(prometheus.CounterOpts{ Namespace: "ejaculation_counter", Name: "increment_error_total", Help: "Total number of errors triggered when incrementing through API.", }, []string{"type"}) )
View Source
var ( RepliedEventsTotal = promauto.NewCounter(prometheus.CounterOpts{ Namespace: "ejaculation_counter", Name: "replied_events_total", Help: "Total number of events replied through API.", }) RepliedEventsErrorTotal = promauto.NewCounter(prometheus.CounterOpts{ Namespace: "ejaculation_counter", Name: "replied_events_error_total", Help: "Total number of errors triggered when replying through API.", }) )
View Source
var ( DisplayNameRegex = regexp.MustCompile(`(.*)(昨日: (\d+) \/ 今日: (\d+))`) UpdatesTotal = promauto.NewCounter(prometheus.CounterOpts{ Namespace: "ejaculation_counter", Name: "updates_total", Help: "Total number of updates through API.", }) UpdatesErrorTotal = promauto.NewCounterVec(prometheus.CounterOpts{ Namespace: "ejaculation_counter", Name: "updates_error_total", Help: "Total number of errors triggered when updating through API.", }, []string{"type"}) )
View Source
var (
MentionRegexp = regexp.MustCompile(`(@[a-z0-9_]+([a-z0-9_\.-]+[a-z0-9_]+)?)@[[:word:].-]+[a-z0-9]+`)
)
Functions ¶
func NewAdministration ¶
func NewAdministration( client *mastodon.Client, db client.DB, ) service.Administration
func NewIncrement ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.