Documentation
¶
Index ¶
- Constants
- type Edge
- type Follow
- func (f *Follow) Add(from, to int64)
- func (f *Follow) CountAll() int
- func (f *Follow) Exists(from, to int64) bool
- func (f *Follow) Fof(from int64, skip, limit int) map[int64]Node
- func (f *Follow) FofIds(from int64, skip, limit int) []int64
- func (f *Follow) GetLeaders(from int64) []int64
- func (f *Follow) List(from int64) ([]int64, error)
- func (f *Follow) Remove(from, to int64)
- func (f *Follow) SuggestByUser(user int64, limit int) []int64
- type Graph
- func (g *Graph) AddFollow(from, to int64) *Graph
- func (g *Graph) Close() error
- func (g *Graph) GetFollows(from int64) ([]int64, error)
- func (g *Graph) GetFriendsOfFriends(from int64) ([]int64, error)
- func (g *Graph) GetMetrics() Metrics
- func (g *Graph) Load(name string) error
- func (g *Graph) RemoveFollow(from, to int64) *Graph
- func (g *Graph) SetQueryOptions(opts QueryOptions) *Graph
- func (g *Graph) SuggestByUser(user int64) *Graph
- type Metrics
- type Node
- type QueryOptions
Constants ¶
View Source
const AppVersion = "0.0.5"
View Source
const DefaultQueryLimit = 10
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Follow ¶
func (*Follow) GetLeaders ¶
GetLeaders returns the list of users who followed by the current from user
type Graph ¶
type Graph struct {
// contains filtered or unexported fields
}
Graph
func (*Graph) GetFriendsOfFriends ¶
func (*Graph) GetMetrics ¶
func (*Graph) RemoveFollow ¶
func (*Graph) SetQueryOptions ¶
func (g *Graph) SetQueryOptions(opts QueryOptions) *Graph
func (*Graph) SuggestByUser ¶
type Metrics ¶
type Metrics struct {
FollowCount int `json:"follow_count"`
WriteCount int64 `json:"write_count"`
ReadCount int64 `json:"read_count"`
}
func (*Metrics) IncReadCount ¶
func (*Metrics) IncWriteCount ¶
type QueryOptions ¶
func QueryOptionsDefault ¶
func QueryOptionsDefault() QueryOptions
Click to show internal directories.
Click to hide internal directories.