gen

package
v0.0.0-...-750da50 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2020 License: MIT Imports: 12 Imported by: 0

README

Don't Edit Any Files In This Folder

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewExecutableSchema

func NewExecutableSchema(cfg Config) graphql.ExecutableSchema

NewExecutableSchema creates an ExecutableSchema from the ResolverRoot interface.

Types

type AddNewPostsInput

type AddNewPostsInput struct {
	PostContents      []string    `json:"postContents"`
	PostImageURLsList [][]*string `json:"postImageURLsList"`
	PostVideoURLs     []*string   `json:"postVideoURLs"`
	PostGifURLs       []*string   `json:"postGifURLs"`
	SubwallSlug       *string     `json:"subwallSlug"`
	ParentPostUID     string      `json:"parentPostUID"`
	QuotingPostUID    *string     `json:"quotingPostUID"`
	WhoCanReply       string      `json:"whoCanReply"`
}

type ChatMessageSchema

type ChatMessageSchema struct {
	UID       string          `json:"uid"`
	CreatedAt string          `json:"createdAt"`
	UpdatedAt string          `json:"updatedAt"`
	ChatRoom  *ChatRoomSchema `json:"chatRoom"`
	Content   string          `json:"content"`
	ImageURL  string          `json:"imageURL"`
	VideoURL  string          `json:"videoURL"`
	GifURL    string          `json:"gifURL"`
	CreatedBy *models.User    `json:"createdBy"`
}

type ChatRoomSchema

type ChatRoomSchema struct {
	UID          string         `json:"uid"`
	CreatedAt    string         `json:"createdAt"`
	UpdatedAt    string         `json:"updatedAt"`
	ChatRoomName string         `json:"chatRoomName"`
	ImageURL     string         `json:"imageURL"`
	Members      []*models.User `json:"members"`
}

type ComplexityRoot

type ComplexityRoot struct {
	ChatMessageSchema struct {
		ChatRoom  func(childComplexity int) int
		Content   func(childComplexity int) int
		CreatedAt func(childComplexity int) int
		CreatedBy func(childComplexity int) int
		GifURL    func(childComplexity int) int
		ImageURL  func(childComplexity int) int
		UID       func(childComplexity int) int
		UpdatedAt func(childComplexity int) int
		VideoURL  func(childComplexity int) int
	}

	ChatRoomSchema struct {
		ChatRoomName func(childComplexity int) int
		CreatedAt    func(childComplexity int) int
		ImageURL     func(childComplexity int) int
		Members      func(childComplexity int) int
		UID          func(childComplexity int) int
		UpdatedAt    func(childComplexity int) int
	}

	FetchMainFeedPostsReturnType struct {
		HasNext func(childComplexity int) int
		Posts   func(childComplexity int) int
	}

	GetUserProfileReturnType struct {
		HasNext     func(childComplexity int) int
		PinnedPost  func(childComplexity int) int
		Posts       func(childComplexity int) int
		ProfileUser func(childComplexity int) int
	}

	ListSchema struct {
		CreatedAt      func(childComplexity int) int
		CreatedBy      func(childComplexity int) int
		Description    func(childComplexity int) int
		HeaderImageURL func(childComplexity int) int
		ImageURL       func(childComplexity int) int
		IsPinned       func(childComplexity int) int
		IsPrivate      func(childComplexity int) int
		Members        func(childComplexity int) int
		Name           func(childComplexity int) int
		UID            func(childComplexity int) int
		UpdatedAt      func(childComplexity int) int
	}

	Mutation struct {
		AddNewPosts           func(childComplexity int, input AddNewPostsInput) int
		FirebaseSignIn        func(childComplexity int, firebaseUID string) int
		HandleClickLikeButton func(childComplexity int, targetPostUID string) int
		UpdateUserProfile     func(childComplexity int, input UpdateUserProfileInput) int
	}

	NewPostFooterStatisticsSubscriptionReturnType struct {
		IsLikedByCurrentUser     func(childComplexity int) int
		IsRepostedByCurrentUser  func(childComplexity int) int
		LikeButtonClickedByUID   func(childComplexity int) int
		NumLikes                 func(childComplexity int) int
		NumQuotes                func(childComplexity int) int
		NumReplies               func(childComplexity int) int
		NumReposts               func(childComplexity int) int
		RepostButtonClickedByUID func(childComplexity int) int
		TargetPostUID            func(childComplexity int) int
	}

	NotificationSchema struct {
		CreatedAt        func(childComplexity int) int
		NotificationType func(childComplexity int) int
		NotifyTo         func(childComplexity int) int
		People           func(childComplexity int) int
		SupplementalPost func(childComplexity int) int
		TargetPost       func(childComplexity int) int
		UID              func(childComplexity int) int
		UpdatedAt        func(childComplexity int) int
	}

	PollResultReturnType struct {
		CurrentUserChoiceIdx        func(childComplexity int) int
		IsAlreadyVotedByCurrentUser func(childComplexity int) int
		NumVotesForEachChoice       func(childComplexity int) int
		PollCreatedByUID            func(childComplexity int) int
		TargetPoll                  func(childComplexity int) int
	}

	PollSchema struct {
		CreatedAt        func(childComplexity int) int
		ExpiresAt        func(childComplexity int) int
		ParentPostUID    func(childComplexity int) int
		PollChoiceTitles func(childComplexity int) int
		UID              func(childComplexity int) int
		UpdatedAt        func(childComplexity int) int
	}

	PostImageSchema struct {
		ImageURL func(childComplexity int) int
	}

	PostSchema struct {
		Content                 func(childComplexity int) int
		CreatedAt               func(childComplexity int) int
		CreatedBy               func(childComplexity int) int
		GifURL                  func(childComplexity int) int
		Images                  func(childComplexity int) int
		IsDeleted               func(childComplexity int) int
		IsLikedByCurrentUser    func(childComplexity int) int
		IsPinnedToProfile       func(childComplexity int) int
		IsRepostedByCurrentUser func(childComplexity int) int
		NumLikes                func(childComplexity int) int
		NumQuotes               func(childComplexity int) int
		NumReplies              func(childComplexity int) int
		NumReposts              func(childComplexity int) int
		ParentPostUID           func(childComplexity int) int
		PostedAt                func(childComplexity int) int
		QuotedPost              func(childComplexity int) int
		RepostedBy              func(childComplexity int) int
		Subwall                 func(childComplexity int) int
		UID                     func(childComplexity int) int
		UpdatedAt               func(childComplexity int) int
		VideoURL                func(childComplexity int) int
		WhoCanReply             func(childComplexity int) int
	}

	PostSubSchema struct {
		Content           func(childComplexity int) int
		CreatedAt         func(childComplexity int) int
		CreatedBy         func(childComplexity int) int
		GifURL            func(childComplexity int) int
		Images            func(childComplexity int) int
		IsDeleted         func(childComplexity int) int
		IsPinnedToProfile func(childComplexity int) int
		ParentPostUID     func(childComplexity int) int
		PostedAt          func(childComplexity int) int
		QuotedPost        func(childComplexity int) int
		Subwall           func(childComplexity int) int
		UID               func(childComplexity int) int
		UpdatedAt         func(childComplexity int) int
		VideoURL          func(childComplexity int) int
		WhoCanReply       func(childComplexity int) int
	}

	PostSubSchema2 struct {
		Content           func(childComplexity int) int
		CreatedAt         func(childComplexity int) int
		CreatedBy         func(childComplexity int) int
		GifURL            func(childComplexity int) int
		Images            func(childComplexity int) int
		IsDeleted         func(childComplexity int) int
		IsPinnedToProfile func(childComplexity int) int
		ParentPostUID     func(childComplexity int) int
		PostedAt          func(childComplexity int) int
		Subwall           func(childComplexity int) int
		UID               func(childComplexity int) int
		UpdatedAt         func(childComplexity int) int
		VideoURL          func(childComplexity int) int
		WhoCanReply       func(childComplexity int) int
	}

	Query struct {
		FetchMainFeedPosts func(childComplexity int, input FetchMainFeedPostsInput) int
		GetUserByUsername  func(childComplexity int, username string) int
		GetUserProfile     func(childComplexity int, input GetUserProfileInput) int
	}

	Subscription struct {
		NewPostFooterStatisticsSubscription func(childComplexity int, currentUserUID string, targetPostUIDs []string) int
	}

	SubwallSchema struct {
		CreatedAt             func(childComplexity int) int
		CreatedBy             func(childComplexity int) int
		Description           func(childComplexity int) int
		ExternalLink          func(childComplexity int) int
		IsPrivate             func(childComplexity int) int
		Slug                  func(childComplexity int) int
		SubwallHeaderImageURL func(childComplexity int) int
		SubwallImageURL       func(childComplexity int) int
		SubwallName           func(childComplexity int) int
		UID                   func(childComplexity int) int
		UpdatedAt             func(childComplexity int) int
	}

	UserSchema struct {
		Biography             func(childComplexity int) int
		CreatedAt             func(childComplexity int) int
		DisplayName           func(childComplexity int) int
		ExternalLink          func(childComplexity int) int
		Location              func(childComplexity int) int
		ProfileHeaderImageURL func(childComplexity int) int
		ProfileImageURL       func(childComplexity int) int
		UID                   func(childComplexity int) int
		UpdatedAt             func(childComplexity int) int
		Username              func(childComplexity int) int
	}

	UserVoteSchema struct {
		ChoiceIndex func(childComplexity int) int
		CreatedAt   func(childComplexity int) int
		TargetPoll  func(childComplexity int) int
		UpdatedAt   func(childComplexity int) int
		VotedBy     func(childComplexity int) int
	}
}

type Config

type Config struct {
	Resolvers  ResolverRoot
	Directives DirectiveRoot
	Complexity ComplexityRoot
}

type DirectiveRoot

type DirectiveRoot struct {
}

type FetchMainFeedPostsInput

type FetchMainFeedPostsInput struct {
	DatetimeThreshold string `json:"datetimeThreshold"`
	Limit             int    `json:"limit"`
	ShouldUpdateLast  bool   `json:"shouldUpdateLast"`
}

type FetchMainFeedPostsReturnType

type FetchMainFeedPostsReturnType struct {
	Posts   []*models.Post `json:"posts"`
	HasNext bool           `json:"hasNext"`
}

type GetUserProfileInput

type GetUserProfileInput struct {
	Username             string `json:"username"`
	Offset               int    `json:"offset"`
	Limit                int    `json:"limit"`
	UserProfilePostsType string `json:"userProfilePostsType"`
}

type GetUserProfileReturnType

type GetUserProfileReturnType struct {
	ProfileUser *models.User   `json:"profileUser"`
	PinnedPost  *models.Post   `json:"pinnedPost"`
	Posts       []*models.Post `json:"posts"`
	HasNext     bool           `json:"hasNext"`
}

type ListSchema

type ListSchema struct {
	UID            string         `json:"uid"`
	CreatedAt      string         `json:"createdAt"`
	UpdatedAt      string         `json:"updatedAt"`
	Name           string         `json:"name"`
	Description    string         `json:"description"`
	ImageURL       string         `json:"imageURL"`
	HeaderImageURL string         `json:"headerImageURL"`
	IsPrivate      bool           `json:"isPrivate"`
	IsPinned       bool           `json:"isPinned"`
	CreatedBy      *models.User   `json:"createdBy"`
	Members        []*models.User `json:"members"`
}

type MutationResolver

type MutationResolver interface {
	FirebaseSignIn(ctx context.Context, firebaseUID string) (*models.User, error)
	UpdateUserProfile(ctx context.Context, input UpdateUserProfileInput) (*models.User, error)
	AddNewPosts(ctx context.Context, input AddNewPostsInput) (*models.Post, error)
	HandleClickLikeButton(ctx context.Context, targetPostUID string) (*bool, error)
}

type NewPostFooterStatisticsSubscriptionReturnType

type NewPostFooterStatisticsSubscriptionReturnType struct {
	TargetPostUID            string  `json:"targetPostUID"`
	NumReplies               *int    `json:"numReplies"`
	RepostButtonClickedByUID *string `json:"repostButtonClickedByUID"`
	IsRepostedByCurrentUser  *bool   `json:"isRepostedByCurrentUser"`
	NumReposts               *int    `json:"numReposts"`
	NumQuotes                *int    `json:"numQuotes"`
	LikeButtonClickedByUID   *string `json:"likeButtonClickedByUID"`
	IsLikedByCurrentUser     *bool   `json:"isLikedByCurrentUser"`
	NumLikes                 *int    `json:"numLikes"`
}

type NotificationSchema

type NotificationSchema struct {
	UID              string         `json:"uid"`
	CreatedAt        string         `json:"createdAt"`
	UpdatedAt        string         `json:"updatedAt"`
	People           []*models.User `json:"people"`
	NotifyTo         *models.User   `json:"notifyTo"`
	NotificationType string         `json:"notificationType"`
	TargetPost       *models.Post   `json:"targetPost"`
	SupplementalPost *models.Post   `json:"supplementalPost"`
}

type PollResultReturnType

type PollResultReturnType struct {
	TargetPoll                  *PollSchema `json:"targetPoll"`
	CurrentUserChoiceIdx        int         `json:"currentUserChoiceIdx"`
	IsAlreadyVotedByCurrentUser bool        `json:"isAlreadyVotedByCurrentUser"`
	NumVotesForEachChoice       []int       `json:"numVotesForEachChoice"`
	PollCreatedByUID            string      `json:"pollCreatedByUID"`
}

type PollSchema

type PollSchema struct {
	UID              string   `json:"uid"`
	CreatedAt        string   `json:"createdAt"`
	UpdatedAt        string   `json:"updatedAt"`
	ParentPostUID    string   `json:"parentPostUID"`
	PollChoiceTitles []string `json:"pollChoiceTitles"`
	ExpiresAt        string   `json:"expiresAt"`
}

type PostSchemaResolver

type PostSchemaResolver interface {
	NumReplies(ctx context.Context, obj *models.Post) (int, error)
	IsRepostedByCurrentUser(ctx context.Context, obj *models.Post) (bool, error)
	NumReposts(ctx context.Context, obj *models.Post) (int, error)
	NumQuotes(ctx context.Context, obj *models.Post) (int, error)
	IsLikedByCurrentUser(ctx context.Context, obj *models.Post) (bool, error)
	NumLikes(ctx context.Context, obj *models.Post) (int, error)
}

type QueryResolver

type QueryResolver interface {
	GetUserByUsername(ctx context.Context, username string) (*models.User, error)
	GetUserProfile(ctx context.Context, input GetUserProfileInput) (*GetUserProfileReturnType, error)
	FetchMainFeedPosts(ctx context.Context, input FetchMainFeedPostsInput) (*FetchMainFeedPostsReturnType, error)
}

type ResolverRoot

type ResolverRoot interface {
	Mutation() MutationResolver
	PostSchema() PostSchemaResolver
	Query() QueryResolver
	Subscription() SubscriptionResolver
}

type SubscriptionResolver

type SubscriptionResolver interface {
	NewPostFooterStatisticsSubscription(ctx context.Context, currentUserUID string, targetPostUIDs []string) (<-chan *NewPostFooterStatisticsSubscriptionReturnType, error)
}

type UpdateUserProfileInput

type UpdateUserProfileInput struct {
	DisplayName           string `json:"displayName"`
	Biography             string `json:"biography"`
	Location              string `json:"location"`
	ExternalLink          string `json:"externalLink"`
	ProfileImageURL       string `json:"profileImageURL"`
	ProfileHeaderImageURL string `json:"profileHeaderImageURL"`
}

type UserVoteSchema

type UserVoteSchema struct {
	CreatedAt   string       `json:"createdAt"`
	UpdatedAt   string       `json:"updatedAt"`
	VotedBy     *models.User `json:"votedBy"`
	TargetPoll  *PollSchema  `json:"targetPoll"`
	ChoiceIndex int          `json:"choiceIndex"`
}

Jump to

Keyboard shortcuts

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