Documentation ¶
Index ¶
- Variables
- func EqualEventDTO(a *EventDTO, b *EventDTO) bool
- func EqualParticipantDTO(a *ParticipantDTO, b *ParticipantDTO) bool
- type AccessTokenDAO
- type AccessTokenDTO
- type ActiveSessionInfoDTO
- type AttendanceResponse
- type Config
- type DbSession
- type EventDAO
- type EventDTO
- type EventHistoryDAO
- type EventState
- type EventTimeLineDAO
- type FriendDAO
- type FriendDTO
- type FriendRequestDAO
- type FriendRequestDTO
- type GroupDTO
- type IIDTokenDTO
- type InvitationStatus
- type LogDAO
- type ParticipantDTO
- type PictureDTO
- type Server
- type SettingOption
- type SettingsDAO
- type ThumbnailDAO
- type TimeLineByEndDate
- type TimeLineEntryDTO
- type UserDAO
- type UserDTO
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNotFound = errors.New("not found") ErrNoResults = errors.New("no results found") ErrInvalidArg = errors.New("invalid arguments") ErrInvalidEmail = errors.New("invalid e-mail") ErrEmailAlreadyExists = errors.New("e-mail already exists") ErrFacebookAlreadyExists = errors.New("facebook already exists") ErrUnexpected = errors.New("unexpected error") ErrAccountMismatch = errors.New("account mismatch") )
Functions ¶
func EqualEventDTO ¶
func EqualParticipantDTO ¶
func EqualParticipantDTO(a *ParticipantDTO, b *ParticipantDTO) bool
Types ¶
type AccessTokenDAO ¶
type AccessTokenDAO interface { Load(userId int64) (*AccessTokenDTO, error) Insert(accessToken *AccessTokenDTO) error SetLastUsed(user_id int64, time int64) error Remove(user_id int64) error }
type AccessTokenDTO ¶
type ActiveSessionInfoDTO ¶
type AttendanceResponse ¶
type AttendanceResponse int8
const ( AttendanceResponse_NO_RESPONSE AttendanceResponse = 0 AttendanceResponse_NO_ASSIST AttendanceResponse = 1 AttendanceResponse_MAYBE AttendanceResponse = 2 AttendanceResponse_ASSIST AttendanceResponse = 3 )
type Config ¶
type Config interface { MaintenanceMode() bool ShowTestModeWarning() bool DomainName() string CertFile() string CertKey() string DbAddress() []string DbKeyspace() string DbCQLVersion() int ListenAddress() string ListenPort() int ImageListenPort() int ImageEnableHTTPS() bool SSHListenAddress() string SSHListenPort() int FBWebHookEnabled() bool FBWebHookListenPort() int FirebaseAPIKey() string }
type EventDAO ¶
type EventDAO interface { RangeAll(f func(*EventDTO) error) error RangeEvents(f func(*EventDTO) error, event_ids ...int64) error LoadEvents(ids ...int64) (events []*EventDTO, err error) LoadEventPicture(eventId int64) (*PictureDTO, error) LoadParticipant(participantID int64, eventID int64) (*ParticipantDTO, error) Insert(event *EventDTO) error Replace(oldEvent *EventDTO, newEvent *EventDTO) error InsertParticipant(p *ParticipantDTO) error SetEventPicture(event_id int64, picture *PictureDTO) error DeleteAll() error }
type EventDTO ¶
type EventHistoryDAO ¶
type EventState ¶
type EventState int8
const ( EventState_NOT_STARTED EventState = 0 EventState_ONGOING EventState = 1 EventState_FINISHED EventState = 2 EventState_CANCELLED EventState = 3 )
type EventTimeLineDAO ¶
type EventTimeLineDAO interface { FindAllBackward(date time.Time) ([]*TimeLineEntryDTO, error) FindAllForward(date time.Time) ([]*TimeLineEntryDTO, error) FindAllBetween(fromDate time.Time, toDate time.Time) ([]*TimeLineEntryDTO, error) Insert(item *TimeLineEntryDTO) error Delete(item *TimeLineEntryDTO) error Replace(oldItem *TimeLineEntryDTO, newItem *TimeLineEntryDTO) error DeleteAll() error }
type FriendDAO ¶
type FriendDAO interface { LoadFriends(userId int64, groupId int32) ([]*FriendDTO, error) ContainsFriend(userId int64, otherUserId int64) (bool, error) LoadGroups(userId int64) ([]*GroupDTO, error) LoadGroupsWithMembers(userId int64) ([]*GroupDTO, error) SetFriendPictureDigest(userId int64, friendId int64, digest []byte) error InsertGroup(userId int64, group *GroupDTO) error SetGroupName(user_id int64, groupId int32, name string) error AddMembers(userId int64, groupId int32, friendIds ...int64) error MakeFriends(user1 *FriendDTO, user2 *FriendDTO) error DeleteGroup(userId int64, groupId int32) error DeleteMembers(userId int64, groupId int32, friendIds ...int64) error }
type FriendRequestDAO ¶
type FriendRequestDAO interface { Load(fromUser int64, toUser int64) (*FriendRequestDTO, error) LoadAll(user_id int64) ([]*FriendRequestDTO, error) Exist(fromUser int64, toUser int64) (bool, error) Insert(friendRequest *FriendRequestDTO) error Delete(friendRequest *FriendRequestDTO) error }
type FriendRequestDTO ¶
type IIDTokenDTO ¶
type InvitationStatus ¶
type InvitationStatus int8
const ( InvitationStatus_NO_DELIVERED InvitationStatus = 0 InvitationStatus_SERVER_DELIVERED InvitationStatus = 1 InvitationStatus_CLIENT_DELIVERED InvitationStatus = 2 )
type ParticipantDTO ¶
type ParticipantDTO struct { UserID int64 EventID int64 Name string Response AttendanceResponse InvitationStatus InvitationStatus NameTS int64 // Microseconds ResponseTS int64 // Microseconds StatusTS int64 // Microseconds }
func (*ParticipantDTO) Clone ¶
func (d *ParticipantDTO) Clone() *ParticipantDTO
type PictureDTO ¶
type SettingOption ¶
type SettingOption string
const (
MasterLastArchiveTime SettingOption = "MasterLastArchiveTime"
)
type SettingsDAO ¶
type SettingsDAO interface { Find(key SettingOption) (string, error) Insert(key SettingOption, value string) error }
type ThumbnailDAO ¶
type TimeLineByEndDate ¶
type TimeLineByEndDate []*TimeLineEntryDTO
func (TimeLineByEndDate) Len ¶
func (a TimeLineByEndDate) Len() int
func (TimeLineByEndDate) Less ¶
func (a TimeLineByEndDate) Less(i, j int) bool
func (TimeLineByEndDate) Swap ¶
func (a TimeLineByEndDate) Swap(i, j int)
type TimeLineEntryDTO ¶
type UserDAO ¶
type UserDAO interface { Load(userId int64) (*UserDTO, error) LoadByEmail(email string) (*UserDTO, error) LoadByFB(fbId string) (*UserDTO, error) LoadProfilePicture(userId int64) (*PictureDTO, error) LoadIIDToken(userId int64) (*IIDTokenDTO, error) Insert(user *UserDTO) error InsertFacebookCredentials(userId int64, fbId string, fbToken string) (ok bool, err error) SetPassword(email string, newPassword [32]byte, newSalt [32]byte) (bool, error) SaveProfilePicture(userId int64, picture *PictureDTO) error SetLastConnection(userId int64, time int64) error SetAuthToken(userId int64, auth_token string) error SetFacebookCredential(userId int64, fbId string, fbToken string) error SetFacebook(userId int64, fbId string, fbToken string) error SetIIDToken(userId int64, iidToken *IIDTokenDTO) error Delete(user *UserDTO) error DeleteAll() error }
Click to show internal directories.
Click to hide internal directories.