mocks

package
v0.0.0-...-6690001 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2019 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Access

type Access struct {
	mock.Mock
}

Access is an autogenerated mock type for the Access type

func (*Access) Game

func (_m *Access) Game(accessType databaseAccess.AccessType, leagueId int, gameId int, userId int) (bool, error)

Game provides a mock function with given fields: accessType, leagueId, gameId, userId

func (*Access) League

func (_m *Access) League(accessType databaseAccess.AccessType, leagueId int, userId int) (bool, error)

League provides a mock function with given fields: accessType, leagueId, userId

func (*Access) Player

func (_m *Access) Player(accessType databaseAccess.AccessType, leagueId int, teamId int, playerId int, userId int) (bool, error)

Player provides a mock function with given fields: accessType, leagueId, teamId, playerId, userId

func (*Access) Report

func (_m *Access) Report(leagueId int, gameId int, userId int) (bool, error)

Report provides a mock function with given fields: leagueId, gameId, userId

func (*Access) Team

func (_m *Access) Team(accessType databaseAccess.AccessType, leagueId int, teamId int, userId int) (bool, error)

Team provides a mock function with given fields: accessType, leagueId, teamId, userId

type Config

type Config struct {
	mock.Mock
}

Config is an autogenerated mock type for the Config type

func (*Config) GetDbConnString

func (_m *Config) GetDbConnString() string

GetDbConnString provides a mock function with given fields:

func (*Config) GetIconsDir

func (_m *Config) GetIconsDir() string

GetIconsDir provides a mock function with given fields:

func (*Config) GetKeys

func (_m *Config) GetKeys() ([]byte, []byte)

GetKeys provides a mock function with given fields:

func (*Config) GetLeagueOfLegendsApiKey

func (_m *Config) GetLeagueOfLegendsApiKey() string

GetLeagueOfLegendsApiKey provides a mock function with given fields:

func (*Config) GetMarkdownDir

func (_m *Config) GetMarkdownDir() string

GetMarkdownDir provides a mock function with given fields:

func (*Config) GetPortString

func (_m *Config) GetPortString() string

GetPortString provides a mock function with given fields:

type GamesDAO

type GamesDAO struct {
	mock.Mock
}

GamesDAO is an autogenerated mock type for the GamesDAO type

func (*GamesDAO) AddExternalId

func (_m *GamesDAO) AddExternalId(gameId int, externalId string) error

AddExternalId provides a mock function with given fields: gameId, externalId

func (*GamesDAO) CreateGame

func (_m *GamesDAO) CreateGame(leagueId int, gameInformation databaseAccess.GameCreationInformation) (int, error)

CreateGame provides a mock function with given fields: leagueId, gameInformation

func (*GamesDAO) DeleteGame

func (_m *GamesDAO) DeleteGame(gameId int) error

DeleteGame provides a mock function with given fields: gameId

func (*GamesDAO) DoesExistConflict

func (_m *GamesDAO) DoesExistConflict(team1Id int, team2Id int, gameTime int) (bool, error)

DoesExistConflict provides a mock function with given fields: team1Id, team2Id, gameTime

func (*GamesDAO) GetAllGamesInLeague

func (_m *GamesDAO) GetAllGamesInLeague(leagueId int) ([]*databaseAccess.Game, error)

GetAllGamesInLeague provides a mock function with given fields: leagueId

func (*GamesDAO) GetGameInformation

func (_m *GamesDAO) GetGameInformation(gameId int) (*databaseAccess.Game, error)

GetGameInformation provides a mock function with given fields: gameId

func (*GamesDAO) GetGameInformationFromExternalId

func (_m *GamesDAO) GetGameInformationFromExternalId(externalId string) (*databaseAccess.Game, error)

GetGameInformationFromExternalId provides a mock function with given fields: externalId

func (*GamesDAO) HasReportResultPermissions

func (_m *GamesDAO) HasReportResultPermissions(leagueId int, gameId int, userId int) (bool, error)

HasReportResultPermissions provides a mock function with given fields: leagueId, gameId, userId

func (*GamesDAO) ReportGame

func (_m *GamesDAO) ReportGame(gameId int, gameResult databaseAccess.GameResult) error

ReportGame provides a mock function with given fields: gameId, gameResult

func (*GamesDAO) RescheduleGame

func (_m *GamesDAO) RescheduleGame(gameId int, gameTime int) error

RescheduleGame provides a mock function with given fields: gameId, gameTime

type IScheduler

type IScheduler struct {
	mock.Mock
}

IScheduler is an autogenerated mock type for the IScheduler type

func (*IScheduler) AddWeeklyAvailability

func (_m *IScheduler) AddWeeklyAvailability(dayOfWeek time.Weekday, hour int, minute int, duration time.Duration)

AddWeeklyAvailability provides a mock function with given fields: dayOfWeek, hour, minute, duration

func (*IScheduler) GetSchedule

func (_m *IScheduler) GetSchedule() []scheduler.Game

GetSchedule provides a mock function with given fields:

func (*IScheduler) InitScheduler

func (_m *IScheduler) InitScheduler(tournamentType int, roundsPerWeek int, concurrentGameNum int, gameDuration time.Duration, start time.Time, end time.Time, teams []int)

InitScheduler provides a mock function with given fields: tournamentType, roundsPerWeek, concurrentGameNum, gameDuration, start, end, teams

type IconManager

type IconManager struct {
	mock.Mock
}

IconManager is an autogenerated mock type for the IconManager type

func (*IconManager) StoreNewIcon

func (_m *IconManager) StoreNewIcon(ctx *gin.Context) (string, string, error)

StoreNewIcon provides a mock function with given fields: ctx

type LeagueOfLegendsDAO

type LeagueOfLegendsDAO struct {
	mock.Mock
}

LeagueOfLegendsDAO is an autogenerated mock type for the LeagueOfLegendsDAO type

func (*LeagueOfLegendsDAO) GetChampionStats

func (_m *LeagueOfLegendsDAO) GetChampionStats(leagueId int) ([]*databaseAccess.ChampionStats, error)

GetChampionStats provides a mock function with given fields: leagueId

func (*LeagueOfLegendsDAO) GetPlayerStats

func (_m *LeagueOfLegendsDAO) GetPlayerStats(leagueId int) ([]*databaseAccess.PlayerStats, error)

GetPlayerStats provides a mock function with given fields: leagueId

func (*LeagueOfLegendsDAO) GetTeamStats

func (_m *LeagueOfLegendsDAO) GetTeamStats(leagueId int) ([]*databaseAccess.TeamStats, error)

GetTeamStats provides a mock function with given fields: leagueId

func (*LeagueOfLegendsDAO) ReportEndGameStats

func (_m *LeagueOfLegendsDAO) ReportEndGameStats(leagueId int, gameId int, winTeamId int, loseTeamId int, match *lolApi.MatchInformation) error

ReportEndGameStats provides a mock function with given fields: leagueId, gameId, winTeamId, loseTeamId, match

type LeaguesDAO

type LeaguesDAO struct {
	mock.Mock
}

LeaguesDAO is an autogenerated mock type for the LeaguesDAO type

func (*LeaguesDAO) AddAvailability

func (_m *LeaguesDAO) AddAvailability(leagueId int, availability databaseAccess.AvailabilityCore) (int, error)

AddAvailability provides a mock function with given fields: leagueId, availability

func (*LeaguesDAO) AddWeeklyAvailability

func (_m *LeaguesDAO) AddWeeklyAvailability(leagueId int, availability databaseAccess.WeeklyAvailabilityCore) (int, error)

AddWeeklyAvailability provides a mock function with given fields: leagueId, availability

func (*LeaguesDAO) CanJoinLeague

func (_m *LeaguesDAO) CanJoinLeague(leagueId int, userId int) (bool, error)

CanJoinLeague provides a mock function with given fields: leagueId, userId

func (*LeaguesDAO) CreateLeague

func (_m *LeaguesDAO) CreateLeague(userId int, leagueInfo databaseAccess.LeagueCore) (int, error)

CreateLeague provides a mock function with given fields: userId, leagueInfo

func (*LeaguesDAO) DeleteAvailability

func (_m *LeaguesDAO) DeleteAvailability(leagueId int, availabilityId int) error

DeleteAvailability provides a mock function with given fields: leagueId, availabilityId

func (*LeaguesDAO) DeleteWeeklyAvailability

func (_m *LeaguesDAO) DeleteWeeklyAvailability(leagueId int, availabilityId int) error

DeleteWeeklyAvailability provides a mock function with given fields: leagueId, availabilityId

func (*LeaguesDAO) EditWeeklyAvailability

func (_m *LeaguesDAO) EditWeeklyAvailability(leagueId int, availabilityId int, availability databaseAccess.WeeklyAvailabilityCore) (int, error)

EditWeeklyAvailability provides a mock function with given fields: leagueId, availabilityId, availability

func (*LeaguesDAO) GetAvailabilities

func (_m *LeaguesDAO) GetAvailabilities(leagueId int) ([]*databaseAccess.Availability, error)

GetAvailabilities provides a mock function with given fields: leagueId

func (*LeaguesDAO) GetLeagueInformation

func (_m *LeaguesDAO) GetLeagueInformation(leagueId int) (*databaseAccess.League, error)

GetLeagueInformation provides a mock function with given fields: leagueId

func (*LeaguesDAO) GetMarkdownFile

func (_m *LeaguesDAO) GetMarkdownFile(leagueId int) (string, error)

GetMarkdownFile provides a mock function with given fields: leagueId

func (*LeaguesDAO) GetPublicLeagueList

func (_m *LeaguesDAO) GetPublicLeagueList() ([]*databaseAccess.League, error)

GetPublicLeagueList provides a mock function with given fields:

func (*LeaguesDAO) GetTeamManagerInformation

func (_m *LeaguesDAO) GetTeamManagerInformation(leagueId int) ([]*databaseAccess.TeamWithManagers, error)

GetTeamManagerInformation provides a mock function with given fields: leagueId

func (*LeaguesDAO) GetWeeklyAvailabilities

func (_m *LeaguesDAO) GetWeeklyAvailabilities(leagueId int) ([]*databaseAccess.WeeklyAvailability, error)

GetWeeklyAvailabilities provides a mock function with given fields: leagueId

func (*LeaguesDAO) IsLeagueViewable

func (_m *LeaguesDAO) IsLeagueViewable(leagueId int, userId int) (bool, error)

IsLeagueViewable provides a mock function with given fields: leagueId, userId

func (*LeaguesDAO) IsNameInUse

func (_m *LeaguesDAO) IsNameInUse(leagueId int, name string) (bool, error)

IsNameInUse provides a mock function with given fields: leagueId, name

func (*LeaguesDAO) JoinLeague

func (_m *LeaguesDAO) JoinLeague(leagueId int, userId int) error

JoinLeague provides a mock function with given fields: leagueId, userId

func (*LeaguesDAO) SetLeaguePermissions

func (_m *LeaguesDAO) SetLeaguePermissions(leagueId int, userId int, permissions databaseAccess.LeaguePermissionsCore) error

SetLeaguePermissions provides a mock function with given fields: leagueId, userId, permissions

func (*LeaguesDAO) SetMarkdownFile

func (_m *LeaguesDAO) SetMarkdownFile(leagueId int, fileName string) error

SetMarkdownFile provides a mock function with given fields: leagueId, fileName

func (*LeaguesDAO) UpdateLeague

func (_m *LeaguesDAO) UpdateLeague(leagueId int, leagueInfo databaseAccess.LeagueCore) error

UpdateLeague provides a mock function with given fields: leagueId, leagueInfo

type LoLApi

type LoLApi struct {
	mock.Mock
}

LoLApi is an autogenerated mock type for the LoLApi type

func (*LoLApi) GetMatchStats

func (_m *LoLApi) GetMatchStats(id string) (*lolApi.MatchInformation, error)

GetMatchStats provides a mock function with given fields: id

func (*LoLApi) GetSummonerId

func (_m *LoLApi) GetSummonerId(name string) (string, error)

GetSummonerId provides a mock function with given fields: name

func (*LoLApi) GetSummonerInformation

func (_m *LoLApi) GetSummonerInformation(ids []string) map[string]*lolApi.SummonerInformation

GetSummonerInformation provides a mock function with given fields: ids

type MdManager

type MdManager struct {
	mock.Mock
}

MdManager is an autogenerated mock type for the MdManager type

func (*MdManager) GetMarkdown

func (_m *MdManager) GetMarkdown(fileName string) (string, error)

GetMarkdown provides a mock function with given fields: fileName

func (*MdManager) StoreMarkdown

func (_m *MdManager) StoreMarkdown(leagueId int, _a1 string, oldFile string) (string, error)

StoreMarkdown provides a mock function with given fields: leagueId, _a1, oldFile

type RowArr

type RowArr struct {
	mock.Mock
}

RowArr is an autogenerated mock type for the RowArr type

func (*RowArr) Scan

func (_m *RowArr) Scan(_a0 *sql.Rows) error

Scan provides a mock function with given fields: _a0

type SessionManager

type SessionManager struct {
	mock.Mock
}

SessionManager is an autogenerated mock type for the SessionManager type

func (*SessionManager) AuthenticateAndGetUserId

func (_m *SessionManager) AuthenticateAndGetUserId(ctx *gin.Context) (int, error)

AuthenticateAndGetUserId provides a mock function with given fields: ctx

func (*SessionManager) GetActiveLeague

func (_m *SessionManager) GetActiveLeague(ctx *gin.Context) (int, error)

GetActiveLeague provides a mock function with given fields: ctx

func (*SessionManager) LogIn

func (_m *SessionManager) LogIn(ctx *gin.Context, userId int) error

LogIn provides a mock function with given fields: ctx, userId

func (*SessionManager) LogOut

func (_m *SessionManager) LogOut(ctx *gin.Context) error

LogOut provides a mock function with given fields: ctx

func (*SessionManager) SetActiveLeague

func (_m *SessionManager) SetActiveLeague(ctx *gin.Context, leagueId int) error

SetActiveLeague provides a mock function with given fields: ctx, leagueId

type TeamsDAO

type TeamsDAO struct {
	mock.Mock
}

TeamsDAO is an autogenerated mock type for the TeamsDAO type

func (*TeamsDAO) AddNewPlayer

func (_m *TeamsDAO) AddNewPlayer(leagueId int, playerInfo databaseAccess.PlayerCore) (int, error)

CreatePlayer provides a mock function with given fields: leagueId, playerInfo

func (*TeamsDAO) ChangeManagerPermissions

func (_m *TeamsDAO) ChangeManagerPermissions(teamId int, userId int, teamPermissionInformation databaseAccess.TeamPermissionsCore) error

ChangeManagerPermissions provides a mock function with given fields: teamId, userId, teamPermissionInformation

func (*TeamsDAO) CreateTeam

func (_m *TeamsDAO) CreateTeam(leagueId int, userId int, teamInfo databaseAccess.TeamCore) (int, error)

CreateTeam provides a mock function with given fields: leagueId, userId, teamInfo

func (*TeamsDAO) CreateTeamWithIcon

func (_m *TeamsDAO) CreateTeamWithIcon(leagueId int, userId int, teamInfo databaseAccess.TeamCore, iconSmall string, iconLarge string) (int, error)

CreateTeamWithIcon provides a mock function with given fields: leagueId, userId, teamInfo, iconSmall, iconLarge

func (*TeamsDAO) DeleteTeam

func (_m *TeamsDAO) DeleteTeam(teamId int) error

DeleteTeam provides a mock function with given fields: teamId

func (*TeamsDAO) DoesPlayerExistInTeam

func (_m *TeamsDAO) DoesPlayerExistInTeam(teamId int, playerId int) (bool, error)

DoesPlayerExistInTeam provides a mock function with given fields: teamId, playerId

func (*TeamsDAO) DoesTeamExistInLeague

func (_m *TeamsDAO) DoesTeamExistInLeague(leagueId int, teamId int) (bool, error)

DoesTeamExistInLeague provides a mock function with given fields: leagueId, teamId

func (*TeamsDAO) GetTeamInformation

func (_m *TeamsDAO) GetTeamInformation(teamId int) (*databaseAccess.TeamWithPlayers, error)

GetTeamInformation provides a mock function with given fields: teamId

func (*TeamsDAO) GetTeamPermissions

func (_m *TeamsDAO) GetTeamPermissions(teamId int, userId int) (*databaseAccess.TeamPermissionsCore, error)

GetTeamPermissions provides a mock function with given fields: teamId, userId

func (*TeamsDAO) IsInfoInUse

func (_m *TeamsDAO) IsInfoInUse(leagueId int, teamId int, name string, tag string) (bool, string, error)

IsInfoInUse provides a mock function with given fields: leagueId, teamId, name, tag

func (*TeamsDAO) IsTeamActive

func (_m *TeamsDAO) IsTeamActive(leagueId int, teamId int) (bool, error)

IsTeamActive provides a mock function with given fields: leagueId, teamId

func (*TeamsDAO) RemovePlayer

func (_m *TeamsDAO) RemovePlayer(playerId int) error

DeletePlayer provides a mock function with given fields: playerId

func (*TeamsDAO) UpdatePlayer

func (_m *TeamsDAO) UpdatePlayer(playerId int, playerInfo databaseAccess.PlayerCore) error

UpdatePlayer provides a mock function with given fields: playerId, playerInfo

func (*TeamsDAO) UpdateTeam

func (_m *TeamsDAO) UpdateTeam(teamId int, teamInformation databaseAccess.TeamCore) error

UpdateTeam provides a mock function with given fields: teamId, teamInformation

func (*TeamsDAO) UpdateTeamIcon

func (_m *TeamsDAO) UpdateTeamIcon(teamId int, small string, large string) error

UpdateTeamIcon provides a mock function with given fields: teamId, small, large

type UsersDAO

type UsersDAO struct {
	mock.Mock
}

UsersDAO is an autogenerated mock type for the UsersDAO type

func (*UsersDAO) CreateUser

func (_m *UsersDAO) CreateUser(email string, salt string, hash string) error

CreateUser provides a mock function with given fields: email, salt, hash

func (*UsersDAO) GetAuthenticationInformation

func (_m *UsersDAO) GetAuthenticationInformation(email string) (*databaseAccess.UserAuthenticationDTO, error)

GetAuthenticationInformation provides a mock function with given fields: email

func (*UsersDAO) GetUserProfile

func (_m *UsersDAO) GetUserProfile(userId int) (*databaseAccess.User, error)

GetUserWithPermissions provides a mock function with given fields: userId

func (*UsersDAO) IsEmailInUse

func (_m *UsersDAO) IsEmailInUse(email string) (bool, error)

IsEmailInUse provides a mock function with given fields: email

type Validator

type Validator struct {
	mock.Mock
}

Validator is an autogenerated mock type for the Validator type

func (*Validator) DataInvalid

func (_m *Validator) DataInvalid(_a0 *gin.Context, _a1 func() (bool, string, error)) bool

DataInvalid provides a mock function with given fields: _a0, _a1

Jump to

Keyboard shortcuts

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