profiles

package
v0.0.0-...-7c66198 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Profile

type Profile struct {
	Username  string
	Bio       string
	Image     string
	Following *bool
}

func NewProfile

func NewProfile(username string, bio string, image string, following *bool) Profile

type ProfilesHandlers

type ProfilesHandlers struct {
	ProfilesService ProfilesService
}

func NewProfilesHandlers

func NewProfilesHandlers(profilesService ProfilesService) ProfilesHandlers

func (*ProfilesHandlers) FollowUser

func (h *ProfilesHandlers) FollowUser(w http.ResponseWriter, r *http.Request)

func (*ProfilesHandlers) GetProfile

func (h *ProfilesHandlers) GetProfile(w http.ResponseWriter, r *http.Request)

func (*ProfilesHandlers) UnfollowUser

func (h *ProfilesHandlers) UnfollowUser(w http.ResponseWriter, r *http.Request)

type ProfilesService

type ProfilesService struct {
	UsersClient users.UsersClient
	Firestore   firestore.Client
}

func NewProfilesService

func NewProfilesService(usersClient users.UsersClient, firestore firestore.Client) ProfilesService

func (*ProfilesService) Follow

func (s *ProfilesService) Follow(ctx context.Context, followeeUsername string, followerUsername string) (*Profile, error)

func (*ProfilesService) GetProfileByUsername

func (s *ProfilesService) GetProfileByUsername(ctx context.Context, username string, follower *string) (*Profile, error)

func (*ProfilesService) IsFollowing

func (s *ProfilesService) IsFollowing(ctx context.Context, followeeUsername string, followerUsername string) (bool, error)

func (*ProfilesService) Unfollow

func (s *ProfilesService) Unfollow(ctx context.Context, followeeUsername string, followerUsername string) (*Profile, error)

Jump to

Keyboard shortcuts

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