lc0355

package
v0.0.0-...-38cfe7b Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2024 License: MIT Imports: 2 Imported by: 0

README

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Tweet

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

type TweetFactory

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

func NewTweetFactory

func NewTweetFactory() *TweetFactory

func (*TweetFactory) NewTweet

func (f *TweetFactory) NewTweet(id int, next *Tweet) *Tweet

type TweetsHeap

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

func NewTweetsHeap

func NewTweetsHeap() *TweetsHeap

func (*TweetsHeap) IsEmpty

func (t *TweetsHeap) IsEmpty() bool

func (*TweetsHeap) Pop

func (t *TweetsHeap) Pop() *Tweet

func (*TweetsHeap) Push

func (t *TweetsHeap) Push(x *Tweet)

type TweetsHeapContainer

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

func (*TweetsHeapContainer) Len

func (t *TweetsHeapContainer) Len() int

func (*TweetsHeapContainer) Less

func (t *TweetsHeapContainer) Less(i, j int) bool

func (*TweetsHeapContainer) Pop

func (t *TweetsHeapContainer) Pop() interface{}

func (*TweetsHeapContainer) Push

func (t *TweetsHeapContainer) Push(x interface{})

func (*TweetsHeapContainer) Swap

func (t *TweetsHeapContainer) Swap(i, j int)

type Twitter

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

func Constructor

func Constructor() Twitter

func (*Twitter) Follow

func (t *Twitter) Follow(followerId int, followeeId int)

func (*Twitter) GetNewsFeed

func (t *Twitter) GetNewsFeed(userId int) []int

func (*Twitter) PostTweet

func (t *Twitter) PostTweet(userId int, tweetId int)

func (*Twitter) Unfollow

func (t *Twitter) Unfollow(followerId int, followeeId int)

type User

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

func (*User) AddTweet

func (u *User) AddTweet(tweetId int)

func (*User) Follow

func (u *User) Follow(followee *User)

func (*User) GetNewsFeed

func (u *User) GetNewsFeed() []int

func (*User) String

func (u *User) String() string

func (*User) Unfollow

func (u *User) Unfollow(id int)

type UserFactory

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

func NewUserFactory

func NewUserFactory() *UserFactory

func (*UserFactory) NewUser

func (f *UserFactory) NewUser(id int) *User

Jump to

Keyboard shortcuts

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