repositories

package
v0.0.0-...-e8ce2a7 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CharacterRepository

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

func NewCharacterRepository

func NewCharacterRepository(db *gorm.DB) CharacterRepository

func (*CharacterRepository) CreateCharacter

func (r *CharacterRepository) CreateCharacter(character *models.Character) error

func (*CharacterRepository) GetCharacterByID

func (r *CharacterRepository) GetCharacterByID(id uint) (*models.Character, error)

func (*CharacterRepository) GetCharactersByUser

func (r *CharacterRepository) GetCharactersByUser(user models.User) ([]models.Character, error)

type PlayerRepository

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

func NewPlayerRepository

func NewPlayerRepository(userRepository UserRepository) PlayerRepository

func (*PlayerRepository) FindByPlayerID

func (r *PlayerRepository) FindByPlayerID(playerID uint) (entities.Player, error)

type UserRepository

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

func NewUserRepository

func NewUserRepository(db *gorm.DB) UserRepository

func (*UserRepository) CreateOrSyncUser

func (r *UserRepository) CreateOrSyncUser(userInfo v2.Userinfo) (models.User, error)

func (*UserRepository) FindByUserID

func (r *UserRepository) FindByUserID(userID uint) (models.User, error)

func (*UserRepository) FindByUserInfo

func (r *UserRepository) FindByUserInfo(userInfo v2.Userinfo) (models.User, error)

func (*UserRepository) UpdateUser

func (r *UserRepository) UpdateUser(user *models.User) error

type UserTokenRepository

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

func NewUserTokenRepository

func NewUserTokenRepository(db *gorm.DB) UserTokenRepository

func (*UserTokenRepository) FindByAccessToken

func (r *UserTokenRepository) FindByAccessToken(accessToken string) (oauth2.Token, error)

func (*UserTokenRepository) StoreToken

func (r *UserTokenRepository) StoreToken(token oauth2.Token)

Jump to

Keyboard shortcuts

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