Documentation ¶
Index ¶
- func NewRoleService(RoleRepo voters.RoleRepository) voters.RoleService
- type RoleService
- func (rs *RoleService) DeleteRole(id uint) (*entities.Role, []error)
- func (rs *RoleService) Role(id uint) (*entities.Role, []error)
- func (rs *RoleService) RoleByName(name string) (*entities.Role, []error)
- func (rs *RoleService) Roles() ([]entities.Role, []error)
- func (rs *RoleService) StoreRole(role *entities.Role) (*entities.Role, []error)
- func (rs *RoleService) UpdateRole(role *entities.Role) (*entities.Role, []error)
- type SessionServiceImpl
- type VoterServiceImple
- func (asi *VoterServiceImple) CheckEvent(id uint) (*entities.Events, []error)
- func (asi *VoterServiceImple) Deletevoter(id uint) (*entities.Voters, []error)
- func (asi *VoterServiceImple) GIDExists(gid string) bool
- func (asi *VoterServiceImple) GetAlreadyVoted(id int) (*entities.Votes, []error)
- func (asi *VoterServiceImple) GetRegParites() ([]entities.RegParties, []error)
- func (asi *VoterServiceImple) GetRegPartyByID(id int) (*entities.Parties, []error)
- func (asi *VoterServiceImple) GetRegVoters() ([]entities.RegVoters, []error)
- func (asi *VoterServiceImple) GetRegVotersByID(id int) (*entities.RegVoters, []error)
- func (asi *VoterServiceImple) PhoneExists(uname string) bool
- func (asi *VoterServiceImple) Regster4Event(id uint) error
- func (asi *VoterServiceImple) StoreRegParty(parties *entities.RegParties) (*entities.RegParties, []error)
- func (asi *VoterServiceImple) StoreRegVoter(voter *entities.RegVoters) (*entities.RegVoters, []error)
- func (asi *VoterServiceImple) StoreVoter(pst *entities.Voters) (*entities.Voters, []error)
- func (asi *VoterServiceImple) UpdateVoter(pst *entities.Voters) (*entities.Voters, []error)
- func (asi *VoterServiceImple) Vote(pid int, eid int, vid int) []error
- func (asi *VoterServiceImple) Voter(id uint) (*entities.Voters, []error)
- func (asi *VoterServiceImple) VoterByGID(gid string) (*entities.Voters, []error)
- func (asi *VoterServiceImple) VoterRoles(voters *entities.Voters) ([]entities.Role, []error)
- func (asi *VoterServiceImple) Voters() ([]entities.Voters, []error)
- func (asi *VoterServiceImple) Votes() ([]entities.Votes, []error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewRoleService ¶
func NewRoleService(RoleRepo voters.RoleRepository) voters.RoleService
NewRoleService returns new RoleService
Types ¶
type RoleService ¶
type RoleService struct {
// contains filtered or unexported fields
}
func (*RoleService) DeleteRole ¶
func (rs *RoleService) DeleteRole(id uint) (*entities.Role, []error)
DeleteRole deletes a given user role
func (*RoleService) Role ¶
func (rs *RoleService) Role(id uint) (*entities.Role, []error)
Role retrievs a given user role by its id
func (*RoleService) RoleByName ¶
func (rs *RoleService) RoleByName(name string) (*entities.Role, []error)
RoleByName returns a role identified by its name
func (*RoleService) Roles ¶
func (rs *RoleService) Roles() ([]entities.Role, []error)
Roles returns all stored roles
func (*RoleService) UpdateRole ¶
UpdateRole updates a given user role
type SessionServiceImpl ¶
type SessionServiceImpl struct {
// contains filtered or unexported fields
}
func NewSessionService ¶
func NewSessionService(sessRepository voters.SessionRepository) *SessionServiceImpl
NewSessionService returns a new SessionService object
func (*SessionServiceImpl) DeleteSession ¶
func (ss *SessionServiceImpl) DeleteSession(sessionID string) (*entities.Session, []error)
DeleteSession deletes a given session
func (*SessionServiceImpl) Session ¶
func (ss *SessionServiceImpl) Session(sessionID string) (*entities.Session, []error)
Session returns a given stored session
func (*SessionServiceImpl) StoreSession ¶
StoreSession stores a given session
type VoterServiceImple ¶
type VoterServiceImple struct {
// contains filtered or unexported fields
}
func NewAuthService ¶
func NewAuthService(authrepo voters.VotersRepository) *VoterServiceImple
func (*VoterServiceImple) CheckEvent ¶
func (asi *VoterServiceImple) CheckEvent(id uint) (*entities.Events, []error)
func (*VoterServiceImple) Deletevoter ¶
func (asi *VoterServiceImple) Deletevoter(id uint) (*entities.Voters, []error)
func (*VoterServiceImple) GIDExists ¶
func (asi *VoterServiceImple) GIDExists(gid string) bool
func (*VoterServiceImple) GetAlreadyVoted ¶
func (asi *VoterServiceImple) GetAlreadyVoted(id int) (*entities.Votes, []error)
func (*VoterServiceImple) GetRegParites ¶
func (asi *VoterServiceImple) GetRegParites() ([]entities.RegParties, []error)
func (*VoterServiceImple) GetRegPartyByID ¶
func (asi *VoterServiceImple) GetRegPartyByID(id int) (*entities.Parties, []error)
func (*VoterServiceImple) GetRegVoters ¶
func (asi *VoterServiceImple) GetRegVoters() ([]entities.RegVoters, []error)
func (*VoterServiceImple) GetRegVotersByID ¶
func (asi *VoterServiceImple) GetRegVotersByID(id int) (*entities.RegVoters, []error)
func (*VoterServiceImple) PhoneExists ¶
func (asi *VoterServiceImple) PhoneExists(uname string) bool
func (*VoterServiceImple) Regster4Event ¶
func (asi *VoterServiceImple) Regster4Event(id uint) error
func (*VoterServiceImple) StoreRegParty ¶
func (asi *VoterServiceImple) StoreRegParty(parties *entities.RegParties) (*entities.RegParties, []error)
func (*VoterServiceImple) StoreRegVoter ¶
func (*VoterServiceImple) StoreVoter ¶
func (*VoterServiceImple) UpdateVoter ¶
func (*VoterServiceImple) Vote ¶
func (asi *VoterServiceImple) Vote(pid int, eid int, vid int) []error
func (*VoterServiceImple) Voter ¶
func (asi *VoterServiceImple) Voter(id uint) (*entities.Voters, []error)
func (*VoterServiceImple) VoterByGID ¶
func (asi *VoterServiceImple) VoterByGID(gid string) (*entities.Voters, []error)
func (*VoterServiceImple) VoterRoles ¶
Click to show internal directories.
Click to hide internal directories.