friend/streams.go

63 lines
1.5 KiB
Go
Raw Normal View History

2022-11-11 07:07:50 +00:00
package main
2022-11-12 05:06:12 +00:00
import (
"fmt"
"time"
)
2022-11-11 07:07:50 +00:00
type Stream struct {
Context string `json:"@context"`
ID string `json:"id"`
Type string `json:"type"`
TotalItems int `json:"totalItems"`
Items []struct{} `json:"items"`
}
type Activity struct {
Context string `json:"@context"`
Summary string `json:"summary"`
Type string `json:"type"`
Published time.Time `json:"published"`
Actor Actor `json:"actor"`
Object *Object `json:"object,omitempty"`
Target *Object `json:"target,omitempty"`
}
type Object struct {
ID string `json:"id"`
Type string `json:"type"`
URL string `json:"url"`
Name string `json:"name"`
}
2022-11-12 05:06:12 +00:00
type InMemoryStreams struct {
}
2022-11-11 07:07:50 +00:00
2022-11-12 05:06:12 +00:00
// view activities from other people directed to out user
func (s *InMemoryStreams) GetActivitiesToUser() (*Stream, error) {
return nil, fmt.Errorf("not implemented")
}
2022-11-11 07:07:50 +00:00
2022-11-12 05:06:12 +00:00
// view activities created by our user
func (s *InMemoryStreams) GetActivitiesFromUser() (*Stream, error) {
return nil, fmt.Errorf("not implemented")
}
2022-11-11 07:07:50 +00:00
2022-11-12 05:06:12 +00:00
// insert activities from other people directed to our user
func (s *InMemoryStreams) AddActivityToUser() error {
return fmt.Errorf("not implemented")
}
2022-11-11 07:07:50 +00:00
2022-11-12 05:06:12 +00:00
// insert activities from our user to be dispatched
func (s *InMemoryStreams) AddActivityFromUser() error {
return fmt.Errorf("not implemented")
}
func (s *InMemoryStreams) Followers() (*Stream, error) {
return nil, fmt.Errorf("not implemented")
}
func (s *InMemoryStreams) Followed() (*Stream, error) {
return nil, fmt.Errorf("not implemented")
}