repository

package
v0.0.0-...-8ed6344 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2020 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSessionGormRepo

func NewSessionGormRepo(db *gorm.DB) voters.SessionRepository

Types

type MockGormVoter

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

func NewMockGormvoter

func NewMockGormvoter(conn *gorm.DB) *MockGormVoter

func (*MockGormVoter) CheckEvent

func (mgv *MockGormVoter) CheckEvent(id uint) (*entities.Events, []error)

func (*MockGormVoter) CheckVoter

func (mgv *MockGormVoter) CheckVoter(voteID int) (*entities.RegVoters, []error)

func (*MockGormVoter) Deletevoter

func (mgv *MockGormVoter) Deletevoter(id uint) (*entities.Voters, []error)

func (*MockGormVoter) GIDExists

func (mgv *MockGormVoter) GIDExists(gid string) bool

func (*MockGormVoter) GetAlreadyVoted

func (mgv *MockGormVoter) GetAlreadyVoted(id int) (*entities.Votes, []error)

func (*MockGormVoter) GetCounter

func (mgv *MockGormVoter) GetCounter(prtyName string) (*entities.RegParties, []error)

func (*MockGormVoter) GetRegParites

func (mgv *MockGormVoter) GetRegParites() ([]entities.RegParties, []error)

func (*MockGormVoter) GetRegPartyByID

func (mgv *MockGormVoter) GetRegPartyByID(id int) (*entities.Parties, []error)

func (*MockGormVoter) GetRegVoters

func (mgv *MockGormVoter) GetRegVoters() ([]entities.RegVoters, []error)

func (*MockGormVoter) GetRegVotersByID

func (mgv *MockGormVoter) GetRegVotersByID(id int) (*entities.RegVoters, []error)

func (*MockGormVoter) IncrementCounter

func (mgv *MockGormVoter) IncrementCounter(vte *entities.RegParties) (*entities.RegParties, []error)

func (*MockGormVoter) Parties

func (mgv *MockGormVoter) Parties() ([]entities.RegParties, []error)

func (*MockGormVoter) PhoneExists

func (mgv *MockGormVoter) PhoneExists(phone string) bool

func (*MockGormVoter) Regster4Event

func (mgv *MockGormVoter) Regster4Event(id uint) error

func (*MockGormVoter) StoreRegParty

func (mgv *MockGormVoter) StoreRegParty(parties *entities.RegParties) (*entities.RegParties, []error)

func (*MockGormVoter) StoreRegVoter

func (mgv *MockGormVoter) StoreRegVoter(voter *entities.RegVoters) (*entities.RegVoters, []error)

func (*MockGormVoter) StoreVoter

func (mgv *MockGormVoter) StoreVoter(voter *entities.Voters) (*entities.Voters, []error)

func (*MockGormVoter) UpdateVoter

func (mgv *MockGormVoter) UpdateVoter(voter *entities.Voters) (*entities.Voters, []error)

func (*MockGormVoter) Vote

func (mgv *MockGormVoter) Vote(pid int, eid int, vid int) []error

func (*MockGormVoter) VoteByParty

func (mgv *MockGormVoter) VoteByParty(pName string) ([]entities.Votes, []error)

func (*MockGormVoter) Voter

func (mgv *MockGormVoter) Voter(id uint) (*entities.Voters, []error)

func (*MockGormVoter) VoterByGID

func (mgv *MockGormVoter) VoterByGID(gid string) (*entities.Voters, []error)

func (*MockGormVoter) VoterRoles

func (mgv *MockGormVoter) VoterRoles(voters *entities.Voters) ([]entities.Role, []error)

func (*MockGormVoter) Voters

func (mgv *MockGormVoter) Voters() ([]entities.Voters, []error)

func (*MockGormVoter) Votes

func (mgv *MockGormVoter) Votes() ([]entities.Votes, []error)

type MockRoleGormRepo

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

func NewMockRoleGormRepo

func NewMockRoleGormRepo(conn *gorm.DB) *MockRoleGormRepo

func (*MockRoleGormRepo) DeleteRole

func (mockRoleRepo *MockRoleGormRepo) DeleteRole(id uint) (*entities.Role, []error)

func (*MockRoleGormRepo) DeleteSession

func (msgr *MockRoleGormRepo) DeleteSession(sessionID string) (*entities.Session, []error)

DeleteSession deletes a given session

func (*MockRoleGormRepo) Role

func (mockRoleRepo *MockRoleGormRepo) Role(id uint) (*entities.Role, []error)

func (*MockRoleGormRepo) RoleByName

func (mockRoleRepo *MockRoleGormRepo) RoleByName(name string) (*entities.Role, []error)

func (*MockRoleGormRepo) Roles

func (mockRoleRepo *MockRoleGormRepo) Roles() ([]entities.Role, []error)

func (*MockRoleGormRepo) Session

func (msgr *MockRoleGormRepo) Session(sessionID string) (*entities.Session, []error)

Session returns a given stored session

func (*MockRoleGormRepo) StoreRole

func (mockRoleRepo *MockRoleGormRepo) StoreRole(role *entities.Role) (*entities.Role, []error)

func (*MockRoleGormRepo) StoreSession

func (msgr *MockRoleGormRepo) StoreSession(session *entities.Session) (*entities.Session, []error)

StoreSession stores a given session

func (*MockRoleGormRepo) UpdateRole

func (mockRoleRepo *MockRoleGormRepo) UpdateRole(role *entities.Role) (*entities.Role, []error)

type MockSessionGormRepo

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

func NewMockSessionGormRepo

func NewMockSessionGormRepo(db *gorm.DB) *MockSessionGormRepo

type RoleGormRepo

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

func NewRoleGormRepo

func NewRoleGormRepo(conn *gorm.DB) *RoleGormRepo

func (*RoleGormRepo) DeleteRole

func (roleRepo *RoleGormRepo) DeleteRole(id uint) (*entities.Role, []error)

func (*RoleGormRepo) Role

func (roleRepo *RoleGormRepo) Role(id uint) (*entities.Role, []error)

func (*RoleGormRepo) RoleByName

func (roleRepo *RoleGormRepo) RoleByName(name string) (*entities.Role, []error)

func (*RoleGormRepo) Roles

func (roleRepo *RoleGormRepo) Roles() ([]entities.Role, []error)

func (*RoleGormRepo) StoreRole

func (roleRepo *RoleGormRepo) StoreRole(role *entities.Role) (*entities.Role, []error)

func (*RoleGormRepo) UpdateRole

func (roleRepo *RoleGormRepo) UpdateRole(role *entities.Role) (*entities.Role, []error)

type SessionGormRepo

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

func (*SessionGormRepo) DeleteSession

func (sr *SessionGormRepo) DeleteSession(sessionID string) (*entities.Session, []error)

DeleteSession deletes a given session

func (*SessionGormRepo) Session

func (sr *SessionGormRepo) Session(sessionID string) (*entities.Session, []error)

Session returns a given stored session

func (*SessionGormRepo) StoreSession

func (sr *SessionGormRepo) StoreSession(session *entities.Session) (*entities.Session, []error)

StoreSession stores a given session

type VoterGormRepo

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

func NewVoterGormRepo

func NewVoterGormRepo(conn *gorm.DB) *VoterGormRepo

func (*VoterGormRepo) CheckEvent

func (ari *VoterGormRepo) CheckEvent(id uint) (*entities.Events, []error)

func (*VoterGormRepo) Deletevoter

func (ari *VoterGormRepo) Deletevoter(id uint) (*entities.Voters, []error)

func (*VoterGormRepo) GIDExists

func (ari *VoterGormRepo) GIDExists(gid string) bool

func (*VoterGormRepo) GetAlreadyVoted

func (ari *VoterGormRepo) GetAlreadyVoted(id int) (*entities.Votes, []error)

func (*VoterGormRepo) GetRegParites

func (ari *VoterGormRepo) GetRegParites() ([]entities.RegParties, []error)

func (*VoterGormRepo) GetRegPartyByID

func (ari *VoterGormRepo) GetRegPartyByID(id int) (*entities.Parties, []error)

func (*VoterGormRepo) GetRegVoters

func (ari *VoterGormRepo) GetRegVoters() ([]entities.RegVoters, []error)

func (*VoterGormRepo) GetRegVotersByID

func (ari *VoterGormRepo) GetRegVotersByID(id int) (*entities.RegVoters, []error)

func (*VoterGormRepo) PhoneExists

func (ari *VoterGormRepo) PhoneExists(phone string) bool

func (*VoterGormRepo) Regster4Event

func (ari *VoterGormRepo) Regster4Event(id uint) error

func (*VoterGormRepo) StoreRegParty

func (ari *VoterGormRepo) StoreRegParty(parties *entities.RegParties) (*entities.RegParties, []error)

func (*VoterGormRepo) StoreRegVoter

func (ari *VoterGormRepo) StoreRegVoter(voter *entities.RegVoters) (*entities.RegVoters, []error)

func (*VoterGormRepo) StoreVoter

func (ari *VoterGormRepo) StoreVoter(voter *entities.Voters) (*entities.Voters, []error)

func (*VoterGormRepo) UpdateVoter

func (ari *VoterGormRepo) UpdateVoter(voter *entities.Voters) (*entities.Voters, []error)

func (*VoterGormRepo) Vote

func (ari *VoterGormRepo) Vote(pid int, eid int, vid int) []error

func (*VoterGormRepo) Voter

func (ari *VoterGormRepo) Voter(id uint) (*entities.Voters, []error)

func (*VoterGormRepo) VoterByGID

func (ari *VoterGormRepo) VoterByGID(gid string) (*entities.Voters, []error)

func (*VoterGormRepo) VoterRoles

func (ari *VoterGormRepo) VoterRoles(voters *entities.Voters) ([]entities.Role, []error)

func (*VoterGormRepo) Voters

func (ari *VoterGormRepo) Voters() ([]entities.Voters, []error)

func (*VoterGormRepo) Votes

func (ari *VoterGormRepo) Votes() ([]entities.Votes, []error)

Jump to

Keyboard shortcuts

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