social_graph_manager

package
v1.0.11 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewInMemorySocialGraphStore

func NewInMemorySocialGraphStore() om.SocialGraphManager

func NewSocialGraphManager

func NewSocialGraphManager(store om.SocialGraphManager) (om.SocialGraphManager, error)

Types

type DbSocialGraphStore

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

func NewDbSocialGraphStore

func NewDbSocialGraphStore(host string, port int, username string, password string) (store *DbSocialGraphStore, err error)

func (*DbSocialGraphStore) Follow

func (s *DbSocialGraphStore) Follow(followed string, follower string) (err error)

func (*DbSocialGraphStore) GetFollowers

func (s *DbSocialGraphStore) GetFollowers(username string) (followers map[string]bool, err error)

func (*DbSocialGraphStore) GetFollowing

func (s *DbSocialGraphStore) GetFollowing(username string) (following map[string]bool, err error)

func (*DbSocialGraphStore) Unfollow

func (s *DbSocialGraphStore) Unfollow(followed string, follower string) (err error)

type Followers

type Followers map[string]bool

type Following

type Following map[string]bool

type InMemorySocialGraphStore

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

func (*InMemorySocialGraphStore) Follow

func (m *InMemorySocialGraphStore) Follow(followed string, follower string) (err error)

func (*InMemorySocialGraphStore) GetFollowers

func (m *InMemorySocialGraphStore) GetFollowers(username string) (map[string]bool, error)

func (*InMemorySocialGraphStore) GetFollowing

func (m *InMemorySocialGraphStore) GetFollowing(username string) (map[string]bool, error)

func (*InMemorySocialGraphStore) Unfollow

func (m *InMemorySocialGraphStore) Unfollow(followed string, follower string) (err error)

type SocialGraph

type SocialGraph map[string]*SocialUser

type SocialGraphManager

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

func (*SocialGraphManager) Follow

func (m *SocialGraphManager) Follow(followed string, follower string) (err error)

func (*SocialGraphManager) GetFollowers

func (m *SocialGraphManager) GetFollowers(username string) (result map[string]bool, err error)

func (*SocialGraphManager) GetFollowing

func (m *SocialGraphManager) GetFollowing(username string) (map[string]bool, error)

func (*SocialGraphManager) Unfollow

func (m *SocialGraphManager) Unfollow(followed string, follower string) (err error)

type SocialUser

type SocialUser struct {
	Username  string
	Followers Followers
	Following Following
}

func NewSocialUser

func NewSocialUser(username string) (user *SocialUser, err error)

Jump to

Keyboard shortcuts

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