service

package
v0.0.0-...-f611fdf Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 1, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package service is a generated GoMock package.

Package service is a generated GoMock package.

Package service is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	ID          string `json:"id"`
	Acct        string `json:"acct"`
	DisplayName string `json:"display_name"`
	Username    string `json:"user_name"`
}

type Connection

type Connection struct {
	Server string
}

type Disconnection

type Disconnection struct {
	Err error
}

type Emoji

type Emoji struct {
	Shortcode string `json:"shortcode"`
}

type Error

type Error struct {
	Err error
}

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"`
}

func (Message) HashCode

func (m Message) HashCode() int64

func (Message) Name

func (m Message) Name() string

func (Message) Timestamp

func (m Message) Timestamp() time.Time

type MockQueueWriter

type MockQueueWriter struct {
	// contains filtered or unexported fields
}

MockQueueWriter is a mock of QueueWriter interface.

func NewMockQueueWriter

func NewMockQueueWriter(ctrl *gomock.Controller) *MockQueueWriter

NewMockQueueWriter creates a new mock instance.

func (*MockQueueWriter) Close

func (m *MockQueueWriter) Close() error

Close mocks base method.

func (*MockQueueWriter) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockQueueWriter) Publish

func (m *MockQueueWriter) Publish(ctx context.Context, packet Packet) error

Publish mocks base method.

type MockQueueWriterMockRecorder

type MockQueueWriterMockRecorder struct {
	// contains filtered or unexported fields
}

MockQueueWriterMockRecorder is the mock recorder for MockQueueWriter.

func (*MockQueueWriterMockRecorder) Close

Close indicates an expected call of Close.

func (*MockQueueWriterMockRecorder) Publish

func (mr *MockQueueWriterMockRecorder) Publish(ctx, packet any) *gomock.Call

Publish indicates an expected call of Publish.

type MockScheduler

type MockScheduler struct {
	// contains filtered or unexported fields
}

MockScheduler is a mock of Scheduler interface.

func NewMockScheduler

func NewMockScheduler(ctrl *gomock.Controller) *MockScheduler

NewMockScheduler creates a new mock instance.

func (*MockScheduler) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockScheduler) Start

func (m *MockScheduler) Start() <-chan Tick

Start mocks base method.

func (*MockScheduler) Stop

func (m *MockScheduler) Stop()

Stop mocks base method.

type MockSchedulerMockRecorder

type MockSchedulerMockRecorder struct {
	// contains filtered or unexported fields
}

MockSchedulerMockRecorder is the mock recorder for MockScheduler.

func (*MockSchedulerMockRecorder) Start

func (mr *MockSchedulerMockRecorder) Start() *gomock.Call

Start indicates an expected call of Start.

func (*MockSchedulerMockRecorder) Stop

Stop indicates an expected call of Stop.

type MockStreaming

type MockStreaming struct {
	// contains filtered or unexported fields
}

MockStreaming is a mock of Streaming interface.

func NewMockStreaming

func NewMockStreaming(ctrl *gomock.Controller) *MockStreaming

NewMockStreaming creates a new mock instance.

func (*MockStreaming) Close

func (m *MockStreaming) Close(exit bool) error

Close mocks base method.

func (*MockStreaming) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockStreaming) Run

func (m *MockStreaming) Run(ctx context.Context) error

Run mocks base method.

func (*MockStreaming) Statuses

func (m *MockStreaming) Statuses() <-chan Status

Statuses mocks base method.

type MockStreamingMockRecorder

type MockStreamingMockRecorder struct {
	// contains filtered or unexported fields
}

MockStreamingMockRecorder is the mock recorder for MockStreaming.

func (*MockStreamingMockRecorder) Close

func (mr *MockStreamingMockRecorder) Close(exit any) *gomock.Call

Close indicates an expected call of Close.

func (*MockStreamingMockRecorder) Run

func (mr *MockStreamingMockRecorder) Run(ctx any) *gomock.Call

Run indicates an expected call of Run.

func (*MockStreamingMockRecorder) Statuses

func (mr *MockStreamingMockRecorder) Statuses() *gomock.Call

Statuses indicates an expected call of Statuses.

type Packet

type Packet interface {
	Name() string
	Timestamp() time.Time
	HashCode() int64
}

type Processor

type Processor interface {
	Execute(ctx context.Context, scheduler <-chan Tick, stream <-chan Status)
}

func NewProcessor

func NewProcessor(writer QueueWriter) Processor

type QueueWriter

type QueueWriter interface {
	Publish(ctx context.Context, packet Packet) error
	Close() error
}

type Reconnection

type Reconnection struct {
	In time.Duration
}

type Scheduler

type Scheduler interface {
	Start() <-chan Tick
	Stop()
}

type Status

type Status interface {
	// contains filtered or unexported methods
}

type Streaming

type Streaming interface {
	Run(ctx context.Context) error
	Statuses() <-chan Status
	Close(exit bool) error
}

type Tag

type Tag struct {
	Name string `json:"name"`
}

type Tick

type Tick struct {
	Year  int `json:"year"`
	Month int `json:"month"`
	Day   int `json:"day"`
}

func (Tick) HashCode

func (t Tick) HashCode() int64

func (Tick) Name

func (t Tick) Name() string

func (Tick) Timestamp

func (t Tick) Timestamp() time.Time

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL