models

package
v0.0.40-alpha8 Latest Latest
Warning

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

Go to latest
Published: May 11, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
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"
)
View Source
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"
)
View Source
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"
)
View Source
const (
	// AddressType is the node type for the Address object. Used to identify this node in edges and other places.
	AddressType ent.NodeType = "address"
)
View Source
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 LoadContactEmailIDFromContactID

func LoadContactEmailIDFromContactID(contactID string) (string, error)

func LoadContactIDFromEmailAddress

func LoadContactIDFromEmailAddress(emailAddress string) (string, error)

func LoadContactIDFromUserID

func LoadContactIDFromUserID(userID string) (string, error)

func LoadUserIDFromEmailAddress

func LoadUserIDFromEmailAddress(emailAddress string) (string, error)

func LoadUserIDFromPhoneNumber

func LoadUserIDFromPhoneNumber(phoneNumber string) (string, error)

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

func ValidateEmailPassword(emailAddress, password string) (string, error)

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

func LoadAddressFromContext(ctx context.Context, id string) (*Address, error)

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

func (address *Address) DBFields() ent.DBFields

DBFields is used by the ent framework to load the ent from the underlying database

func (*Address) GetType

func (address *Address) GetType() ent.NodeType

GetType returns the NodeType of this entity. In this case: ContactType

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

func (address *Address) UnsupportedScan() bool

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

type AddressResult struct {
	Address *Address
	Err     error
}

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 Addresses

type Addresses map[string]*Address

type AddressesResult

type AddressesResult struct {
	Addresses []*Address
	Err       error
}

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

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

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

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

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

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

func LoadContactFromContext(ctx context.Context, id string) (*Contact, error)

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

func (contact *Contact) DBFields() ent.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) GetBaz

func (contact *Contact) GetBaz() float64

func (*Contact) GetContactBar

func (contact *Contact) GetContactBar(foo int) int

func (*Contact) GetContactFoo

func (contact *Contact) GetContactFoo() string

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) GetType

func (contact *Contact) GetType() ent.NodeType

GetType returns the NodeType of this entity. In this case: ContactType

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

func (contact *Contact) LoadAllowList() ([]*User, error)

LoadAllowList returns the Users associated with the Contact instance

func (*Contact) LoadAllowListEdgeFor

func (contact *Contact) LoadAllowListEdgeFor(id2 string) (*ent.AssocEdge, error)

LoadAllowListEdgeFor loads the ent.AssocEdge between the current node and the given id2 for the AllowList edge.

func (*Contact) LoadAllowListEdges

func (contact *Contact) LoadAllowListEdges() ([]*ent.AssocEdge, error)

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

func (*Contact) LoadUser

func (contact *Contact) LoadUser() (*User, error)

LoadUser returns the User 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

type ContactResult struct {
	Contact *Contact
	Err     error
}

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 Contacts

type Contacts map[string]*Contact

type ContactsResult

type ContactsResult struct {
	Contacts []*Contact
	Err      error
}

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

func LoadEventFromContext(ctx context.Context, id string) (*Event, error)

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

func (event *Event) DBFields() ent.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) GetType

func (event *Event) GetType() ent.NodeType

GetType returns the NodeType of this entity. In this case: ContactType

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

func (event *Event) LoadAttending() ([]*User, error)

LoadAttending returns the Users associated with the Event instance

func (*Event) LoadAttendingEdgeFor

func (event *Event) LoadAttendingEdgeFor(id2 string) (*ent.AssocEdge, error)

LoadAttendingEdgeFor loads the ent.AssocEdge between the current node and the given id2 for the Attending edge.

func (*Event) LoadAttendingEdges

func (event *Event) LoadAttendingEdges() ([]*ent.AssocEdge, error)

LoadAttendingEdges returns the Attending edges associated with the Event instance

func (*Event) LoadCreator

func (event *Event) LoadCreator() (*User, error)

LoadCreator returns the User associated with the Event instance

func (*Event) LoadCreatorEdge

func (event *Event) LoadCreatorEdge() (*ent.AssocEdge, error)

LoadCreatorEdge returns the Creator edge associated with the Event instance

func (*Event) LoadCreatorEdgeFor

func (event *Event) LoadCreatorEdgeFor(id2 string) (*ent.AssocEdge, error)

LoadCreatorEdgeFor loads the ent.AssocEdge between the current node and the given id2 for the Creator edge.

func (*Event) LoadDeclined

func (event *Event) LoadDeclined() ([]*User, error)

LoadDeclined returns the Users associated with the Event instance

func (*Event) LoadDeclinedEdgeFor

func (event *Event) LoadDeclinedEdgeFor(id2 string) (*ent.AssocEdge, error)

LoadDeclinedEdgeFor loads the ent.AssocEdge between the current node and the given id2 for the Declined edge.

func (*Event) LoadDeclinedEdges

func (event *Event) LoadDeclinedEdges() ([]*ent.AssocEdge, error)

LoadDeclinedEdges returns the Declined edges associated with the Event instance

func (*Event) LoadHostEdgeFor

func (event *Event) LoadHostEdgeFor(id2 string) (*ent.AssocEdge, error)

LoadHostEdgeFor loads the ent.AssocEdge between the current node and the given id2 for the Hosts edge.

func (*Event) LoadHosts

func (event *Event) LoadHosts() ([]*User, error)

LoadHosts returns the Users associated with the Event instance

func (*Event) LoadHostsEdges

func (event *Event) LoadHostsEdges() ([]*ent.AssocEdge, error)

LoadHostsEdges returns the Hosts edges associated with the Event instance

func (*Event) LoadInvited

func (event *Event) LoadInvited() ([]*User, error)

LoadInvited returns the Users associated with the Event instance

func (*Event) LoadInvitedEdgeFor

func (event *Event) LoadInvitedEdgeFor(id2 string) (*ent.AssocEdge, error)

LoadInvitedEdgeFor loads the ent.AssocEdge between the current node and the given id2 for the Invited edge.

func (*Event) LoadInvitedEdges

func (event *Event) LoadInvitedEdges() ([]*ent.AssocEdge, error)

LoadInvitedEdges returns the Invited edges associated with the Event instance

func (*Event) LoadUser

func (event *Event) LoadUser() (*User, error)

LoadUser returns the User 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

func (event *Event) ViewerRsvpStatusForGQL() (*string, error)

type EventResult

type EventResult struct {
	Event *Event
	Err   error
}

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 Events

type Events map[string]*Event

type EventsResult

type EventsResult struct {
	Events []*Event
	Err    error
}

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

func LoadUserFromContext(ctx context.Context, id string) (*User, error)

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) Baz

func (user *User) Baz() *float64

@graphql

func (*User) DBFields

func (user *User) DBFields() ent.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) GetType

func (user *User) GetType() ent.NodeType

GetType returns the NodeType of this entity. In this case: ContactType

func (*User) GetUserFoo

func (user *User) GetUserFoo() string

GetUserFoo blah blah blah @graphql

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

func (user *User) LoadContacts() ([]*Contact, error)

LoadContacts returns the Contacts associated with the User instance

func (*User) LoadDeclinedEventEdgeFor

func (user *User) LoadDeclinedEventEdgeFor(id2 string) (*ent.AssocEdge, error)

LoadDeclinedEventEdgeFor loads the ent.AssocEdge between the current node and the given id2 for the DeclinedEvents edge.

func (*User) LoadDeclinedEvents

func (user *User) LoadDeclinedEvents() ([]*Event, error)

LoadDeclinedEvents returns the Events associated with the User instance

func (*User) LoadDeclinedEventsEdges

func (user *User) LoadDeclinedEventsEdges() ([]*ent.AssocEdge, error)

LoadDeclinedEventsEdges returns the DeclinedEvents edges associated with the User instance

func (*User) LoadEventEdgeFor

func (user *User) LoadEventEdgeFor(id2 string) (*ent.AssocEdge, error)

LoadEventEdgeFor loads the ent.AssocEdge between the current node and the given id2 for the Events edge.

func (*User) LoadEvents

func (user *User) LoadEvents() ([]*Event, error)

LoadEvents returns the Events associated with the User instance

func (*User) LoadEventsAttending

func (user *User) LoadEventsAttending() ([]*Event, error)

LoadEventsAttending returns the Events associated with the User instance

func (*User) LoadEventsAttendingEdgeFor

func (user *User) LoadEventsAttendingEdgeFor(id2 string) (*ent.AssocEdge, error)

LoadEventsAttendingEdgeFor loads the ent.AssocEdge between the current node and the given id2 for the EventsAttending edge.

func (*User) LoadEventsAttendingEdges

func (user *User) LoadEventsAttendingEdges() ([]*ent.AssocEdge, error)

LoadEventsAttendingEdges returns the EventsAttending edges associated with the User instance

func (*User) LoadEventsEdges

func (user *User) LoadEventsEdges() ([]*ent.AssocEdge, error)

LoadEventsEdges returns the Events edges associated with the User instance

func (*User) LoadFamilyMemberEdgeFor

func (user *User) LoadFamilyMemberEdgeFor(id2 string) (*ent.AssocEdge, error)

LoadFamilyMemberEdgeFor loads the ent.AssocEdge between the current node and the given id2 for the FamilyMembers edge.

func (*User) LoadFamilyMembers

func (user *User) LoadFamilyMembers() ([]*User, error)

LoadFamilyMembers returns the Users associated with the User instance

func (*User) LoadFamilyMembersEdges

func (user *User) LoadFamilyMembersEdges() ([]*ent.AssocEdge, error)

LoadFamilyMembersEdges returns the FamilyMembers edges associated with the User instance

func (*User) LoadFriendEdgeFor

func (user *User) LoadFriendEdgeFor(id2 string) (*ent.AssocEdge, error)

LoadFriendEdgeFor loads the ent.AssocEdge between the current node and the given id2 for the Friends edge.

func (*User) LoadFriends

func (user *User) LoadFriends() ([]*User, error)

LoadFriends returns the Users associated with the User instance

func (*User) LoadFriendsEdges

func (user *User) LoadFriendsEdges() ([]*ent.AssocEdge, error)

LoadFriendsEdges returns the Friends edges associated with the User instance

func (*User) LoadInvitedEventEdgeFor

func (user *User) LoadInvitedEventEdgeFor(id2 string) (*ent.AssocEdge, error)

LoadInvitedEventEdgeFor loads the ent.AssocEdge between the current node and the given id2 for the InvitedEvents edge.

func (*User) LoadInvitedEvents

func (user *User) LoadInvitedEvents() ([]*Event, error)

LoadInvitedEvents returns the Events associated with the User instance

func (*User) LoadInvitedEventsEdges

func (user *User) LoadInvitedEventsEdges() ([]*ent.AssocEdge, error)

LoadInvitedEventsEdges returns the InvitedEvents edges associated with the User instance

func (*User) UnsupportedScan

func (user *User) UnsupportedScan() bool

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

type UserResult struct {
	User *User
	Err  error
}

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 Users

type Users map[string]*User

type UsersResult

type UsersResult struct {
	Users []*User
	Err   error
}

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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