Documentation ¶
Index ¶
- Variables
- type DaoSource
- type Date
- func (date Date) DateToString() string
- func (date Date) GetDay() int
- func (date Date) GetHour() int
- func (date Date) GetMinute() int
- func (date Date) GetMonth() string
- func (date Date) GetYear() int
- func (date *Date) Init(st string)
- func (date Date) IsAfter(other Date) bool
- func (date Date) IsEqual(other Date) bool
- type Meeting
- func (meeting *Meeting) AddParticipator(username string) bool
- func (meeting *Meeting) DeleteParticipator(username string) bool
- func (meeting Meeting) GetEnd() string
- func (meeting Meeting) GetParticipators() []string
- func (meeting Meeting) GetParticipatorsLength() int
- func (meeting Meeting) GetSponsor() string
- func (meeting Meeting) GetStart() string
- func (meeting Meeting) GetTitle() string
- func (meeting *Meeting) Init(title string, sponsor string, participators []string, start string, end string)
- func (meeting Meeting) IsParticipator(username string) bool
- func (meeting Meeting) IsSponsor(username string) bool
- func (meeting *Meeting) SetEnd(end string)
- func (meeting *Meeting) SetParticipators(participators []string)
- func (meeting *Meeting) SetSponsor(sponsor string)
- func (meeting *Meeting) SetStart(start string)
- func (meeting *Meeting) SetTitle(title string)
- func (meeting Meeting) String()
- type MeetingServiceProvider
- func (*MeetingServiceProvider) DeleteBySponsor(sponsor string) error
- func (*MeetingServiceProvider) DeleteByTitle(title string) error
- func (*MeetingServiceProvider) Insert(meeting *Meeting) error
- func (*MeetingServiceProvider) QueryAll() []Meeting
- func (*MeetingServiceProvider) QueryBy(key string, val string) []Meeting
- func (*MeetingServiceProvider) QueryByTitle(title string) Meeting
- func (*MeetingServiceProvider) Update(meeting Meeting) error
- type SQLExecer
- type User
- func (user User) GetEmail() string
- func (user User) GetPassword() string
- func (user User) GetPhone() string
- func (user User) GetUsername() string
- func (user *User) Init(name string, psw string, email string, phone string)
- func (user *User) SetEmail(email string)
- func (user *User) SetPassword(password string)
- func (user *User) SetPhone(phone string)
- func (user *User) SetUsername(username string)
- func (user User) String()
- type UserServiceProvider
Constants ¶
This section is empty.
Variables ¶
View Source
var MeetingService = MeetingServiceProvider{}
View Source
var UserService = UserServiceProvider{}
Functions ¶
This section is empty.
Types ¶
type Date ¶
func StringToDate ¶
the example of string: 2017-10-20T19:00 2000-01-01T00:00
type Meeting ¶
type Meeting struct { Id int `json:"id"` Title string `json:"title"` Sponsor string `json:"sponsor"` Participators []string `json:"participators"` Start string `json:"start"` End string `json:"end"` }
func (*Meeting) AddParticipator ¶
func (*Meeting) DeleteParticipator ¶
func (Meeting) GetParticipators ¶
func (Meeting) GetParticipatorsLength ¶
func (Meeting) GetSponsor ¶
func (*Meeting) Init ¶
func (meeting *Meeting) Init(title string, sponsor string, participators []string, start string, end string)
the examples of start and end: 2017-10-20T19:00 2017-01-01T0:00
func (Meeting) IsParticipator ¶
func (*Meeting) SetParticipators ¶
func (*Meeting) SetSponsor ¶
type MeetingServiceProvider ¶
type MeetingServiceProvider struct{}
func (*MeetingServiceProvider) DeleteBySponsor ¶
func (*MeetingServiceProvider) DeleteBySponsor(sponsor string) error
func (*MeetingServiceProvider) DeleteByTitle ¶
func (*MeetingServiceProvider) DeleteByTitle(title string) error
func (*MeetingServiceProvider) Insert ¶
func (*MeetingServiceProvider) Insert(meeting *Meeting) error
func (*MeetingServiceProvider) QueryAll ¶
func (*MeetingServiceProvider) QueryAll() []Meeting
func (*MeetingServiceProvider) QueryBy ¶
func (*MeetingServiceProvider) QueryBy(key string, val string) []Meeting
func (*MeetingServiceProvider) QueryByTitle ¶
func (*MeetingServiceProvider) QueryByTitle(title string) Meeting
func (*MeetingServiceProvider) Update ¶
func (*MeetingServiceProvider) Update(meeting Meeting) error
type User ¶
type User struct { Id int `json:"id"` Username string `json:"username"` Password string `json:"password"` Email string `json:"email"` Phone string `json:"phone"` }
func (User) GetPassword ¶
func (User) GetUsername ¶
func (*User) SetPassword ¶
func (*User) SetUsername ¶
type UserServiceProvider ¶
type UserServiceProvider struct{}
func (*UserServiceProvider) DeleteByName ¶
func (*UserServiceProvider) DeleteByName(name string) error
func (*UserServiceProvider) Insert ¶
func (*UserServiceProvider) Insert(user *User) error
func (*UserServiceProvider) QueryAll ¶
func (*UserServiceProvider) QueryAll() []User
func (*UserServiceProvider) QueryByName ¶
func (*UserServiceProvider) QueryByName(name string) User
Click to show internal directories.
Click to hide internal directories.