diff --git a/internal/app/model/user.go b/internal/app/model/user.go index b8079a6..6ba0ebc 100644 --- a/internal/app/model/user.go +++ b/internal/app/model/user.go @@ -2,15 +2,32 @@ package model // Main user struct type MyUser struct { - Followers []User - Folliwng []User - Allowed []User - Denied []User - Login string `json:"login"` - token string + Followers []User + Following []User + Allowed []User + Denied []User + Login string `json:"login"` + TargetUser string + token string } // a single user struct type User struct { Login string `json:"login"` } + +func (u *MyUser) FetchFollowing() { + //TODO: Implement this function +} + +func (u *MyUser) FetchFollowers(count *int) { + //TODO: Implement this function +} + +func (u *MyUser) Unfollow() { + //TODO: Implement this function +} + +func (u *MyUser) Follow() { + //TODO: Implement this function +} diff --git a/internal/app/usecase/user_actions.go b/internal/app/usecase/user_actions.go index 20c255e..cd55a43 100644 --- a/internal/app/usecase/user_actions.go +++ b/internal/app/usecase/user_actions.go @@ -1,9 +1,17 @@ package usecase -func (u *MyUser) FetchFollowing() { - //TODO: Implement this function +type IUseractions interface { + FetchFollowing() + FetchFollowers(count *int) + Unfollow() + Follow() } -func (u *MyUser) FetchFollowers() { - //TODO: Implement this function +func GetFollows(u IUseractions, count *int) { + u.FetchFollowers(count) + u.FetchFollowing() +} + +func Follow(u IUseractions, username string) { + u.Follow() }