repositories

package
v0.0.0-...-de3d348 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterUserToKeycloak

func RegisterUserToKeycloak(userData models.UserDataForKeycloak) (string, error)

KeyCloakの管理APIへのPOSTリクエストを行い、新しくユーザー登録をする関数

Types

type FollowRepository

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

func NewFollowRepository

func NewFollowRepository(pool *pgxpool.Pool) *FollowRepository

func (*FollowRepository) AddFollow

func (r *FollowRepository) AddFollow(followerData models.UserFollower, followingData models.UserFollowing) error

func (*FollowRepository) DeleteFollow

func (r *FollowRepository) DeleteFollow(followerID string, followingID string, partitionSeed string) error

func (*FollowRepository) FollowExists

func (r *FollowRepository) FollowExists(followingID string, userID string, partitionSeed string) (bool, error)

func (*FollowRepository) GetUserFollowers

func (r *FollowRepository) GetUserFollowers(userID string, lastFollowingAt time.Time, limit int, partitionSeed string) ([]models.UserFollower, error)

func (*FollowRepository) GetUserFollowings

func (r *FollowRepository) GetUserFollowings(userID string, lastFollowingAt time.Time, limit int, partitionSeed string) ([]models.UserFollowing, error)

type UserRepository

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

func NewUserRepository

func NewUserRepository(pool *pgxpool.Pool) *UserRepository

func (*UserRepository) AddUserData

func (r *UserRepository) AddUserData(basic models.UserBasicsPg, detail models.UserDetailsPg) error

POST

func (*UserRepository) CheckExistsEmail

func (r *UserRepository) CheckExistsEmail(email string) (bool, error)

Keycloakの管理APIへGETリクエストを行い、入力されたemailが存在するかをチェック

func (*UserRepository) CheckExistsUsername

func (r *UserRepository) CheckExistsUsername(username string) (bool, error)

Keycloakの管理APIへGETリクエストを行い、入力されたusernameが存在するかをチェック

func (*UserRepository) GetUserBasic

func (r *UserRepository) GetUserBasic(userID string) (models.UserBasics, error)

GET

func (*UserRepository) GetUserBasicWithUsername

func (r *UserRepository) GetUserBasicWithUsername(username string) (models.UserBasics, error)

func (*UserRepository) GetUserDetail

func (r *UserRepository) GetUserDetail(userID string) (models.UserDetails, error)

func (*UserRepository) GetUserDetailWithUsername

func (r *UserRepository) GetUserDetailWithUsername(username string) (models.UserDetails, error)

func (*UserRepository) GetUserLaptimes

func (r *UserRepository) GetUserLaptimes(userID string) ([]models.Laptime, error)

func (*UserRepository) GetUserVehicles

func (r *UserRepository) GetUserVehicles(userID string) ([]responses.VehicleCards, error)

func (*UserRepository) PatchUserData

func (r *UserRepository) PatchUserData(userID string, updateReq requests.UserUpdateRequest, partitionSeed string) error

PATCH

func (*UserRepository) PatchUserProfile

func (r *UserRepository) PatchUserProfile(userID string, userImagesURL string, req requests.UserUpdateProfileRequest, partitionSeed string) error

Jump to

Keyboard shortcuts

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