Documentation ¶
Index ¶
- Constants
- type Author
- type Garoo
- type Handler
- type Media
- type MediaType
- type Message
- type MockProvider
- func (p *MockProvider) Check(u string) bool
- func (p *MockProvider) GetConfig() string
- func (p *MockProvider) GetPost(ctx context.Context, url string) (*Post, error)
- func (p *MockProvider) Init(conf string) error
- func (p *MockProvider) Login(code string) (string, error)
- func (p *MockProvider) Name() string
- type MockReceiver
- func (r *MockReceiver) AddHandler(h Handler)
- func (r *MockReceiver) LoadConfig(config any) error
- func (r *MockReceiver) Name() string
- func (r *MockReceiver) PostMessage(req PostMessageRequest) error
- func (r *MockReceiver) SaveConfig(config any) error
- func (r *MockReceiver) Start() error
- func (r *MockReceiver) Stop() error
- type MockStore
- type Options
- type Post
- type PostMessageRequest
- type Provider
- type Receiver
- type Seed
- type Store
Constants ¶
View Source
const TextCategory = "_"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Garoo ¶
type Garoo struct {
// contains filtered or unexported fields
}
func (*Garoo) SaveConfig ¶
type MockProvider ¶
type MockProvider struct { NameFunc func() string InitFunc func(string) error LoginFunc func(string) (string, error) CheckFunc func(string) bool GetPostFunc func(context.Context, string) (*Post, error) GetConfigFunc func() string }
func (*MockProvider) Check ¶
func (p *MockProvider) Check(u string) bool
func (*MockProvider) GetConfig ¶
func (p *MockProvider) GetConfig() string
func (*MockProvider) Init ¶
func (p *MockProvider) Init(conf string) error
func (*MockProvider) Name ¶
func (p *MockProvider) Name() string
type MockReceiver ¶
type MockReceiver struct { NameFunc func() string AddHandlerFunc func(Handler) PostMessageFunc func(PostMessageRequest) error StartFunc func() error StopFunc func() error SaveConfigFunc func(any) error LoadConfigFunc func(any) error }
func (*MockReceiver) AddHandler ¶
func (r *MockReceiver) AddHandler(h Handler)
func (*MockReceiver) LoadConfig ¶
func (r *MockReceiver) LoadConfig(config any) error
func (*MockReceiver) Name ¶
func (r *MockReceiver) Name() string
func (*MockReceiver) PostMessage ¶
func (r *MockReceiver) PostMessage(req PostMessageRequest) error
func (*MockReceiver) SaveConfig ¶
func (r *MockReceiver) SaveConfig(config any) error
func (*MockReceiver) Start ¶
func (r *MockReceiver) Start() error
func (*MockReceiver) Stop ¶
func (r *MockReceiver) Stop() error
type MockStore ¶
type Post ¶
type Post struct { ID string `json:"id"` Provider string `json:"provider"` URL string `json:"url"` Timestamp time.Time `json:"timestamp"` Content string `json:"content"` Author Author `json:"author"` Media []Media `json:"media,omitempty"` Category string `json:"category,omitempty"` Tags []string `json:"tags,omitempty"` }
func (*Post) IsSpecialCategory ¶
type PostMessageRequest ¶
Click to show internal directories.
Click to hide internal directories.