Documentation ¶
Index ¶
- Variables
- func AuthEmailExtendToken(ctx context.Context, token string) (string, error)
- func AuthEmailLogout(ctx context.Context)
- func AuthEmailPassword(ctx context.Context, email, password string) (string, error)
- func AuthPhoneExtendToken(ctx context.Context, token string) (string, error)
- func AuthPhoneLogout(ctx context.Context)
- func AuthPhoneNumber(ctx context.Context, phoneNumber, pin string) (string, error)
- func CheckCanSigninWithEmailAddress(ctx context.Context, emailAddress string) (bool, error)
- func CheckCanSigninWithPhoneNumber(ctx context.Context, phoneNumber string) (bool, error)
- func NewExecutableSchema(cfg Config) graphql.ExecutableSchema
- func SendSMS(ctx context.Context, phoneNumber string) (string, error)
- func ValidAuthCredentials(ctx context.Context, phoneNumber, pin string) (bool, error)
- type AddressCreateInput
- type AddressCreateResponse
- type AddressDeleteInput
- type AddressDeleteResponse
- type AddressEditInput
- type AddressEditResponse
- type AdminBlockInput
- type AdminBlockResponse
- type AuthCheckAvailableEmailAddressInput
- type AuthCheckAvailableEmailAddressResponse
- type AuthCheckAvailablePhoneNumberInput
- type AuthCheckAvailablePhoneNumberResponse
- type AuthEmailPasswordInput
- type AuthEmailPasswordResponse
- type AuthEmailTokenInput
- type AuthEmailTokenResponse
- type AuthPhoneNumberInput
- type AuthPhoneNumberResponse
- type AuthPhoneTokenInput
- type AuthPhoneTokenResponse
- type AuthSendSMSInput
- type AuthSendSMSResponse
- type AuthSignoutEmailResponse
- type AuthSignoutResponse
- type AuthUserInput
- type AuthUserResponse
- type AuthUserResult
- type AuthValidCredentialsInput
- type AuthValidCredentialsResponse
- type ComplexityRoot
- type Config
- type Connection
- type ContactCreateInput
- type ContactCreateResponse
- type ContactEmailResolver
- type ContactResolver
- type DirectiveRoot
- type Edge
- type EventCreateInput
- type EventCreateResponse
- type EventResolver
- type EventRsvpStatus
- type EventRsvpStatusEditInput
- type EventRsvpStatusEditResponse
- type EventsConnection
- type EventsEdge
- type LogEvent2Input
- type LogEvent2Response
- type LogEventInput
- type LogEventResponse
- type MutationResolver
- type QueryResolver
- type Resolver
- type ResolverRoot
- type UserAddFamilyMemberInput
- type UserAddFamilyMemberResponse
- type UserAddFriendInput
- type UserAddFriendResponse
- type UserCreateInput
- type UserCreateResponse
- type UserDeleteInput
- type UserDeleteResponse
- type UserEditInput
- type UserEditResponse
- type UserRemoveFamilyMemberInput
- type UserRemoveFamilyMemberResponse
- type UserRemoveFriendInput
- type UserRemoveFriendResponse
- type UserResolver
- type UsersConnection
- type UsersEdge
- type ViewerBlockInput
- type ViewerBlockMultipleIDsInput
- type ViewerBlockMultipleIDsResponse
- type ViewerBlockMultipleInput
- type ViewerBlockMultipleResponse
- type ViewerBlockParamResponse
- type ViewerBlockResponse
Constants ¶
This section is empty.
Variables ¶
var AllEventRsvpStatus = []EventRsvpStatus{ EventRsvpStatusEventAttending, EventRsvpStatusEventDeclined, EventRsvpStatusEventInvited, EventRsvpStatusEventUnknown, }
Functions ¶
func AuthEmailExtendToken ¶
AuthEmailExtendToken takes the current auth token and returns a new token if current token is valid @graphql authEmailToken Mutation @graphqlreturn token
func AuthEmailLogout ¶
AuthEmailLogout logs the user out. @graphql authSignoutEmail Mutation TODO (developer): rename if you don't have conflicts?
func AuthEmailPassword ¶
AuthEmailPassword takes an email and password and logs the user in if valid @graphql authEmailPassword Mutation @graphqlreturn token
func AuthPhoneExtendToken ¶
AuthPhoneExtendToken takes the current auth token and returns a new token if current token is valid @graphql authPhoneToken Mutation @graphqlreturn token
func AuthPhoneLogout ¶
AuthPhoneLogout logs the user out. @graphql authSignout Mutation TODO (developer): rename if you don't have conflicts?
func AuthPhoneNumber ¶
AuthPhoneNumber takes a phone number and pin and logs the user in if valid @graphql authPhoneNumber Mutation @graphqlreturn token
func CheckCanSigninWithEmailAddress ¶
CheckCanSigninWithEmailAddress returns a boolean indicating if emailAddress is available TODO (developer): may make sense to remove this if you don't want to expose an API method that can be easily hit to check this without rate limits (or add rate limiting) @graphql authCheckAvailableEmailAddress Mutation @graphqlreturn available
func CheckCanSigninWithPhoneNumber ¶
CheckCanSigninWithPhoneNumber returns a boolean indicating if phoneNumber is available TODO (developer): may make sense to remove this if you don't want to expose an API method that can be easily hit to check this without rate limits (or add rate limiting) @graphql authCheckAvailablePhoneNumber Mutation @graphqlreturn available
func NewExecutableSchema ¶
func NewExecutableSchema(cfg Config) graphql.ExecutableSchema
NewExecutableSchema creates an ExecutableSchema from the ResolverRoot interface.
func SendSMS ¶
SendSMS takes a phone number and pin and "sends an sms" to the user Actually, it just returns the pin now but we'll have twilio, other integrations here later @graphql authSendSMS Mutation @graphqlreturn pin
func ValidAuthCredentials ¶
ValidAuthCredentials takes phone number and pin and validates that they are valid for a new user. Does *not* clear the PIN @graphql authValidCredentials Mutation @graphqlreturn available
Types ¶
type AddressCreateInput ¶
type AddressCreateResponse ¶
type AddressDeleteInput ¶
type AddressDeleteInput struct {
AddressID string `json:"addressID"`
}
type AddressDeleteResponse ¶
type AddressDeleteResponse struct {
DeletedAddressID *string `json:"deletedAddressId"`
}
type AddressEditInput ¶
type AddressEditResponse ¶
type AdminBlockInput ¶
type AdminBlockResponse ¶
type AdminBlockResponse struct {
Success *bool `json:"success"`
}
type AuthCheckAvailableEmailAddressInput ¶
type AuthCheckAvailableEmailAddressInput struct {
EmailAddress string `json:"emailAddress"`
}
type AuthCheckAvailableEmailAddressResponse ¶
type AuthCheckAvailableEmailAddressResponse struct {
Available bool `json:"available"`
}
type AuthCheckAvailablePhoneNumberInput ¶
type AuthCheckAvailablePhoneNumberInput struct {
PhoneNumber string `json:"phoneNumber"`
}
type AuthCheckAvailablePhoneNumberResponse ¶
type AuthCheckAvailablePhoneNumberResponse struct {
Available bool `json:"available"`
}
type AuthEmailPasswordInput ¶
type AuthEmailPasswordResponse ¶
type AuthEmailPasswordResponse struct {
Token string `json:"token"`
}
type AuthEmailTokenInput ¶
type AuthEmailTokenInput struct {
Token string `json:"token"`
}
type AuthEmailTokenResponse ¶
type AuthEmailTokenResponse struct {
Token string `json:"token"`
}
type AuthPhoneNumberInput ¶
type AuthPhoneNumberResponse ¶
type AuthPhoneNumberResponse struct {
Token string `json:"token"`
}
type AuthPhoneTokenInput ¶
type AuthPhoneTokenInput struct {
Token string `json:"token"`
}
type AuthPhoneTokenResponse ¶
type AuthPhoneTokenResponse struct {
Token string `json:"token"`
}
type AuthSendSMSInput ¶
type AuthSendSMSInput struct {
PhoneNumber string `json:"phoneNumber"`
}
type AuthSendSMSResponse ¶
type AuthSendSMSResponse struct {
Pin string `json:"pin"`
}
type AuthSignoutEmailResponse ¶
type AuthSignoutEmailResponse struct {
Success *bool `json:"success"`
}
type AuthSignoutResponse ¶
type AuthSignoutResponse struct {
Success *bool `json:"success"`
}
type AuthUserInput ¶
type AuthUserResponse ¶
type AuthUserResult ¶
type AuthValidCredentialsResponse ¶
type AuthValidCredentialsResponse struct {
Available bool `json:"available"`
}
type ComplexityRoot ¶
type ComplexityRoot struct { Address struct { City func(childComplexity int) int Country func(childComplexity int) int ID func(childComplexity int) int ResidentNames func(childComplexity int) int State func(childComplexity int) int StreetAddress func(childComplexity int) int Zip func(childComplexity int) int } AddressCreateResponse struct { Address func(childComplexity int) int } AddressDeleteResponse struct { DeletedAddressID func(childComplexity int) int } AddressEditResponse struct { Address func(childComplexity int) int } AdminBlockResponse struct { Success func(childComplexity int) int } AuthCheckAvailableEmailAddressResponse struct { Available func(childComplexity int) int } AuthCheckAvailablePhoneNumberResponse struct { Available func(childComplexity int) int } AuthEmailPasswordResponse struct { Token func(childComplexity int) int } AuthEmailTokenResponse struct { Token func(childComplexity int) int } AuthPhoneNumberResponse struct { Token func(childComplexity int) int } AuthPhoneTokenResponse struct { Token func(childComplexity int) int } AuthSendSMSResponse struct { Pin func(childComplexity int) int } AuthSignoutEmailResponse struct { Success func(childComplexity int) int } AuthSignoutResponse struct { Success func(childComplexity int) int } AuthUserResponse struct { Token func(childComplexity int) int User func(childComplexity int) int } AuthUserResult struct { Token func(childComplexity int) int User func(childComplexity int) int } AuthValidCredentialsResponse struct { Available func(childComplexity int) int } Contact struct { AllowList func(childComplexity int) int ContactEmails func(childComplexity int) int EmailAddress func(childComplexity int) int FirstName func(childComplexity int) int GetContactBar func(childComplexity int, foo int) int GetContactFoo func(childComplexity int) int ID func(childComplexity int) int LastName func(childComplexity int) int User func(childComplexity int) int } ContactCreateResponse struct { Contact func(childComplexity int) int } ContactEmail struct { Contact func(childComplexity int) int EmailAddress func(childComplexity int) int ID func(childComplexity int) int Label func(childComplexity int) int } Event struct { Attending func(childComplexity int) int Creator func(childComplexity int) int Declined func(childComplexity int) int EndTime func(childComplexity int) int Hosts func(childComplexity int) int ID func(childComplexity int) int Invited func(childComplexity int) int Location func(childComplexity int) int Name func(childComplexity int) int StartTime func(childComplexity int) int User func(childComplexity int) int ViewerRsvpStatus func(childComplexity int) int } EventCreateResponse struct { Event func(childComplexity int) int } EventRsvpStatusEditResponse struct { Event func(childComplexity int) int } EventsConnection struct { Edges func(childComplexity int) int Nodes func(childComplexity int) int } EventsEdge struct { Node func(childComplexity int) int } LogEvent2Response struct { Success func(childComplexity int) int } LogEventResponse struct { Success func(childComplexity int) int } Mutation struct { AddressCreate func(childComplexity int, input AddressCreateInput) int AddressDelete func(childComplexity int, input AddressDeleteInput) int AddressEdit func(childComplexity int, input AddressEditInput) int AdminBlock func(childComplexity int, input AdminBlockInput) int AuthCheckAvailableEmailAddress func(childComplexity int, input AuthCheckAvailableEmailAddressInput) int AuthCheckAvailablePhoneNumber func(childComplexity int, input AuthCheckAvailablePhoneNumberInput) int AuthEmailPassword func(childComplexity int, input AuthEmailPasswordInput) int AuthEmailToken func(childComplexity int, input AuthEmailTokenInput) int AuthPhoneNumber func(childComplexity int, input AuthPhoneNumberInput) int AuthPhoneToken func(childComplexity int, input AuthPhoneTokenInput) int AuthSendSms func(childComplexity int, input AuthSendSMSInput) int AuthSignout func(childComplexity int) int AuthSignoutEmail func(childComplexity int) int AuthUser func(childComplexity int, input AuthUserInput) int AuthValidCredentials func(childComplexity int, input AuthValidCredentialsInput) int ContactCreate func(childComplexity int, input ContactCreateInput) int EventCreate func(childComplexity int, input EventCreateInput) int EventRsvpStatusEdit func(childComplexity int, input EventRsvpStatusEditInput) int LogEvent func(childComplexity int, input LogEventInput) int LogEvent2 func(childComplexity int, input LogEvent2Input) int UserAddFamilyMember func(childComplexity int, input UserAddFamilyMemberInput) int UserAddFriend func(childComplexity int, input UserAddFriendInput) int UserCreate func(childComplexity int, input UserCreateInput) int UserDelete func(childComplexity int, input UserDeleteInput) int UserEdit func(childComplexity int, input UserEditInput) int UserRemoveFamilyMember func(childComplexity int, input UserRemoveFamilyMemberInput) int UserRemoveFriend func(childComplexity int, input UserRemoveFriendInput) int ViewerBlock func(childComplexity int, input ViewerBlockInput) int ViewerBlockMultiple func(childComplexity int, input ViewerBlockMultipleInput) int ViewerBlockMultipleIDs func(childComplexity int, input ViewerBlockMultipleIDsInput) int ViewerBlockParam func(childComplexity int, userID string) int } Query struct { Address func(childComplexity int, id string) int AuthUser func(childComplexity int, email string, password string) int Contact func(childComplexity int, id string) int ContactEmail func(childComplexity int, id string) int Event func(childComplexity int, id string) int ServerTime func(childComplexity int) int User func(childComplexity int, id string) int Viewer func(childComplexity int) int } User struct { Baz func(childComplexity int) int Bio func(childComplexity int) int Contacts func(childComplexity int) int DeclinedEvents func(childComplexity int) int EmailAddress func(childComplexity int) int Events func(childComplexity int) int EventsAttending func(childComplexity int) int FamilyMembers func(childComplexity int) int FirstName func(childComplexity int) int Friends func(childComplexity int) int GetUserFoo func(childComplexity int) int ID func(childComplexity int) int InvitedEvents func(childComplexity int) int LastName func(childComplexity int) int PhoneNumber func(childComplexity int) int } UserAddFamilyMemberResponse struct { User func(childComplexity int) int } UserAddFriendResponse struct { User func(childComplexity int) int } UserCreateResponse struct { User func(childComplexity int) int } UserDeleteResponse struct { DeletedUserID func(childComplexity int) int } UserEditResponse struct { User func(childComplexity int) int } UserRemoveFamilyMemberResponse struct { User func(childComplexity int) int } UserRemoveFriendResponse struct { User func(childComplexity int) int } UsersConnection struct { Edges func(childComplexity int) int Nodes func(childComplexity int) int } UsersEdge struct { Node func(childComplexity int) int } Viewer struct { GetUser func(childComplexity int) int LoadViewerContact func(childComplexity int) int } ViewerBlockMultipleIDsResponse struct { Viewer func(childComplexity int) int } ViewerBlockMultipleResponse struct { Viewer func(childComplexity int) int } ViewerBlockParamResponse struct { Viewer func(childComplexity int) int } ViewerBlockResponse struct { Viewer func(childComplexity int) int } }
type Config ¶
type Config struct { Resolvers ResolverRoot Directives DirectiveRoot Complexity ComplexityRoot }
type Connection ¶
type Connection interface {
IsConnection()
}
type ContactCreateInput ¶
type ContactCreateResponse ¶
type ContactEmailResolver ¶
type ContactResolver ¶
type DirectiveRoot ¶
type DirectiveRoot struct { }
type EventCreateInput ¶
type EventCreateResponse ¶
type EventResolver ¶
type EventResolver interface { Attending(ctx context.Context, obj *models.Event) ([]*models.User, error) Creator(ctx context.Context, obj *models.Event) (*models.User, error) Declined(ctx context.Context, obj *models.Event) ([]*models.User, error) Hosts(ctx context.Context, obj *models.Event) ([]*models.User, error) Invited(ctx context.Context, obj *models.Event) ([]*models.User, error) User(ctx context.Context, obj *models.Event) (*models.User, error) ViewerRsvpStatus(ctx context.Context, obj *models.Event) (*EventRsvpStatus, error) }
type EventRsvpStatus ¶
type EventRsvpStatus string
const ( EventRsvpStatusEventAttending EventRsvpStatus = "EVENT_ATTENDING" EventRsvpStatusEventDeclined EventRsvpStatus = "EVENT_DECLINED" EventRsvpStatusEventInvited EventRsvpStatus = "EVENT_INVITED" EventRsvpStatusEventUnknown EventRsvpStatus = "EVENT_UNKNOWN" )
func (EventRsvpStatus) IsValid ¶
func (e EventRsvpStatus) IsValid() bool
func (EventRsvpStatus) MarshalGQL ¶
func (e EventRsvpStatus) MarshalGQL(w io.Writer)
func (EventRsvpStatus) String ¶
func (e EventRsvpStatus) String() string
func (*EventRsvpStatus) UnmarshalGQL ¶
func (e *EventRsvpStatus) UnmarshalGQL(v interface{}) error
type EventsConnection ¶
type EventsConnection struct { Edges []*EventsEdge `json:"edges"` Nodes []*models.Event `json:"nodes"` }
func (EventsConnection) IsConnection ¶
func (EventsConnection) IsConnection()
type EventsEdge ¶
func (EventsEdge) IsEdge ¶
func (EventsEdge) IsEdge()
type LogEvent2Input ¶
type LogEvent2Input struct {
Event string `json:"event"`
}
type LogEvent2Response ¶
type LogEvent2Response struct {
Success *bool `json:"success"`
}
type LogEventInput ¶
type LogEventInput struct {
Event string `json:"event"`
}
type LogEventResponse ¶
type LogEventResponse struct {
Success *bool `json:"success"`
}
type MutationResolver ¶
type MutationResolver interface { AddressCreate(ctx context.Context, input AddressCreateInput) (*AddressCreateResponse, error) AddressDelete(ctx context.Context, input AddressDeleteInput) (*AddressDeleteResponse, error) AddressEdit(ctx context.Context, input AddressEditInput) (*AddressEditResponse, error) AdminBlock(ctx context.Context, input AdminBlockInput) (*AdminBlockResponse, error) AuthCheckAvailableEmailAddress(ctx context.Context, input AuthCheckAvailableEmailAddressInput) (*AuthCheckAvailableEmailAddressResponse, error) AuthCheckAvailablePhoneNumber(ctx context.Context, input AuthCheckAvailablePhoneNumberInput) (*AuthCheckAvailablePhoneNumberResponse, error) AuthEmailPassword(ctx context.Context, input AuthEmailPasswordInput) (*AuthEmailPasswordResponse, error) AuthEmailToken(ctx context.Context, input AuthEmailTokenInput) (*AuthEmailTokenResponse, error) AuthPhoneNumber(ctx context.Context, input AuthPhoneNumberInput) (*AuthPhoneNumberResponse, error) AuthPhoneToken(ctx context.Context, input AuthPhoneTokenInput) (*AuthPhoneTokenResponse, error) AuthSendSms(ctx context.Context, input AuthSendSMSInput) (*AuthSendSMSResponse, error) AuthSignout(ctx context.Context) (*AuthSignoutResponse, error) AuthSignoutEmail(ctx context.Context) (*AuthSignoutEmailResponse, error) AuthUser(ctx context.Context, input AuthUserInput) (*AuthUserResponse, error) AuthValidCredentials(ctx context.Context, input AuthValidCredentialsInput) (*AuthValidCredentialsResponse, error) ContactCreate(ctx context.Context, input ContactCreateInput) (*ContactCreateResponse, error) EventCreate(ctx context.Context, input EventCreateInput) (*EventCreateResponse, error) EventRsvpStatusEdit(ctx context.Context, input EventRsvpStatusEditInput) (*EventRsvpStatusEditResponse, error) LogEvent(ctx context.Context, input LogEventInput) (*LogEventResponse, error) LogEvent2(ctx context.Context, input LogEvent2Input) (*LogEvent2Response, error) UserAddFamilyMember(ctx context.Context, input UserAddFamilyMemberInput) (*UserAddFamilyMemberResponse, error) UserAddFriend(ctx context.Context, input UserAddFriendInput) (*UserAddFriendResponse, error) UserCreate(ctx context.Context, input UserCreateInput) (*UserCreateResponse, error) UserDelete(ctx context.Context, input UserDeleteInput) (*UserDeleteResponse, error) UserEdit(ctx context.Context, input UserEditInput) (*UserEditResponse, error) UserRemoveFamilyMember(ctx context.Context, input UserRemoveFamilyMemberInput) (*UserRemoveFamilyMemberResponse, error) UserRemoveFriend(ctx context.Context, input UserRemoveFriendInput) (*UserRemoveFriendResponse, error) ViewerBlock(ctx context.Context, input ViewerBlockInput) (*ViewerBlockResponse, error) ViewerBlockMultiple(ctx context.Context, input ViewerBlockMultipleInput) (*ViewerBlockMultipleResponse, error) ViewerBlockMultipleIDs(ctx context.Context, input ViewerBlockMultipleIDsInput) (*ViewerBlockMultipleIDsResponse, error) ViewerBlockParam(ctx context.Context, userID string) (*ViewerBlockParamResponse, error) }
type QueryResolver ¶
type QueryResolver interface { Address(ctx context.Context, id string) (*models.Address, error) AuthUser(ctx context.Context, email string, password string) (*AuthUserResult, error) Contact(ctx context.Context, id string) (*models.Contact, error) ContactEmail(ctx context.Context, id string) (*models.ContactEmail, error) Event(ctx context.Context, id string) (*models.Event, error) ServerTime(ctx context.Context) (*time.Time, error) User(ctx context.Context, id string) (*models.User, error) Viewer(ctx context.Context) (*viewer.Viewer, error) }
type Resolver ¶
type Resolver struct{}
func (*Resolver) Contact ¶
func (r *Resolver) Contact() ContactResolver
func (*Resolver) ContactEmail ¶
func (r *Resolver) ContactEmail() ContactEmailResolver
func (*Resolver) Event ¶
func (r *Resolver) Event() EventResolver
func (*Resolver) Mutation ¶
func (r *Resolver) Mutation() MutationResolver
func (*Resolver) Query ¶
func (r *Resolver) Query() QueryResolver
func (*Resolver) User ¶
func (r *Resolver) User() UserResolver
type ResolverRoot ¶
type ResolverRoot interface { Contact() ContactResolver ContactEmail() ContactEmailResolver Event() EventResolver Mutation() MutationResolver Query() QueryResolver User() UserResolver }
type UserAddFriendInput ¶
type UserAddFriendResponse ¶
type UserCreateInput ¶
type UserCreateResponse ¶
type UserDeleteInput ¶
type UserDeleteInput struct {
UserID string `json:"userID"`
}
type UserDeleteResponse ¶
type UserDeleteResponse struct {
DeletedUserID *string `json:"deletedUserId"`
}
type UserEditInput ¶
type UserEditResponse ¶
type UserRemoveFriendInput ¶
type UserResolver ¶
type UserResolver interface { Contacts(ctx context.Context, obj *models.User) ([]*models.Contact, error) DeclinedEvents(ctx context.Context, obj *models.User) ([]*models.Event, error) Events(ctx context.Context, obj *models.User) ([]*models.Event, error) EventsAttending(ctx context.Context, obj *models.User) ([]*models.Event, error) FamilyMembers(ctx context.Context, obj *models.User) ([]*models.User, error) Friends(ctx context.Context, obj *models.User) ([]*models.User, error) InvitedEvents(ctx context.Context, obj *models.User) ([]*models.Event, error) }
type UsersConnection ¶
type UsersConnection struct { Edges []*UsersEdge `json:"edges"` Nodes []*models.User `json:"nodes"` }
func (UsersConnection) IsConnection ¶
func (UsersConnection) IsConnection()
type ViewerBlockInput ¶
type ViewerBlockInput struct {
BlockeeID string `json:"blockeeID"`
}
type ViewerBlockMultipleIDsInput ¶
type ViewerBlockMultipleIDsInput struct {
UserIDs []string `json:"userIDs"`
}
type ViewerBlockMultipleInput ¶
type ViewerBlockMultipleInput struct {
UserIDs []string `json:"userIDs"`
}