service

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: 3 Imported by: 1

Documentation

Index

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) StoreRole

func (rs *RoleService) StoreRole(role *entities.Role) (*entities.Role, []error)

StoreRole stores a given user role

func (*RoleService) UpdateRole

func (rs *RoleService) UpdateRole(role *entities.Role) (*entities.Role, []error)

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

func (ss *SessionServiceImpl) StoreSession(session *entities.Session) (*entities.Session, []error)

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 (asi *VoterServiceImple) StoreRegVoter(voter *entities.RegVoters) (*entities.RegVoters, []error)

func (*VoterServiceImple) StoreVoter

func (asi *VoterServiceImple) StoreVoter(pst *entities.Voters) (*entities.Voters, []error)

func (*VoterServiceImple) UpdateVoter

func (asi *VoterServiceImple) UpdateVoter(pst *entities.Voters) (*entities.Voters, []error)

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

func (asi *VoterServiceImple) VoterRoles(voters *entities.Voters) ([]entities.Role, []error)

func (*VoterServiceImple) Voters

func (asi *VoterServiceImple) Voters() ([]entities.Voters, []error)

func (*VoterServiceImple) Votes

func (asi *VoterServiceImple) Votes() ([]entities.Votes, []error)

Jump to

Keyboard shortcuts

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