Documentation ¶
Index ¶
- Constants
- func GenLoadAddress(v viewer.ViewerContext, id string) <-chan *AddressResult
- func GenLoadAddressFromContext(ctx context.Context, id string) <-chan *AddressResult
- func GenLoadAddresses(v viewer.ViewerContext, ids ...string) <-chan *AddressesResult
- func GenLoadContact(v viewer.ViewerContext, id string) <-chan *ContactResult
- func GenLoadContactEmail(v viewer.ViewerContext, id string) <-chan *ContactEmailResult
- func GenLoadContactEmailFromContext(ctx context.Context, id string) <-chan *ContactEmailResult
- func GenLoadContactEmails(v viewer.ViewerContext, ids ...string) <-chan *ContactEmailsResult
- func GenLoadContactFromContext(ctx context.Context, id string) <-chan *ContactResult
- func GenLoadContacts(v viewer.ViewerContext, ids ...string) <-chan *ContactsResult
- func GenLoadEvent(v viewer.ViewerContext, id string) <-chan *EventResult
- func GenLoadEventFromContext(ctx context.Context, id string) <-chan *EventResult
- func GenLoadEvents(v viewer.ViewerContext, ids ...string) <-chan *EventsResult
- func GenLoadUser(v viewer.ViewerContext, id string) <-chan *UserResult
- func GenLoadUserFromContext(ctx context.Context, id string) <-chan *UserResult
- func GenLoadUsers(v viewer.ViewerContext, ids ...string) <-chan *UsersResult
- func LoadContactEmailIDFromContactID(contactID string) (string, error)
- func LoadContactIDFromEmailAddress(emailAddress string) (string, error)
- func LoadContactIDFromUserID(userID string) (string, error)
- func LoadUserIDFromEmailAddress(emailAddress string) (string, error)
- func LoadUserIDFromPhoneNumber(phoneNumber string) (string, error)
- func NewAddressLoader(v viewer.ViewerContext) *addressLoader
- func NewContactEmailLoader(v viewer.ViewerContext) *contactEmailLoader
- func NewContactLoader(v viewer.ViewerContext) *contactLoader
- func NewEventLoader(v viewer.ViewerContext) *eventLoader
- func NewUserLoader(v viewer.ViewerContext) *userLoader
- func ValidateEmailPassword(emailAddress, password string) (string, error)
- type Address
- type AddressResult
- type Addresses
- type AddressesResult
- type AllowIfViewerCanSeeAddressRule
- type AllowIfViewerCanSeeContactEmailRule
- type AllowIfViewerCanSeeContactRule
- type AllowIfViewerCanSeeEventRule
- type AllowIfViewerCanSeeUserRule
- type Contact
- func LoadContact(v viewer.ViewerContext, id string) (*Contact, error)
- func LoadContactFromContext(ctx context.Context, id string) (*Contact, error)
- func LoadContactFromEmailAddress(v viewer.ViewerContext, emailAddress string) (*Contact, error)
- func LoadContactFromUserID(v viewer.ViewerContext, userID string) (*Contact, error)
- func LoadContacts(v viewer.ViewerContext, ids ...string) ([]*Contact, error)
- func (contact *Contact) DBFields() ent.DBFields
- func (contact *Contact) GenAllowList() <-chan *UsersResult
- func (contact *Contact) GenAllowListEdges() <-chan *ent.AssocEdgesResult
- func (contact *Contact) GenContactEmails() <-chan *ContactEmailsResult
- func (contact *Contact) GenLoadAllowListEdgeFor(id2 string) <-chan *ent.AssocEdgeResult
- func (contact *Contact) GenUser() <-chan *UserResult
- func (contact *Contact) GetBaz() float64
- func (contact *Contact) GetContactBar(foo int) int
- func (contact *Contact) GetContactFoo() string
- func (contact *Contact) GetPrivacyPolicy() ent.PrivacyPolicy
- func (contact *Contact) GetType() ent.NodeType
- func (contact *Contact) GetViewer() viewer.ViewerContext
- func (contact Contact) IsNode()
- func (contact *Contact) LoadAllowList() ([]*User, error)
- func (contact *Contact) LoadAllowListEdgeFor(id2 string) (*ent.AssocEdge, error)
- func (contact *Contact) LoadAllowListEdges() ([]*ent.AssocEdge, error)
- func (contact *Contact) LoadContactEmails() ([]*ContactEmail, error)
- func (contact *Contact) LoadUser() (*User, error)
- type ContactEmail
- func LoadContactEmail(v viewer.ViewerContext, id string) (*ContactEmail, error)
- func LoadContactEmailFromContactID(v viewer.ViewerContext, contactID string) (*ContactEmail, error)
- func LoadContactEmailFromContext(ctx context.Context, id string) (*ContactEmail, error)
- func LoadContactEmails(v viewer.ViewerContext, ids ...string) ([]*ContactEmail, error)
- func (contactEmail *ContactEmail) DBFields() ent.DBFields
- func (contactEmail *ContactEmail) GenContact() <-chan *ContactResult
- func (contactEmail *ContactEmail) GetPrivacyPolicy() ent.PrivacyPolicy
- func (contactEmail *ContactEmail) GetType() ent.NodeType
- func (contactEmail *ContactEmail) GetViewer() viewer.ViewerContext
- func (contactEmail ContactEmail) IsNode()
- func (contactEmail *ContactEmail) LoadContact() (*Contact, error)
- type ContactEmailResult
- type ContactEmails
- type ContactEmailsResult
- type ContactResult
- type Contacts
- type ContactsResult
- type Event
- func (event *Event) DBFields() ent.DBFields
- func (event *Event) GenAttending() <-chan *UsersResult
- func (event *Event) GenAttendingEdges() <-chan *ent.AssocEdgesResult
- func (event *Event) GenCreator() <-chan *UserResult
- func (event *Event) GenCreatorEdge() <-chan *ent.AssocEdgeResult
- func (event *Event) GenDeclined() <-chan *UsersResult
- func (event *Event) GenDeclinedEdges() <-chan *ent.AssocEdgesResult
- func (event *Event) GenHosts() <-chan *UsersResult
- func (event *Event) GenHostsEdges() <-chan *ent.AssocEdgesResult
- func (event *Event) GenInvited() <-chan *UsersResult
- func (event *Event) GenInvitedEdges() <-chan *ent.AssocEdgesResult
- func (event *Event) GenLoadAttendingEdgeFor(id2 string) <-chan *ent.AssocEdgeResult
- func (event *Event) GenLoadCreatorEdgeFor(id2 string) <-chan *ent.AssocEdgeResult
- func (event *Event) GenLoadDeclinedEdgeFor(id2 string) <-chan *ent.AssocEdgeResult
- func (event *Event) GenLoadHostEdgeFor(id2 string) <-chan *ent.AssocEdgeResult
- func (event *Event) GenLoadInvitedEdgeFor(id2 string) <-chan *ent.AssocEdgeResult
- func (event *Event) GenUser() <-chan *UserResult
- func (event *Event) GetPrivacyPolicy() ent.PrivacyPolicy
- func (event *Event) GetType() ent.NodeType
- func (event *Event) GetViewer() viewer.ViewerContext
- func (event Event) IsNode()
- func (event *Event) LoadAttending() ([]*User, error)
- func (event *Event) LoadAttendingEdgeFor(id2 string) (*ent.AssocEdge, error)
- func (event *Event) LoadAttendingEdges() ([]*ent.AssocEdge, error)
- func (event *Event) LoadCreator() (*User, error)
- func (event *Event) LoadCreatorEdge() (*ent.AssocEdge, error)
- func (event *Event) LoadCreatorEdgeFor(id2 string) (*ent.AssocEdge, error)
- func (event *Event) LoadDeclined() ([]*User, error)
- func (event *Event) LoadDeclinedEdgeFor(id2 string) (*ent.AssocEdge, error)
- func (event *Event) LoadDeclinedEdges() ([]*ent.AssocEdge, error)
- func (event *Event) LoadHostEdgeFor(id2 string) (*ent.AssocEdge, error)
- func (event *Event) LoadHosts() ([]*User, error)
- func (event *Event) LoadHostsEdges() ([]*ent.AssocEdge, error)
- func (event *Event) LoadInvited() ([]*User, error)
- func (event *Event) LoadInvitedEdgeFor(id2 string) (*ent.AssocEdge, error)
- func (event *Event) LoadInvitedEdges() ([]*ent.AssocEdge, error)
- func (event *Event) LoadUser() (*User, error)
- func (event *Event) RsvpStatusMap() ent.AssocStatusMap
- func (event *Event) ViewerRsvpStatus() (*EventRsvpStatus, error)
- func (event *Event) ViewerRsvpStatusForGQL() (*string, error)
- type EventResult
- type EventRsvpStatus
- type Events
- type EventsResult
- type User
- func LoadUser(v viewer.ViewerContext, id string) (*User, error)
- func LoadUserFromContext(ctx context.Context, id string) (*User, error)
- func LoadUserFromEmailAddress(v viewer.ViewerContext, emailAddress string) (*User, error)
- func LoadUserFromPhoneNumber(v viewer.ViewerContext, phoneNumber string) (*User, error)
- func LoadUsers(v viewer.ViewerContext, ids ...string) ([]*User, error)
- func (user *User) Baz() *float64
- func (user *User) DBFields() ent.DBFields
- func (user *User) GenContacts() <-chan *ContactsResult
- func (user *User) GenDeclinedEvents() <-chan *EventsResult
- func (user *User) GenDeclinedEventsEdges() <-chan *ent.AssocEdgesResult
- func (user *User) GenEvents() <-chan *EventsResult
- func (user *User) GenEventsAttending() <-chan *EventsResult
- func (user *User) GenEventsAttendingEdges() <-chan *ent.AssocEdgesResult
- func (user *User) GenEventsEdges() <-chan *ent.AssocEdgesResult
- func (user *User) GenFamilyMembers() <-chan *UsersResult
- func (user *User) GenFamilyMembersEdges() <-chan *ent.AssocEdgesResult
- func (user *User) GenFriends() <-chan *UsersResult
- func (user *User) GenFriendsEdges() <-chan *ent.AssocEdgesResult
- func (user *User) GenInvitedEvents() <-chan *EventsResult
- func (user *User) GenInvitedEventsEdges() <-chan *ent.AssocEdgesResult
- func (user *User) GenLoadDeclinedEventEdgeFor(id2 string) <-chan *ent.AssocEdgeResult
- func (user *User) GenLoadEventEdgeFor(id2 string) <-chan *ent.AssocEdgeResult
- func (user *User) GenLoadEventsAttendingEdgeFor(id2 string) <-chan *ent.AssocEdgeResult
- func (user *User) GenLoadFamilyMemberEdgeFor(id2 string) <-chan *ent.AssocEdgeResult
- func (user *User) GenLoadFriendEdgeFor(id2 string) <-chan *ent.AssocEdgeResult
- func (user *User) GenLoadInvitedEventEdgeFor(id2 string) <-chan *ent.AssocEdgeResult
- func (user *User) GetPrivacyPolicy() ent.PrivacyPolicy
- func (user *User) GetType() ent.NodeType
- func (user *User) GetUserFoo() string
- func (user *User) GetViewer() viewer.ViewerContext
- func (user User) IsNode()
- func (user *User) LoadContacts() ([]*Contact, error)
- func (user *User) LoadDeclinedEventEdgeFor(id2 string) (*ent.AssocEdge, error)
- func (user *User) LoadDeclinedEvents() ([]*Event, error)
- func (user *User) LoadDeclinedEventsEdges() ([]*ent.AssocEdge, error)
- func (user *User) LoadEventEdgeFor(id2 string) (*ent.AssocEdge, error)
- func (user *User) LoadEvents() ([]*Event, error)
- func (user *User) LoadEventsAttending() ([]*Event, error)
- func (user *User) LoadEventsAttendingEdgeFor(id2 string) (*ent.AssocEdge, error)
- func (user *User) LoadEventsAttendingEdges() ([]*ent.AssocEdge, error)
- func (user *User) LoadEventsEdges() ([]*ent.AssocEdge, error)
- func (user *User) LoadFamilyMemberEdgeFor(id2 string) (*ent.AssocEdge, error)
- func (user *User) LoadFamilyMembers() ([]*User, error)
- func (user *User) LoadFamilyMembersEdges() ([]*ent.AssocEdge, error)
- func (user *User) LoadFriendEdgeFor(id2 string) (*ent.AssocEdge, error)
- func (user *User) LoadFriends() ([]*User, error)
- func (user *User) LoadFriendsEdges() ([]*ent.AssocEdge, error)
- func (user *User) LoadInvitedEventEdgeFor(id2 string) (*ent.AssocEdge, error)
- func (user *User) LoadInvitedEvents() ([]*Event, error)
- func (user *User) LoadInvitedEventsEdges() ([]*ent.AssocEdge, error)
- func (user *User) UnsupportedScan() bool
- type UserResult
- type Users
- type UsersResult
Constants ¶
const ( // ContactType is the node type for the Contact object. Used to identify this node in edges and other places. ContactType ent.NodeType = "contact" // ContactToAllowListEdge is the edgeType for the contact to allowlist edge. ContactToAllowListEdge ent.EdgeType = "f6ecacb9-1d4f-47bb-8f18-f7d544450ea2" )
const ( // EventType is the node type for the Event object. Used to identify this node in edges and other places. EventType ent.NodeType = "event" // EventToAttendingEdge is the edgeType for the event to attending edge. EventToAttendingEdge ent.EdgeType = "9f384bf7-af59-4a41-8b67-8ecc659524c6" // EventToCreatorEdge is the edgeType for the event to creator edge. EventToCreatorEdge ent.EdgeType = "eb45df04-a2ce-4d20-9325-ef6ddb7c5c31" // EventToDeclinedEdge is the edgeType for the event to declined edge. EventToDeclinedEdge ent.EdgeType = "d7b9e19a-4214-4376-927c-58b98913dbb7" // EventToHostsEdge is the edgeType for the event to hosts edge. EventToHostsEdge ent.EdgeType = "06a23665-6e2c-413a-bbb0-f53222c313dd" // EventToInvitedEdge is the edgeType for the event to invited edge. EventToInvitedEdge ent.EdgeType = "12a5ac62-1f9a-4fd7-b38f-a6d229ace12c" // EventAttending is the edge representing the status for the Attending edge. EventAttending EventRsvpStatus = "event_attending" // EventDeclined is the edge representing the status for the Declined edge. EventDeclined EventRsvpStatus = "event_declined" // EventInvited is the edge representing the status for the Invited edge. EventInvited EventRsvpStatus = "event_invited" // EventUnknown is the edge representing the unknown status for the RsvpStatus edgegroup. EventUnknown EventRsvpStatus = "event_unknown" )
const ( // UserType is the node type for the User object. Used to identify this node in edges and other places. UserType ent.NodeType = "user" // UserToDeclinedEventsEdge is the edgeType for the user to declinedevents edge. UserToDeclinedEventsEdge ent.EdgeType = "14f2d5b4-d0fd-4088-ba25-e417ab40307c" // UserToEventsAttendingEdge is the edgeType for the user to eventsattending edge. UserToEventsAttendingEdge ent.EdgeType = "4afef8fc-f75a-406e-aafc-8b571980e6ef" // UserToEventsEdge is the edgeType for the user to events edge. UserToEventsEdge ent.EdgeType = "41bddf81-0c26-432c-9133-2f093af2c07c" // UserToFamilyMembersEdge is the edgeType for the user to familymembers edge. UserToFamilyMembersEdge ent.EdgeType = "38176101-6adc-4e0d-bd36-08cdc45f5ed2" // UserToFriendsEdge is the edgeType for the user to friends edge. UserToFriendsEdge ent.EdgeType = "d78d13dc-85d6-4f55-a72d-5dbcdc36131d" // UserToInvitedEventsEdge is the edgeType for the user to invitedevents edge. UserToInvitedEventsEdge ent.EdgeType = "e89302ca-c76b-41ad-a823-9e3964b821dd" )
const ( // AddressType is the node type for the Address object. Used to identify this node in edges and other places. AddressType ent.NodeType = "address" )
const ( // ContactEmailType is the node type for the ContactEmail object. Used to identify this node in edges and other places. ContactEmailType ent.NodeType = "contactEmail" )
Variables ¶
This section is empty.
Functions ¶
func GenLoadAddress ¶
func GenLoadAddress(v viewer.ViewerContext, id string) <-chan *AddressResult
GenLoadAddress loads the given Address given the id
func GenLoadAddressFromContext ¶
func GenLoadAddressFromContext(ctx context.Context, id string) <-chan *AddressResult
GenLoadAddressFromContext loads the given Address given the context and id
func GenLoadAddresses ¶
func GenLoadAddresses(v viewer.ViewerContext, ids ...string) <-chan *AddressesResult
GenLoadAddresses loads multiple Addresses given the ids
func GenLoadContact ¶
func GenLoadContact(v viewer.ViewerContext, id string) <-chan *ContactResult
GenLoadContact loads the given Contact given the id
func GenLoadContactEmail ¶
func GenLoadContactEmail(v viewer.ViewerContext, id string) <-chan *ContactEmailResult
GenLoadContactEmail loads the given ContactEmail given the id
func GenLoadContactEmailFromContext ¶
func GenLoadContactEmailFromContext(ctx context.Context, id string) <-chan *ContactEmailResult
GenLoadContactEmailFromContext loads the given ContactEmail given the context and id
func GenLoadContactEmails ¶
func GenLoadContactEmails(v viewer.ViewerContext, ids ...string) <-chan *ContactEmailsResult
GenLoadContactEmails loads multiple ContactEmails given the ids
func GenLoadContactFromContext ¶
func GenLoadContactFromContext(ctx context.Context, id string) <-chan *ContactResult
GenLoadContactFromContext loads the given Contact given the context and id
func GenLoadContacts ¶
func GenLoadContacts(v viewer.ViewerContext, ids ...string) <-chan *ContactsResult
GenLoadContacts loads multiple Contacts given the ids
func GenLoadEvent ¶
func GenLoadEvent(v viewer.ViewerContext, id string) <-chan *EventResult
GenLoadEvent loads the given Event given the id
func GenLoadEventFromContext ¶
func GenLoadEventFromContext(ctx context.Context, id string) <-chan *EventResult
GenLoadEventFromContext loads the given Event given the context and id
func GenLoadEvents ¶
func GenLoadEvents(v viewer.ViewerContext, ids ...string) <-chan *EventsResult
GenLoadEvents loads multiple Events given the ids
func GenLoadUser ¶
func GenLoadUser(v viewer.ViewerContext, id string) <-chan *UserResult
GenLoadUser loads the given User given the id
func GenLoadUserFromContext ¶
func GenLoadUserFromContext(ctx context.Context, id string) <-chan *UserResult
GenLoadUserFromContext loads the given User given the context and id
func GenLoadUsers ¶
func GenLoadUsers(v viewer.ViewerContext, ids ...string) <-chan *UsersResult
GenLoadUsers loads multiple Users given the ids
func LoadContactIDFromUserID ¶
func NewAddressLoader ¶
func NewAddressLoader(v viewer.ViewerContext) *addressLoader
NewAddressLoader returns a new addressLoader which is used to load one or more Addresses
func NewContactEmailLoader ¶
func NewContactEmailLoader(v viewer.ViewerContext) *contactEmailLoader
NewContactEmailLoader returns a new contactEmailLoader which is used to load one or more ContactEmails
func NewContactLoader ¶
func NewContactLoader(v viewer.ViewerContext) *contactLoader
NewContactLoader returns a new contactLoader which is used to load one or more Contacts
func NewEventLoader ¶
func NewEventLoader(v viewer.ViewerContext) *eventLoader
NewEventLoader returns a new eventLoader which is used to load one or more Events
func NewUserLoader ¶
func NewUserLoader(v viewer.ViewerContext) *userLoader
NewUserLoader returns a new userLoader which is used to load one or more Users
func ValidateEmailPassword ¶
Types ¶
type Address ¶
type Address struct { ent.Node privacy.AlwaysDenyPrivacyPolicy City string `db:"city"` Country string `db:"country"` ResidentNames []string `db:"resident_names"` State string `db:"state"` StreetAddress string `db:"street_address"` Zip string `db:"zip"` // contains filtered or unexported fields }
Address represents the `Address` model
func LoadAddress ¶
func LoadAddress(v viewer.ViewerContext, id string) (*Address, error)
LoadAddress loads the given Address given the viewer and id
func LoadAddressFromContext ¶
LoadAddressFromContext loads the given Address given the context and id
func LoadAddresses ¶
func LoadAddresses(v viewer.ViewerContext, ids ...string) ([]*Address, error)
LoadAddresses loads multiple Addresses given the ids
func (*Address) DBFields ¶
DBFields is used by the ent framework to load the ent from the underlying database
func (*Address) GetViewer ¶
func (address *Address) GetViewer() viewer.ViewerContext
GetViewer returns the viewer for this entity.
func (Address) IsNode ¶
func (address Address) IsNode()
IsNode is needed by gqlgen to indicate that this implements the Node interface in GraphQL
func (*Address) UnsupportedScan ¶
UnsupportedScan flags that we can't call StructScan() on the ent to get data out of the db, have to always use MapScan() and DBFields() method above
type AddressResult ¶
AddressResult stores the result of loading a Address. It's a tuple type which has 2 fields: a Address and an error
func (*AddressResult) Error ¶
func (res *AddressResult) Error() string
type AddressesResult ¶
AddressesResult stores the result of loading a slice of Addresss. It's a tuple type which has 2 fields: a []*Address and an error
func (*AddressesResult) Error ¶
func (res *AddressesResult) Error() string
type AllowIfViewerCanSeeAddressRule ¶
type AllowIfViewerCanSeeAddressRule struct {
AddressID string
}
AllowIfViewerCanSeeAddressRule is a reusable rule that can be called by different ents to see if the contact can be visible
func (AllowIfViewerCanSeeAddressRule) Eval ¶
func (rule AllowIfViewerCanSeeAddressRule) Eval(v viewer.ViewerContext, entity ent.Entity) ent.PrivacyResult
Eval evaluates that the ent is visible to the user
type AllowIfViewerCanSeeContactEmailRule ¶
type AllowIfViewerCanSeeContactEmailRule struct {
ContactEmailID string
}
AllowIfViewerCanSeeContactEmailRule is a reusable rule that can be called by different ents to see if the contact can be visible
func (AllowIfViewerCanSeeContactEmailRule) Eval ¶
func (rule AllowIfViewerCanSeeContactEmailRule) Eval(v viewer.ViewerContext, entity ent.Entity) ent.PrivacyResult
Eval evaluates that the ent is visible to the user
type AllowIfViewerCanSeeContactRule ¶
type AllowIfViewerCanSeeContactRule struct {
ContactID string
}
AllowIfViewerCanSeeContactRule is a reusable rule that can be called by different ents to see if the contact can be visible
func (AllowIfViewerCanSeeContactRule) Eval ¶
func (rule AllowIfViewerCanSeeContactRule) Eval(v viewer.ViewerContext, entity ent.Entity) ent.PrivacyResult
Eval evaluates that the ent is visible to the user
type AllowIfViewerCanSeeEventRule ¶
type AllowIfViewerCanSeeEventRule struct {
EventID string
}
AllowIfViewerCanSeeEventRule is a reusable rule that can be called by different ents to see if the contact can be visible
func (AllowIfViewerCanSeeEventRule) Eval ¶
func (rule AllowIfViewerCanSeeEventRule) Eval(v viewer.ViewerContext, entity ent.Entity) ent.PrivacyResult
Eval evaluates that the ent is visible to the user
type AllowIfViewerCanSeeUserRule ¶
type AllowIfViewerCanSeeUserRule struct {
UserID string
}
AllowIfViewerCanSeeUserRule is a reusable rule that can be called by different ents to see if the contact can be visible
func (AllowIfViewerCanSeeUserRule) Eval ¶
func (rule AllowIfViewerCanSeeUserRule) Eval(v viewer.ViewerContext, entity ent.Entity) ent.PrivacyResult
Eval evaluates that the ent is visible to the user
type Contact ¶
type Contact struct { ent.Node privacy.AlwaysDenyPrivacyPolicy EmailAddress string `db:"email_address"` FirstName string `db:"first_name"` LastName string `db:"last_name"` UserID string `db:"user_id"` Favorite *bool `db:"favorite" graphql:"_"` NumberOfCalls *int `db:"number_of_calls" graphql:"_"` Pi *float64 `db:"pi" graphql:"_"` // contains filtered or unexported fields }
Contact represents the `Contact` model
func LoadContact ¶
func LoadContact(v viewer.ViewerContext, id string) (*Contact, error)
LoadContact loads the given Contact given the viewer and id
func LoadContactFromContext ¶
LoadContactFromContext loads the given Contact given the context and id
func LoadContactFromEmailAddress ¶
func LoadContactFromEmailAddress(v viewer.ViewerContext, emailAddress string) (*Contact, error)
func LoadContactFromUserID ¶
func LoadContactFromUserID(v viewer.ViewerContext, userID string) (*Contact, error)
func LoadContacts ¶
func LoadContacts(v viewer.ViewerContext, ids ...string) ([]*Contact, error)
LoadContacts loads multiple Contacts given the ids
func (*Contact) DBFields ¶
DBFields is used by the ent framework to load the ent from the underlying database
func (*Contact) GenAllowList ¶
func (contact *Contact) GenAllowList() <-chan *UsersResult
GenAllowList returns the Users associated with the Contact instance
func (*Contact) GenAllowListEdges ¶
func (contact *Contact) GenAllowListEdges() <-chan *ent.AssocEdgesResult
GenAllowListEdges returns the User edges associated with the Contact instance
func (*Contact) GenContactEmails ¶
func (contact *Contact) GenContactEmails() <-chan *ContactEmailsResult
GenContactEmails returns the ContactEmails associated with the Contact instance
func (*Contact) GenLoadAllowListEdgeFor ¶
func (contact *Contact) GenLoadAllowListEdgeFor(id2 string) <-chan *ent.AssocEdgeResult
GenAllowListEdgeFor provides a concurrent API to load the ent.AssocEdge between the current node and the given id2 for the AllowList edge.
func (*Contact) GenUser ¶
func (contact *Contact) GenUser() <-chan *UserResult
GenUser returns the User associated with the Contact instance
func (*Contact) GetContactBar ¶
func (*Contact) GetContactFoo ¶
GetContactFoo blah blah blah @graphql
func (*Contact) GetPrivacyPolicy ¶
func (contact *Contact) GetPrivacyPolicy() ent.PrivacyPolicy
GetPrivacyPolicy returns the privacy policy for evaluating if the contact is visible to the viewer
func (*Contact) GetViewer ¶
func (contact *Contact) GetViewer() viewer.ViewerContext
GetViewer returns the viewer for this entity.
func (Contact) IsNode ¶
func (contact Contact) IsNode()
IsNode is needed by gqlgen to indicate that this implements the Node interface in GraphQL
func (*Contact) LoadAllowList ¶
LoadAllowList returns the Users associated with the Contact instance
func (*Contact) LoadAllowListEdgeFor ¶
LoadAllowListEdgeFor loads the ent.AssocEdge between the current node and the given id2 for the AllowList edge.
func (*Contact) LoadAllowListEdges ¶
LoadAllowListEdges returns the AllowList edges associated with the Contact instance
func (*Contact) LoadContactEmails ¶
func (contact *Contact) LoadContactEmails() ([]*ContactEmail, error)
LoadContactEmails returns the ContactEmails associated with the Contact instance
type ContactEmail ¶
type ContactEmail struct { ent.Node privacy.AlwaysDenyPrivacyPolicy EmailAddress string `db:"email_address"` Label string `db:"label"` ContactID string `db:"contact_id"` // contains filtered or unexported fields }
ContactEmail represents the `ContactEmail` model
func LoadContactEmail ¶
func LoadContactEmail(v viewer.ViewerContext, id string) (*ContactEmail, error)
LoadContactEmail loads the given ContactEmail given the viewer and id
func LoadContactEmailFromContactID ¶
func LoadContactEmailFromContactID(v viewer.ViewerContext, contactID string) (*ContactEmail, error)
func LoadContactEmailFromContext ¶
func LoadContactEmailFromContext(ctx context.Context, id string) (*ContactEmail, error)
LoadContactEmailFromContext loads the given ContactEmail given the context and id
func LoadContactEmails ¶
func LoadContactEmails(v viewer.ViewerContext, ids ...string) ([]*ContactEmail, error)
LoadContactEmails loads multiple ContactEmails given the ids
func (*ContactEmail) DBFields ¶
func (contactEmail *ContactEmail) DBFields() ent.DBFields
DBFields is used by the ent framework to load the ent from the underlying database
func (*ContactEmail) GenContact ¶
func (contactEmail *ContactEmail) GenContact() <-chan *ContactResult
GenContact returns the Contact associated with the ContactEmail instance
func (*ContactEmail) GetPrivacyPolicy ¶
func (contactEmail *ContactEmail) GetPrivacyPolicy() ent.PrivacyPolicy
GetPrivacyPolicy returns the privacy policy for evaluating if the contactEmail is visible to the viewer
func (*ContactEmail) GetType ¶
func (contactEmail *ContactEmail) GetType() ent.NodeType
GetType returns the NodeType of this entity. In this case: ContactType
func (*ContactEmail) GetViewer ¶
func (contactEmail *ContactEmail) GetViewer() viewer.ViewerContext
GetViewer returns the viewer for this entity.
func (ContactEmail) IsNode ¶
func (contactEmail ContactEmail) IsNode()
IsNode is needed by gqlgen to indicate that this implements the Node interface in GraphQL
func (*ContactEmail) LoadContact ¶
func (contactEmail *ContactEmail) LoadContact() (*Contact, error)
LoadContact returns the Contact associated with the ContactEmail instance
type ContactEmailResult ¶
type ContactEmailResult struct { ContactEmail *ContactEmail Err error }
ContactEmailResult stores the result of loading a ContactEmail. It's a tuple type which has 2 fields: a ContactEmail and an error
func (*ContactEmailResult) Error ¶
func (res *ContactEmailResult) Error() string
type ContactEmails ¶
type ContactEmails map[string]*ContactEmail
type ContactEmailsResult ¶
type ContactEmailsResult struct { ContactEmails []*ContactEmail Err error }
ContactEmailsResult stores the result of loading a slice of ContactEmails. It's a tuple type which has 2 fields: a []*ContactEmail and an error
func (*ContactEmailsResult) Error ¶
func (res *ContactEmailsResult) Error() string
type ContactResult ¶
ContactResult stores the result of loading a Contact. It's a tuple type which has 2 fields: a Contact and an error
func (*ContactResult) Error ¶
func (res *ContactResult) Error() string
type ContactsResult ¶
ContactsResult stores the result of loading a slice of Contacts. It's a tuple type which has 2 fields: a []*Contact and an error
func (*ContactsResult) Error ¶
func (res *ContactsResult) Error() string
type Event ¶
type Event struct { ent.Node privacy.AlwaysDenyPrivacyPolicy EndTime *time.Time `db:"end_time"` Location string `db:"location"` Name string `db:"name"` StartTime time.Time `db:"start_time"` UserID string `db:"user_id"` // contains filtered or unexported fields }
Event represents the `Event` model
func LoadEvent ¶
func LoadEvent(v viewer.ViewerContext, id string) (*Event, error)
LoadEvent loads the given Event given the viewer and id
func LoadEventFromContext ¶
LoadEventFromContext loads the given Event given the context and id
func LoadEvents ¶
func LoadEvents(v viewer.ViewerContext, ids ...string) ([]*Event, error)
LoadEvents loads multiple Events given the ids
func (*Event) DBFields ¶
DBFields is used by the ent framework to load the ent from the underlying database
func (*Event) GenAttending ¶
func (event *Event) GenAttending() <-chan *UsersResult
GenAttending returns the Users associated with the Event instance
func (*Event) GenAttendingEdges ¶
func (event *Event) GenAttendingEdges() <-chan *ent.AssocEdgesResult
GenAttendingEdges returns the User edges associated with the Event instance
func (*Event) GenCreator ¶
func (event *Event) GenCreator() <-chan *UserResult
GenCreator returns the User associated with the Event instance
func (*Event) GenCreatorEdge ¶
func (event *Event) GenCreatorEdge() <-chan *ent.AssocEdgeResult
GenCreatorEdge returns the Creator edge associated with the Event instance
func (*Event) GenDeclined ¶
func (event *Event) GenDeclined() <-chan *UsersResult
GenDeclined returns the Users associated with the Event instance
func (*Event) GenDeclinedEdges ¶
func (event *Event) GenDeclinedEdges() <-chan *ent.AssocEdgesResult
GenDeclinedEdges returns the User edges associated with the Event instance
func (*Event) GenHosts ¶
func (event *Event) GenHosts() <-chan *UsersResult
GenHosts returns the Users associated with the Event instance
func (*Event) GenHostsEdges ¶
func (event *Event) GenHostsEdges() <-chan *ent.AssocEdgesResult
GenHostsEdges returns the User edges associated with the Event instance
func (*Event) GenInvited ¶
func (event *Event) GenInvited() <-chan *UsersResult
GenInvited returns the Users associated with the Event instance
func (*Event) GenInvitedEdges ¶
func (event *Event) GenInvitedEdges() <-chan *ent.AssocEdgesResult
GenInvitedEdges returns the User edges associated with the Event instance
func (*Event) GenLoadAttendingEdgeFor ¶
func (event *Event) GenLoadAttendingEdgeFor(id2 string) <-chan *ent.AssocEdgeResult
GenAttendingEdgeFor provides a concurrent API to load the ent.AssocEdge between the current node and the given id2 for the Attending edge.
func (*Event) GenLoadCreatorEdgeFor ¶
func (event *Event) GenLoadCreatorEdgeFor(id2 string) <-chan *ent.AssocEdgeResult
GenCreatorEdgeFor provides a concurrent API to load the ent.AssocEdge between the current node and the given id2 for the Creator edge.
func (*Event) GenLoadDeclinedEdgeFor ¶
func (event *Event) GenLoadDeclinedEdgeFor(id2 string) <-chan *ent.AssocEdgeResult
GenDeclinedEdgeFor provides a concurrent API to load the ent.AssocEdge between the current node and the given id2 for the Declined edge.
func (*Event) GenLoadHostEdgeFor ¶
func (event *Event) GenLoadHostEdgeFor(id2 string) <-chan *ent.AssocEdgeResult
GenHostEdgeFor provides a concurrent API to load the ent.AssocEdge between the current node and the given id2 for the Hosts edge.
func (*Event) GenLoadInvitedEdgeFor ¶
func (event *Event) GenLoadInvitedEdgeFor(id2 string) <-chan *ent.AssocEdgeResult
GenInvitedEdgeFor provides a concurrent API to load the ent.AssocEdge between the current node and the given id2 for the Invited edge.
func (*Event) GenUser ¶
func (event *Event) GenUser() <-chan *UserResult
GenUser returns the User associated with the Event instance
func (*Event) GetPrivacyPolicy ¶
func (event *Event) GetPrivacyPolicy() ent.PrivacyPolicy
GetPrivacyPolicy returns the privacy policy for evaluating if the Event is visible to the viewer
func (*Event) GetViewer ¶
func (event *Event) GetViewer() viewer.ViewerContext
GetViewer returns the viewer for this entity.
func (Event) IsNode ¶
func (event Event) IsNode()
IsNode is needed by gqlgen to indicate that this implements the Node interface in GraphQL
func (*Event) LoadAttending ¶
LoadAttending returns the Users associated with the Event instance
func (*Event) LoadAttendingEdgeFor ¶
LoadAttendingEdgeFor loads the ent.AssocEdge between the current node and the given id2 for the Attending edge.
func (*Event) LoadAttendingEdges ¶
LoadAttendingEdges returns the Attending edges associated with the Event instance
func (*Event) LoadCreator ¶
LoadCreator returns the User associated with the Event instance
func (*Event) LoadCreatorEdge ¶
LoadCreatorEdge returns the Creator edge associated with the Event instance
func (*Event) LoadCreatorEdgeFor ¶
LoadCreatorEdgeFor loads the ent.AssocEdge between the current node and the given id2 for the Creator edge.
func (*Event) LoadDeclined ¶
LoadDeclined returns the Users associated with the Event instance
func (*Event) LoadDeclinedEdgeFor ¶
LoadDeclinedEdgeFor loads the ent.AssocEdge between the current node and the given id2 for the Declined edge.
func (*Event) LoadDeclinedEdges ¶
LoadDeclinedEdges returns the Declined edges associated with the Event instance
func (*Event) LoadHostEdgeFor ¶
LoadHostEdgeFor loads the ent.AssocEdge between the current node and the given id2 for the Hosts edge.
func (*Event) LoadHostsEdges ¶
LoadHostsEdges returns the Hosts edges associated with the Event instance
func (*Event) LoadInvited ¶
LoadInvited returns the Users associated with the Event instance
func (*Event) LoadInvitedEdgeFor ¶
LoadInvitedEdgeFor loads the ent.AssocEdge between the current node and the given id2 for the Invited edge.
func (*Event) LoadInvitedEdges ¶
LoadInvitedEdges returns the Invited edges associated with the Event instance
func (*Event) RsvpStatusMap ¶
func (event *Event) RsvpStatusMap() ent.AssocStatusMap
func (*Event) ViewerRsvpStatus ¶
func (event *Event) ViewerRsvpStatus() (*EventRsvpStatus, error)
func (*Event) ViewerRsvpStatusForGQL ¶
type EventResult ¶
EventResult stores the result of loading a Event. It's a tuple type which has 2 fields: a Event and an error
func (*EventResult) Error ¶
func (res *EventResult) Error() string
type EventRsvpStatus ¶
type EventRsvpStatus string
type EventsResult ¶
EventsResult stores the result of loading a slice of Events. It's a tuple type which has 2 fields: a []*Event and an error
func (*EventsResult) Error ¶
func (res *EventsResult) Error() string
type User ¶
type User struct { ent.Node privacy.AlwaysDenyPrivacyPolicy Bio *string `db:"bio"` EmailAddress string `db:"email_address"` FirstName string `db:"first_name"` LastName string `db:"last_name"` PhoneNumber *string `db:"phone_number"` // contains filtered or unexported fields }
User represents the `User` model
func LoadUser ¶
func LoadUser(v viewer.ViewerContext, id string) (*User, error)
LoadUser loads the given User given the viewer and id
func LoadUserFromContext ¶
LoadUserFromContext loads the given User given the context and id
func LoadUserFromEmailAddress ¶
func LoadUserFromEmailAddress(v viewer.ViewerContext, emailAddress string) (*User, error)
func LoadUserFromPhoneNumber ¶
func LoadUserFromPhoneNumber(v viewer.ViewerContext, phoneNumber string) (*User, error)
func LoadUsers ¶
func LoadUsers(v viewer.ViewerContext, ids ...string) ([]*User, error)
LoadUsers loads multiple Users given the ids
func (*User) DBFields ¶
DBFields is used by the ent framework to load the ent from the underlying database
func (*User) GenContacts ¶
func (user *User) GenContacts() <-chan *ContactsResult
GenContacts returns the Contacts associated with the User instance
func (*User) GenDeclinedEvents ¶
func (user *User) GenDeclinedEvents() <-chan *EventsResult
GenDeclinedEvents returns the Events associated with the User instance
func (*User) GenDeclinedEventsEdges ¶
func (user *User) GenDeclinedEventsEdges() <-chan *ent.AssocEdgesResult
GenDeclinedEventsEdges returns the Event edges associated with the User instance
func (*User) GenEvents ¶
func (user *User) GenEvents() <-chan *EventsResult
GenEvents returns the Events associated with the User instance
func (*User) GenEventsAttending ¶
func (user *User) GenEventsAttending() <-chan *EventsResult
GenEventsAttending returns the Events associated with the User instance
func (*User) GenEventsAttendingEdges ¶
func (user *User) GenEventsAttendingEdges() <-chan *ent.AssocEdgesResult
GenEventsAttendingEdges returns the Event edges associated with the User instance
func (*User) GenEventsEdges ¶
func (user *User) GenEventsEdges() <-chan *ent.AssocEdgesResult
GenEventsEdges returns the Event edges associated with the User instance
func (*User) GenFamilyMembers ¶
func (user *User) GenFamilyMembers() <-chan *UsersResult
GenFamilyMembers returns the Users associated with the User instance
func (*User) GenFamilyMembersEdges ¶
func (user *User) GenFamilyMembersEdges() <-chan *ent.AssocEdgesResult
GenFamilyMembersEdges returns the User edges associated with the User instance
func (*User) GenFriends ¶
func (user *User) GenFriends() <-chan *UsersResult
GenFriends returns the Users associated with the User instance
func (*User) GenFriendsEdges ¶
func (user *User) GenFriendsEdges() <-chan *ent.AssocEdgesResult
GenFriendsEdges returns the User edges associated with the User instance
func (*User) GenInvitedEvents ¶
func (user *User) GenInvitedEvents() <-chan *EventsResult
GenInvitedEvents returns the Events associated with the User instance
func (*User) GenInvitedEventsEdges ¶
func (user *User) GenInvitedEventsEdges() <-chan *ent.AssocEdgesResult
GenInvitedEventsEdges returns the Event edges associated with the User instance
func (*User) GenLoadDeclinedEventEdgeFor ¶
func (user *User) GenLoadDeclinedEventEdgeFor(id2 string) <-chan *ent.AssocEdgeResult
GenDeclinedEventEdgeFor provides a concurrent API to load the ent.AssocEdge between the current node and the given id2 for the DeclinedEvents edge.
func (*User) GenLoadEventEdgeFor ¶
func (user *User) GenLoadEventEdgeFor(id2 string) <-chan *ent.AssocEdgeResult
GenEventEdgeFor provides a concurrent API to load the ent.AssocEdge between the current node and the given id2 for the Events edge.
func (*User) GenLoadEventsAttendingEdgeFor ¶
func (user *User) GenLoadEventsAttendingEdgeFor(id2 string) <-chan *ent.AssocEdgeResult
GenEventsAttendingEdgeFor provides a concurrent API to load the ent.AssocEdge between the current node and the given id2 for the EventsAttending edge.
func (*User) GenLoadFamilyMemberEdgeFor ¶
func (user *User) GenLoadFamilyMemberEdgeFor(id2 string) <-chan *ent.AssocEdgeResult
GenFamilyMemberEdgeFor provides a concurrent API to load the ent.AssocEdge between the current node and the given id2 for the FamilyMembers edge.
func (*User) GenLoadFriendEdgeFor ¶
func (user *User) GenLoadFriendEdgeFor(id2 string) <-chan *ent.AssocEdgeResult
GenFriendEdgeFor provides a concurrent API to load the ent.AssocEdge between the current node and the given id2 for the Friends edge.
func (*User) GenLoadInvitedEventEdgeFor ¶
func (user *User) GenLoadInvitedEventEdgeFor(id2 string) <-chan *ent.AssocEdgeResult
GenInvitedEventEdgeFor provides a concurrent API to load the ent.AssocEdge between the current node and the given id2 for the InvitedEvents edge.
func (*User) GetPrivacyPolicy ¶
func (user *User) GetPrivacyPolicy() ent.PrivacyPolicy
GetPrivacyPolicy returns the privacy policy for evaluating if the user is visible to the viewer
func (*User) GetViewer ¶
func (user *User) GetViewer() viewer.ViewerContext
GetViewer returns the viewer for this entity.
func (User) IsNode ¶
func (user User) IsNode()
IsNode is needed by gqlgen to indicate that this implements the Node interface in GraphQL
func (*User) LoadContacts ¶
LoadContacts returns the Contacts associated with the User instance
func (*User) LoadDeclinedEventEdgeFor ¶
LoadDeclinedEventEdgeFor loads the ent.AssocEdge between the current node and the given id2 for the DeclinedEvents edge.
func (*User) LoadDeclinedEvents ¶
LoadDeclinedEvents returns the Events associated with the User instance
func (*User) LoadDeclinedEventsEdges ¶
LoadDeclinedEventsEdges returns the DeclinedEvents edges associated with the User instance
func (*User) LoadEventEdgeFor ¶
LoadEventEdgeFor loads the ent.AssocEdge between the current node and the given id2 for the Events edge.
func (*User) LoadEvents ¶
LoadEvents returns the Events associated with the User instance
func (*User) LoadEventsAttending ¶
LoadEventsAttending returns the Events associated with the User instance
func (*User) LoadEventsAttendingEdgeFor ¶
LoadEventsAttendingEdgeFor loads the ent.AssocEdge between the current node and the given id2 for the EventsAttending edge.
func (*User) LoadEventsAttendingEdges ¶
LoadEventsAttendingEdges returns the EventsAttending edges associated with the User instance
func (*User) LoadEventsEdges ¶
LoadEventsEdges returns the Events edges associated with the User instance
func (*User) LoadFamilyMemberEdgeFor ¶
LoadFamilyMemberEdgeFor loads the ent.AssocEdge between the current node and the given id2 for the FamilyMembers edge.
func (*User) LoadFamilyMembers ¶
LoadFamilyMembers returns the Users associated with the User instance
func (*User) LoadFamilyMembersEdges ¶
LoadFamilyMembersEdges returns the FamilyMembers edges associated with the User instance
func (*User) LoadFriendEdgeFor ¶
LoadFriendEdgeFor loads the ent.AssocEdge between the current node and the given id2 for the Friends edge.
func (*User) LoadFriends ¶
LoadFriends returns the Users associated with the User instance
func (*User) LoadFriendsEdges ¶
LoadFriendsEdges returns the Friends edges associated with the User instance
func (*User) LoadInvitedEventEdgeFor ¶
LoadInvitedEventEdgeFor loads the ent.AssocEdge between the current node and the given id2 for the InvitedEvents edge.
func (*User) LoadInvitedEvents ¶
LoadInvitedEvents returns the Events associated with the User instance
func (*User) LoadInvitedEventsEdges ¶
LoadInvitedEventsEdges returns the InvitedEvents edges associated with the User instance
func (*User) UnsupportedScan ¶
UnsupportedScan flags that we can't call StructScan() on the ent to get data out of the db, have to always use MapScan() and DBFields() method above
type UserResult ¶
UserResult stores the result of loading a User. It's a tuple type which has 2 fields: a User and an error
func (*UserResult) Error ¶
func (res *UserResult) Error() string
type UsersResult ¶
UsersResult stores the result of loading a slice of Users. It's a tuple type which has 2 fields: a []*User and an error
func (*UsersResult) Error ¶
func (res *UsersResult) Error() string