Documentation ¶
Overview ¶
Package models contains the data structures used in fr mutations. Would be good to just move these structures to corresponding files in the frapi package. However these data structures are currently persisted in production with the models name (gob), so the change is not simple.
Index ¶
- Constants
- type AcceptInvitationInput
- type BlackoutRestriction
- type CancelReservationInput
- type ContentName
- type Currency
- type DailyRate
- type DeletePropertyInput
- type MembershipRestriction
- type NewContentInput
- type NewNotificationInput
- type NewPropertyInput
- type NewReservationInput
- type NewRestrictionInput
- type NewUserInput
- type NewVersionEvent
- type NotificationReadInput
- type PersistedEmail
- type UpdateBalanceInput
- type UpdateMembershipStatusInput
- type UpdateSettingsInput
- type UpdateSystemUserInput
- type UpdateUserInput
- type UserState
- Bugs
Constants ¶
const AcceptInvitationInputGQL = `
# Accept an invitation to join a property
input AcceptInvitationInput {
forVersion: String!
accept: Boolean!
}
`
AcceptInvitationInputGQL is the GQL string for accepting a property invitation
const BlackoutRestrictionInputGQL = `` /* 172-byte string literal not displayed */
BlackoutRestrictionInputGQL is the GQL string for creating a new blackout restriction
const LedgerMutationGQL = `` /* 170-byte string literal not displayed */
LedgerMutationGQL is the GQL string for updating user balance
const MembershipRestrictionInputGQL = `` /* 357-byte string literal not displayed */
MembershipRestrictionInputGQL is the GQL string for creating a new membership restriction
const NewContentInputGQL = `` /* 142-byte string literal not displayed */
NewContentInputGQL is the GQL string for updating content
const NewReservationInputGQL = `` /* 291-byte string literal not displayed */
NewReservationInputGQL is the GQL string for creating a reservation
const NewRestrictionInputGQL = `` /* 232-byte string literal not displayed */
NewRestrictionInputGQL is the GQL string for creating a new restriction
const NewUserInputGQL = `` /* 155-byte string literal not displayed */
NewUserInputGQL is the GQL string for creating a new user
const UpdateMembershipStatusInputGQL = `` /* 495-byte string literal not displayed */
UpdateMembershipStatusInputGQL is the GQL string for creating a new user
const UpdateSettingsInputGQL = `` /* 306-byte string literal not displayed */
UpdateSettingsInputGQL is the GQL string for updating settings
const UpdateSystemUserInputGQL = `
# Update system user
input UpdateSystemUserInput {
forVersion: Int!
email: String!
nickname: String!
}
`
UpdateSystemUserInputGQL is the GQL string for updating user information
const UpdateUserInputGQL = `` /* 155-byte string literal not displayed */
UpdateUserInputGQL is the GQL string for updating user information
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AcceptInvitationInput ¶
type AcceptInvitationInput struct { // Fields received from the client ForVersion int32 Accept bool // Extra fields persisted with the above UpdateDateTime string AuthorUserId string EventVersion int32 }
AcceptInvitationInput is the GQL structure for accepting a property invitation
func (*AcceptInvitationInput) GetEventVersion ¶
func (r *AcceptInvitationInput) GetEventVersion() int
GetEventVersion returns the version of the event
func (*AcceptInvitationInput) GetForVersion ¶
func (r *AcceptInvitationInput) GetForVersion() int32
GetForVersion is called for duplicate suppression
func (*AcceptInvitationInput) SetEventVersion ¶
func (r *AcceptInvitationInput) SetEventVersion(Version int)
SetEventVersion is called by the persist code to set the event version
type BlackoutRestriction ¶
type CancelReservationInput ¶
type CancelReservationInput struct { // Fields received from the client ForVersion int32 ReservationId string AdminRequest bool // Extra fields persisted with the above CreateDateTime string ReservedForUserId string AuthorUserId string EventVersion int32 }
CancelReservationInput is called to cancel a reservation
func (*CancelReservationInput) GetEventVersion ¶
func (r *CancelReservationInput) GetEventVersion() int
GetEventVersion returns the version of the mutation event
func (*CancelReservationInput) GetForVersion ¶
func (r *CancelReservationInput) GetForVersion() int32
GetForVersion is called for duplicate suppression
func (*CancelReservationInput) SetEventVersion ¶
func (r *CancelReservationInput) SetEventVersion(Version int)
SetEventVersion is called by the persist code to set the event version
type ContentName ¶
type ContentName string
const ( ADMIN_HOME ContentName = "ADMIN_HOME" MEMBER_HOME ContentName = "MEMBER_HOME" )
type DeletePropertyInput ¶
type DeletePropertyInput struct { // Fields received from the client PropertyId string }
type MembershipRestriction ¶
type NewContentInput ¶
type NewContentInput struct { // Fields received from the client ForVersion int32 Name ContentName Template string Comment string // Extra fields persisted with the above CreateDateTime string AuthorUserId string EventVersion int32 }
NewContentInput is the gql input for updating content
func (*NewContentInput) GetEventVersion ¶
func (r *NewContentInput) GetEventVersion() int
GetEventVersion returns the version of the contents update event
func (*NewContentInput) GetForVersion ¶
func (r *NewContentInput) GetForVersion() int32
GetForVersion is called for duplicate suppression
func (*NewContentInput) SetEventVersion ¶
func (r *NewContentInput) SetEventVersion(Version int)
SetEventVersion is called by the persist code to set the event version
type NewNotificationInput ¶
type NewNotificationInput struct { AllNotifiedUserIds []string ToUserIds []string CcUserIds []string TemplateName templates.TemplateName TemplateVersion int32 DefaultTemplate bool TemplateParamData map[templates.TemplateParamGroup]string NotificationId string CreateDateTime string AuthorUserId string EventVersion int32 EmailSent bool }
NewNotificationInput is created by the service, i.e. it is not a request from the client gql
func (*NewNotificationInput) GetEventVersion ¶
func (r *NewNotificationInput) GetEventVersion() int
GetEventVersion returns the version of the mutation event
func (*NewNotificationInput) SetEventVersion ¶
func (r *NewNotificationInput) SetEventVersion(Version int)
SetEventVersion is called by the persist code to set the event version
type NewPropertyInput ¶
type NewPropertyInput struct { // Fields received from the client PropertyName string Currency Currency MemberRate int32 AllowNonMembers bool NonMemberRate int32 IsMember bool NickName string Timezone string // Extra fields persisted with the above // BUG(bjorge): remove propertyId from here - misleading // since after export/import it will be different PropertyId string CreateDateTime string AuthorUserId string EventVersion int32 }
func (*NewPropertyInput) GetEventVersion ¶
func (r *NewPropertyInput) GetEventVersion() int
func (*NewPropertyInput) SetEventVersion ¶
func (r *NewPropertyInput) SetEventVersion(Version int)
type NewReservationInput ¶
type NewReservationInput struct { // Fields received from the client ForVersion int32 ReservedForUserId string StartDate string EndDate string Member bool NonMemberName *string NonMemberInfo *string AdminRequest bool // Extra fields persisted with the above Rate []DailyRate ReservationId string CreateDateTime string AuthorUserId string EventVersion int32 }
func (*NewReservationInput) GetEventVersion ¶
func (r *NewReservationInput) GetEventVersion() int
GetEventVersion returns the version of the mutation event
func (*NewReservationInput) GetForVersion ¶
func (r *NewReservationInput) GetForVersion() int32
GetForVersion is called for duplicate suppression
func (*NewReservationInput) SetEventVersion ¶
func (r *NewReservationInput) SetEventVersion(Version int)
SetEventVersion is called by the persist code to set the event version
type NewRestrictionInput ¶
type NewRestrictionInput struct { ForVersion int32 Blackout *BlackoutRestriction Membership *MembershipRestriction Description string // Extra fields persisted with the above RestrictionId string CreateDateTime string AuthorUserId string EventVersion int32 }
func (*NewRestrictionInput) GetEventVersion ¶
func (r *NewRestrictionInput) GetEventVersion() int
func (*NewRestrictionInput) GetForVersion ¶
func (r *NewRestrictionInput) GetForVersion() int32
GetForVersion is called for duplicate suppression
func (*NewRestrictionInput) SetEventVersion ¶
func (r *NewRestrictionInput) SetEventVersion(Version int)
type NewUserInput ¶
type NewUserInput struct { // Fields received from the client // Email from client, remove before persisting, only persist EmailId ForVersion int32 Email string IsAdmin bool IsMember bool Nickname string // Extra fields persisted with the above IsSystem bool UserId string CreateDateTime string AuthorUserId string EmailId string State UserState EventVersion int32 }
NewUserInput is the GQL structure for creating a new user
func (*NewUserInput) GetEventVersion ¶
func (r *NewUserInput) GetEventVersion() int
GetEventVersion returns the version of the event
func (*NewUserInput) GetForVersion ¶
func (r *NewUserInput) GetForVersion() int32
GetForVersion is called for duplicate suppression
func (*NewUserInput) SetEventVersion ¶
func (r *NewUserInput) SetEventVersion(Version int)
SetEventVersion is called by the persist code to set the event version
type NewVersionEvent ¶
events sent from the browser (persisted to datastore)
func (*NewVersionEvent) GetEventVersion ¶
func (r *NewVersionEvent) GetEventVersion() int
func (*NewVersionEvent) SetEventVersion ¶
func (r *NewVersionEvent) SetEventVersion(Version int)
type NotificationReadInput ¶
type NotificationReadInput struct { // Fields received from the client ForVersion int32 NotificationId string // Extra fields persisted with the above CreateDateTime string AuthorUserId string EventVersion int32 }
func (*NotificationReadInput) GetEventVersion ¶
func (r *NotificationReadInput) GetEventVersion() int
GetEventVersion returns the version of the mutation event
func (*NotificationReadInput) GetForVersion ¶
func (r *NotificationReadInput) GetForVersion() int32
GetForVersion is called for duplicate suppression
func (*NotificationReadInput) SetEventVersion ¶
func (r *NotificationReadInput) SetEventVersion(Version int)
SetEventVersion is called by the persist code to set the event version
type PersistedEmail ¶
type UpdateBalanceInput ¶
type UpdateBalanceInput struct { // Fields received from the client ForVersion int32 UpdateForUserId string Amount int32 Description string Increase bool // Extra fields persisted with the above CreateDateTime string AuthorUserId string EventVersion int32 PaymentId string }
UpdateBalanceInput is the go struct corresponding to the input GQL
func (*UpdateBalanceInput) GetEventVersion ¶
func (r *UpdateBalanceInput) GetEventVersion() int
GetEventVersion called to get input version
func (*UpdateBalanceInput) GetForVersion ¶
func (r *UpdateBalanceInput) GetForVersion() int32
GetForVersion is called to check for duplicate requests
func (*UpdateBalanceInput) SetEventVersion ¶
func (r *UpdateBalanceInput) SetEventVersion(Version int)
SetEventVersion is called by the persist layer to set the version
type UpdateMembershipStatusInput ¶
type UpdateMembershipStatusInput struct { // Fields received from the client ForVersion int32 UpdateForUserId string RestrictionId string Purchase bool AdminUpdate bool Comment *string // Extra fields persisted with the above CreateDateTime string AuthorUserId string EventVersion int32 }
func (*UpdateMembershipStatusInput) GetEventVersion ¶
func (r *UpdateMembershipStatusInput) GetEventVersion() int
func (*UpdateMembershipStatusInput) GetForVersion ¶
func (r *UpdateMembershipStatusInput) GetForVersion() int32
func (*UpdateMembershipStatusInput) SetEventVersion ¶
func (r *UpdateMembershipStatusInput) SetEventVersion(Version int)
type UpdateSettingsInput ¶
type UpdateSettingsInput struct { // Fields received from the client ForVersion int32 PropertyName string Currency Currency MemberRate int32 AllowNonMembers bool NonMemberRate int32 Timezone string MinBalance int32 MaxOutDays int32 MinInDays int32 ReservationReminderDaysBefore int32 BalanceReminderIntervalDays int32 // Extra fields persisted with the above CreateDateTime string AuthorUserId string EventVersion int32 }
UpdateSettingsInput is the gql input for updating settings
func (*UpdateSettingsInput) GetEventVersion ¶
func (r *UpdateSettingsInput) GetEventVersion() int
GetEventVersion returns the version of the settings update event
func (*UpdateSettingsInput) GetForVersion ¶
func (r *UpdateSettingsInput) GetForVersion() int32
GetForVersion is called for duplicate suppression
func (*UpdateSettingsInput) SetEventVersion ¶
func (r *UpdateSettingsInput) SetEventVersion(Version int)
SetEventVersion is called by the persist code to set the event version
type UpdateSystemUserInput ¶
type UpdateSystemUserInput struct { // Fields received from the client // Email from client, remove before persisting, only persist EmailId ForVersion int32 Email string Nickname string // Extra fields persisted with the above UserID string UpdateDateTime string AuthorUserID string EmailID string EventVersion int32 }
UpdateSystemUserInput is the GQL structure for updating user information
func (*UpdateSystemUserInput) GetEventVersion ¶
func (r *UpdateSystemUserInput) GetEventVersion() int
GetEventVersion returns the version of the event
func (*UpdateSystemUserInput) GetForVersion ¶
func (r *UpdateSystemUserInput) GetForVersion() int32
GetForVersion is called for duplicate suppression
func (*UpdateSystemUserInput) SetEventVersion ¶
func (r *UpdateSystemUserInput) SetEventVersion(Version int)
SetEventVersion is called by the persist code to set the event version
type UpdateUserInput ¶
type UpdateUserInput struct { // Fields received from the client // Email from client, remove before persisting, only persist EmailId ForVersion int32 Email string IsAdmin bool IsMember bool Nickname string State UserState // Extra fields persisted with the above IsSystem bool UserId string UpdateDateTime string AuthorUserId string EmailId string EventVersion int32 }
UpdateUserInput is the GQL structure for updating user information
func (*UpdateUserInput) GetEventVersion ¶
func (r *UpdateUserInput) GetEventVersion() int
GetEventVersion returns the version of the event
func (*UpdateUserInput) GetForVersion ¶
func (r *UpdateUserInput) GetForVersion() int32
GetForVersion is called for duplicate suppression
func (*UpdateUserInput) SetEventVersion ¶
func (r *UpdateUserInput) SetEventVersion(Version int)
SetEventVersion is called by the persist code to set the event version
Notes ¶
Bugs ¶
remove propertyId from here - misleading
since after export/import it will be different
read notification code has not been completed