Documentation ¶
Overview ¶
Package service is a generated GoMock package.
Index ¶
- Constants
- Variables
- type Account
- type Action
- type Administration
- type AdministrationEvent
- type Count
- type Doublet
- type Emoji
- type Event
- type Increment
- type IncrementEvent
- type Message
- type MockAction
- type MockActionMockRecorder
- type Packet
- type Processor
- type QueueReader
- type Reply
- type ReplyErrorEvent
- type ReplyEvent
- type Tag
- type Through
- type Tick
- type Update
- type UpdateEvent
- type User
Constants ¶
View Source
const (
PacketTTL = 30 * time.Minute
)
Variables ¶
View Source
var ( EventsTotal = promauto.NewCounterVec(prometheus.CounterOpts{ Namespace: "ejaculation_counter", Name: "events_total", Help: "Total number of events triggered by messages.", }, []string{"name", "action"}) EventsErrorTotal = promauto.NewCounterVec(prometheus.CounterOpts{ Namespace: "ejaculation_counter", Name: "events_error_total", Help: "Total number of errors when creating events.", }, []string{"action"}) )
View Source
var (
NoMatchError = fmt.Errorf("no matches found")
)
Functions ¶
This section is empty.
Types ¶
type Administration ¶
type Administration interface {
Do(ctx context.Context, event AdministrationEvent) error
}
type AdministrationEvent ¶
type AdministrationEvent struct { InReplyToID string Acct string Type string Command string Visibility string }
func (AdministrationEvent) Name ¶
func (AdministrationEvent) Name() string
type Doublet ¶
type Doublet interface {
Get() []string
}
func NewDoublet ¶
func NewDoublet(repository repository.DoubletRepository) Doublet
type IncrementEvent ¶
func (IncrementEvent) Name ¶
func (IncrementEvent) Name() string
type Message ¶
type Message struct { ID string `json:"id"` Account Account `json:"account"` CreatedAt time.Time `json:"created_at"` Content string `json:"content"` Emojis []Emoji `json:"emojis"` InReplyToID string `json:"in_reply_to_id"` IsReblog bool `json:"is_reblog"` Tags []Tag `json:"tags"` Visibility string `json:"visibility"` // contains filtered or unexported fields }
type MockAction ¶
type MockAction struct {
// contains filtered or unexported fields
}
MockAction is a mock of Action interface.
func NewMockAction ¶
func NewMockAction(ctrl *gomock.Controller) *MockAction
NewMockAction creates a new mock instance.
func (*MockAction) EXPECT ¶
func (m *MockAction) EXPECT() *MockActionMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockAction) Target ¶
func (m *MockAction) Target(message Message) bool
Target mocks base method.
type MockActionMockRecorder ¶
type MockActionMockRecorder struct {
// contains filtered or unexported fields
}
MockActionMockRecorder is the mock recorder for MockAction.
func (*MockActionMockRecorder) Event ¶
func (mr *MockActionMockRecorder) Event(ctx, message any) *gomock.Call
Event indicates an expected call of Event.
func (*MockActionMockRecorder) Name ¶
func (mr *MockActionMockRecorder) Name() *gomock.Call
Name indicates an expected call of Name.
type Processor ¶
func NewProcessor ¶
func NewProcessor( queue QueueReader, reply Reply, increment Increment, update Update, administration Administration, actions []Action, clock func() time.Time, ) Processor
type QueueReader ¶
type Reply ¶
type Reply interface { Send(ctx context.Context, event ReplyEvent) error SendError(ctx context.Context, event ReplyErrorEvent) error }
type ReplyErrorEvent ¶
func (ReplyErrorEvent) Name ¶
func (ReplyErrorEvent) Name() string
type ReplyEvent ¶
type ReplyEvent struct { InReplyToID string Acct string Body io.ReadCloser Visibility string }
func (ReplyEvent) Name ¶
func (ReplyEvent) Name() string
type Through ¶
type Through interface {
Get() []string
}
func NewThrough ¶
func NewThrough(repository repository.ThroughRepository) Through
type Tick ¶
type UpdateEvent ¶
func (UpdateEvent) Name ¶
func (UpdateEvent) Name() string
Click to show internal directories.
Click to hide internal directories.