service

package
v0.0.0-...-edfd1aa Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2018 License: Apache-2.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckFreeParticipators

func CheckFreeParticipators(participators []string, initiator string, occupiedParticipators map[string]bool) (bool, string)

func RemoveDuplicatedParticipators

func RemoveDuplicatedParticipators(participators []string, initiator string) []string

Types

type AdminService

type AdminService interface {
	GetCurrentUserName() string
	Login(name, password string) error
	Register(name, password, email, telephone string) error
	SetCurrentUserName(name string) error
}

type Manager

type Manager Service

func (*Manager) Admin

func (s *Manager) Admin() AdminService

func (*Manager) GetService

func (s *Manager) GetService() *Service

func (*Manager) Meeting

func (s *Manager) Meeting() MeetingService

func (*Manager) User

func (s *Manager) User() UserService

type MeetingService

type MeetingService interface {
	CreateMeeting(title string, startTime, endTime time.Time, initiator string, participators []string) error
	SetMeeting(title string, startTime time.Time, setStart bool, endTime time.Time, setEnd bool, initiator string, participators []string, setPars bool) error
	DeleteMeeting(user, title string) error
	QuitMeeting(user, title string) error
	RemoveParticipators(user, title string, participators []string) error
	ListMeetings(user, title string, startTime, endTime time.Time) (string, error)
	AddMeeting(title string, participators []string, name string) error
}

type Service

type Service struct {
	DB model.Manager
}

func (*Service) AddMeeting

func (s *Service) AddMeeting(title string, participators []string, name string) error

func (*Service) CreateMeeting

func (s *Service) CreateMeeting(title string, startTime time.Time, endTime time.Time, initiator string, participators []string) error

func (*Service) DeleteMeeting

func (s *Service) DeleteMeeting(user, title string) error

func (*Service) DeleteUser

func (s *Service) DeleteUser(name string, password string) error

func (*Service) GetAllUsers

func (s *Service) GetAllUsers() string

func (*Service) GetCurrentUserName

func (s *Service) GetCurrentUserName() string

Don't call this method in other service's methods!!!

func (*Service) GetUserDetail

func (s *Service) GetUserDetail(name string) (string, error)

func (*Service) ListMeetings

func (s *Service) ListMeetings(user, title string, startTime, endTime time.Time) (string, error)

func (*Service) Login

func (s *Service) Login(name, password string) error

func (*Service) QuitMeeting

func (s *Service) QuitMeeting(user, title string) error

func (*Service) Register

func (s *Service) Register(name, password, email, telephone string) error

func (*Service) RemoveParticipators

func (s *Service) RemoveParticipators(user, title string, participators []string) error

func (*Service) SetCurrentUserName

func (s *Service) SetCurrentUserName(name string) error

Don't call this method in other service's methods!!!

func (*Service) SetMeeting

func (s *Service) SetMeeting(title string, startTime time.Time, setStart bool, endTime time.Time, setEnd bool,
	initiator string, participators []string, setPars bool) error

func (*Service) SetUser

func (s *Service) SetUser(name, password string, setPassword bool, email string, setEmail bool, telephone string, setTel bool) error

type UserService

type UserService interface {
	DeleteUser(name string, password string) error
	GetAllUsers() string
	GetUserDetail(name string) (string, error)
	SetUser(name, password string, setPassword bool, email string, setEmail bool, telephone string, setTel bool) error
}

Jump to

Keyboard shortcuts

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