followings

package
v0.0.0-...-dfd90ba Latest Latest
Warning

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

Go to latest
Published: May 24, 2023 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Followee

type Followee struct {
	Id           int    `json:"id"`
	Username     string `json:"username"`
	Name         string `json:"name"`
	ProfileImage string `json:"profile_image"`
	WebsiteUrl   string `json:"website_url"`
}

type Follower

type Follower struct {
	Id           int    `json:"id"`
	Username     string `json:"username"`
	Name         string `json:"name"`
	ProfileImage string `json:"profile_image"`
	WebsiteUrl   string `json:"website_url"`
}

type Repository

type Repository interface {
	Create(followerId, followeeId int) error
	Delete(followerId, followeeId int) error

	GetFollowees(userId int) ([]Followee, error)
	GetFollowers(userId int) ([]Follower, error)

	FollowingExists(followerId, followeeId int) (bool, error)
	UserExists(userId int) (bool, error)
}

type Service

type Service interface {
	Follow(followerId, followeeId int) error
	Unfollow(followerId, followeeId int) error

	GetFollowees(userId int) ([]Followee, error)
	GetFollowers(userId int) ([]Follower, error)
}

Directories

Path Synopsis
delivery
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.
repository

Jump to

Keyboard shortcuts

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