63 lines
1.5 KiB
Go
63 lines
1.5 KiB
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"time"
|
|
)
|
|
|
|
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"`
|
|
}
|
|
|
|
type InMemoryStreams struct {
|
|
}
|
|
|
|
// view activities from other people directed to out user
|
|
func (s *InMemoryStreams) GetActivitiesToUser() (*Stream, error) {
|
|
return nil, fmt.Errorf("not implemented")
|
|
}
|
|
|
|
// view activities created by our user
|
|
func (s *InMemoryStreams) GetActivitiesFromUser() (*Stream, error) {
|
|
return nil, fmt.Errorf("not implemented")
|
|
}
|
|
|
|
// insert activities from other people directed to our user
|
|
func (s *InMemoryStreams) AddActivityToUser() error {
|
|
return fmt.Errorf("not implemented")
|
|
}
|
|
|
|
// 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")
|
|
}
|