schema

package
v0.0.0-...-dcf5b65 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Badge

type Badge struct {
	CurrentLevel                  int32
	DisplayName                   string
	Id                            string
	LinesOfCodeToNextLevel        int32
	Points                        int32
	ProgressPercentageToNextLevel int32
	TimeCreated                   graphql.Time
	TimeUpdated                   graphql.Time
	// contains filtered or unexported fields
}

func NewBadge

func NewBadge(m *usersstore.Badge) *Badge

func (*Badge) ID

func (n *Badge) ID(ctx context.Context) graphql.ID

type BadgeEdge

type BadgeEdge struct {
	Node   *Badge
	Cursor string
}

type BadgesConnection

type BadgesConnection struct {
	Edges    []*BadgeEdge
	PageInfo *PageInfo
	// contains filtered or unexported fields
}

func NewBadgesConnection

func NewBadgesConnection(
	filters *usersstore.BadgeFilters,
	data []*usersstore.Badge,
	hasNextPage bool,
	hasPreviousPage bool,
	cursors []string,
) *BadgesConnection

func (BadgesConnection) TotalCount

func (c BadgesConnection) TotalCount(ctx context.Context) (int32, error)

type Comment

type Comment struct {
	AbstractContent string
	ContentJson     string

	Id          string
	TimeCreated graphql.Time
	TimeUpdated graphql.Time
	// contains filtered or unexported fields
}

func NewComment

func NewComment(m *storiesstore.Comment) *Comment

func (*Comment) CreatedBy

func (n *Comment) CreatedBy(ctx context.Context) (*User, error)

func (*Comment) ID

func (n *Comment) ID(ctx context.Context) graphql.ID

type CommentEdge

type CommentEdge struct {
	Node   *Comment
	Cursor string
}

type CommentsConnection

type CommentsConnection struct {
	Edges    []*CommentEdge
	PageInfo *PageInfo
	// contains filtered or unexported fields
}

func NewCommentsConnection

func NewCommentsConnection(
	filters *storiesstore.CommentFilters,
	data []*storiesstore.Comment,
	hasNextPage bool,
	hasPreviousPage bool,
	cursors []string,
) *CommentsConnection

func (CommentsConnection) HasViewerAssociation

func (c CommentsConnection) HasViewerAssociation(ctx context.Context) (bool, error)

func (CommentsConnection) TotalCount

func (c CommentsConnection) TotalCount(ctx context.Context) (int32, error)

type CreateBadgeInput

type CreateBadgeInput struct {
	CurrentLevel                  int32
	DisplayName                   string
	LinesOfCodeToNextLevel        int32
	Points                        int32
	ProgressPercentageToNextLevel int32
	UserID                        graphql.ID
}

func (*CreateBadgeInput) ToModel

func (n *CreateBadgeInput) ToModel() (*usersstore.Badge, error)

type CreateCommentInput

type CreateCommentInput struct {
	AbstractContent string
	ContentJson     string
	StoryID         graphql.ID
}

func (*CreateCommentInput) ToModel

func (n *CreateCommentInput) ToModel() (*storiesstore.Comment, error)

type CreateIssueInput

type CreateIssueInput struct {
	Body                string
	CommentCount        int32
	IssueType           string
	Labels              []*string
	Repository          string
	RepositoryAvatar    string
	RepositoryUpdatedAt graphql.Time
	Title               string
	Url                 string
	StoryID             graphql.ID
	UserID              graphql.ID
}

func (*CreateIssueInput) ToModel

func (n *CreateIssueInput) ToModel() (*issuesstore.Issue, error)

type CreateReactionInput

type CreateReactionInput struct {
	StoryID graphql.ID
}

func (*CreateReactionInput) ToModel

type CreateStoryInput

type CreateStoryInput struct {
	AbstractContent string
	ContentJson     string
	Thumbnail       string
	Title           string
	UrlSuffix       string
	UserID          graphql.ID
}

func (*CreateStoryInput) ToModel

func (n *CreateStoryInput) ToModel() (*storiesstore.Story, error)

type CreateUserInput

type CreateUserInput struct {
	Avatar               string
	Bio                  string
	GitContributionStats *GitContributionStats
	Handle               string
	Name                 string
	Reputation           *Reputation
}

func (*CreateUserInput) ToModel

func (n *CreateUserInput) ToModel() (*usersstore.User, error)

type FeedsInput

type FeedsInput struct {
	First     *int32
	Last      *int32
	After     *string
	Before    *string
	SortOrder *string
	SortBy    *string
}

type GitContributionStats

type GitContributionStats struct {
	Issues       int32
	PullRequests int32
	// contains filtered or unexported fields
}

func (*GitContributionStats) ToModel

type IDMarshaller

type IDMarshaller struct {
	*graphqlid.GraphqlID
}

func NewIDMarshaller

func NewIDMarshaller(t NodeType, id string, isUUID bool) *IDMarshaller

func ParseGraphqlID

func ParseGraphqlID(gid graphql.ID) (*IDMarshaller, error)

func (*IDMarshaller) NodeType

func (id *IDMarshaller) NodeType() NodeType

type Issue

type Issue struct {
	Body                string
	CommentCount        int32
	Id                  string
	IssueType           string
	Labels              []*string
	Repository          string
	RepositoryAvatar    string
	RepositoryUpdatedAt graphql.Time
	Title               string
	Url                 string
	// contains filtered or unexported fields
}

func NewIssue

func NewIssue(m *issuesstore.Issue) *Issue

func (*Issue) ID

func (n *Issue) ID(ctx context.Context) graphql.ID

type IssueEdge

type IssueEdge struct {
	Node   *Issue
	Cursor string
}

type IssuesConnection

type IssuesConnection struct {
	Edges    []*IssueEdge
	PageInfo *PageInfo
	// contains filtered or unexported fields
}

func NewIssuesConnection

func NewIssuesConnection(
	filters *issuesstore.IssueFilters,
	data []*issuesstore.Issue,
	hasNextPage bool,
	hasPreviousPage bool,
	cursors []string,
) *IssuesConnection

func (IssuesConnection) TotalCount

func (c IssuesConnection) TotalCount(ctx context.Context) (int32, error)

type Node

type Node interface {
	ID(context.Context) graphql.ID
}

type NodeIDInput

type NodeIDInput struct {
	ID graphql.ID
}

type NodeResolver

type NodeResolver struct {
	Node
}

func (*NodeResolver) ToBadge

func (n *NodeResolver) ToBadge() (*Badge, bool)

func (*NodeResolver) ToComment

func (n *NodeResolver) ToComment() (*Comment, bool)

func (*NodeResolver) ToIssue

func (n *NodeResolver) ToIssue() (*Issue, bool)

func (*NodeResolver) ToReaction

func (n *NodeResolver) ToReaction() (*Reaction, bool)

func (*NodeResolver) ToStory

func (n *NodeResolver) ToStory() (*Story, bool)

func (*NodeResolver) ToUser

func (n *NodeResolver) ToUser() (*User, bool)

type NodeType

type NodeType uint8
const (
	NodeTypeUnknown NodeType = iota
	NodeTypeBadge
	NodeTypeComment
	NodeTypeIssue
	NodeTypeReaction
	NodeTypeStory
	NodeTypeUser
)

type PageInfo

type PageInfo struct {
	HasNextPage     bool
	HasPreviousPage bool
	StartCursor     *string
	EndCursor       *string
}

type Reaction

type Reaction struct {
	Id          string
	TimeCreated graphql.Time
	TimeUpdated graphql.Time
	// contains filtered or unexported fields
}

func NewReaction

func NewReaction(m *storiesstore.Reaction) *Reaction

func (*Reaction) CreatedBy

func (n *Reaction) CreatedBy(ctx context.Context) (*User, error)

func (*Reaction) ID

func (n *Reaction) ID(ctx context.Context) graphql.ID

type ReactionEdge

type ReactionEdge struct {
	Node   *Reaction
	Cursor string
}

type ReactionsConnection

type ReactionsConnection struct {
	Edges    []*ReactionEdge
	PageInfo *PageInfo
	// contains filtered or unexported fields
}

func NewReactionsConnection

func NewReactionsConnection(
	filters *storiesstore.ReactionFilters,
	data []*storiesstore.Reaction,
	hasNextPage bool,
	hasPreviousPage bool,
	cursors []string,
) *ReactionsConnection

func (ReactionsConnection) HasViewerAssociation

func (c ReactionsConnection) HasViewerAssociation(ctx context.Context) (bool, error)

func (ReactionsConnection) TotalCount

func (c ReactionsConnection) TotalCount(ctx context.Context) (int32, error)

type Reputation

type Reputation struct {
	Value float64
	// contains filtered or unexported fields
}

func NewReputation

func NewReputation(m *usersstore.Reputation) *Reputation

func (*Reputation) ToModel

func (n *Reputation) ToModel() *usersstore.Reputation

type Resolver

type Resolver struct {
}

func (*Resolver) CreateComment

func (m *Resolver) CreateComment(
	ctx context.Context,
	args struct {
		Comment *CreateCommentInput
	},
) (*Comment, error)

func (*Resolver) CreateReaction

func (m *Resolver) CreateReaction(
	ctx context.Context,
	args struct {
		Reaction *CreateReactionInput
	},
) (*Reaction, error)

func (*Resolver) CreateStory

func (m *Resolver) CreateStory(
	ctx context.Context,
	args struct {
		Story *CreateStoryInput
	},
) (*Story, error)

func (*Resolver) CreateUser

func (m *Resolver) CreateUser(
	ctx context.Context,
	args struct {
		User *CreateUserInput
	},
) (*User, error)

func (*Resolver) Feeds

func (r *Resolver) Feeds(ctx context.Context, in *FeedsInput) (*StoriesConnection, error)

func (*Resolver) Node

func (r *Resolver) Node(ctx context.Context, in NodeIDInput) (*NodeResolver, error)

func (*Resolver) UpdateComment

func (m *Resolver) UpdateComment(
	ctx context.Context,
	args struct {
		Comment *UpdateCommentInput
	},
) (*Comment, error)

func (*Resolver) UpdateReaction

func (m *Resolver) UpdateReaction(
	ctx context.Context,
	args struct {
		Reaction *UpdateReactionInput
	},
) (*Reaction, error)

func (*Resolver) UpdateStory

func (m *Resolver) UpdateStory(
	ctx context.Context,
	args struct {
		Story *UpdateStoryInput
	},
) (*Story, error)

func (*Resolver) UpdateUser

func (m *Resolver) UpdateUser(
	ctx context.Context,
	args struct {
		User *UpdateUserInput
	},
) (*User, error)

func (*Resolver) User

func (r *Resolver) User(ctx context.Context, in *UserInput) (*User, error)

func (*Resolver) Viewer

func (r *Resolver) Viewer(ctx context.Context) (*User, error)

type StoriesConnection

type StoriesConnection struct {
	Edges    []*StoryEdge
	PageInfo *PageInfo
	// contains filtered or unexported fields
}

func NewStoriesConnection

func NewStoriesConnection(
	filters *storiesstore.StoryFilters,
	data []*storiesstore.Story,
	hasNextPage bool,
	hasPreviousPage bool,
	cursors []string,
) *StoriesConnection

func (StoriesConnection) HasViewerAssociation

func (c StoriesConnection) HasViewerAssociation(ctx context.Context) (bool, error)

func (StoriesConnection) TotalCount

func (c StoriesConnection) TotalCount(ctx context.Context) (int32, error)

type Story

type Story struct {
	AbstractContent string
	ContentJson     string

	Id          string
	Thumbnail   string
	TimeCreated graphql.Time
	TimeUpdated graphql.Time
	Title       string
	UrlSuffix   string
	// contains filtered or unexported fields
}

func NewStory

func NewStory(m *storiesstore.Story) *Story

func (*Story) Comments

func (n *Story) Comments(ctx context.Context, in *StoryCommentsInput) (*CommentsConnection, error)

func (*Story) CreatedBy

func (n *Story) CreatedBy(ctx context.Context) (*User, error)

func (*Story) ID

func (n *Story) ID(ctx context.Context) graphql.ID

func (*Story) IssuesFromRepos

func (n *Story) IssuesFromRepos(ctx context.Context, in *StoryIssuesFromReposInput) (*IssuesConnection, error)

func (*Story) Reactions

func (*Story) RelevantIssues

func (n *Story) RelevantIssues(ctx context.Context, in *StoryRelevantIssuesInput) (*IssuesConnection, error)

type StoryCommentsInput

type StoryCommentsInput struct {
	First     *int32
	Last      *int32
	After     *string
	Before    *string
	SortOrder *string
	SortBy    *string
}

type StoryEdge

type StoryEdge struct {
	Node   *Story
	Cursor string
}

type StoryIssuesFromReposInput

type StoryIssuesFromReposInput struct {
	First     *int32
	Last      *int32
	After     *string
	Before    *string
	SortOrder *string
	SortBy    *string
}

type StoryReactionsInput

type StoryReactionsInput struct {
	First     *int32
	Last      *int32
	After     *string
	Before    *string
	SortOrder *string
	SortBy    *string
}

type StoryRelevantIssuesInput

type StoryRelevantIssuesInput struct {
	First     *int32
	Last      *int32
	After     *string
	Before    *string
	SortOrder *string
	SortBy    *string
}

type UpdateCommentInput

type UpdateCommentInput struct {
	ID graphql.ID
}

func (*UpdateCommentInput) ToModel

type UpdateReactionInput

type UpdateReactionInput struct {
	ID graphql.ID
}

func (*UpdateReactionInput) ToModel

type UpdateStoryInput

type UpdateStoryInput struct {
	ID              graphql.ID
	AbstractContent *string
	ContentJson     *string
	Thumbnail       *string
	Title           *string
}

func (*UpdateStoryInput) ToModel

type UpdateUserInput

type UpdateUserInput struct {
	ID                   graphql.ID
	Avatar               *string
	Bio                  *string
	GitContributionStats *GitContributionStats
	Name                 *string
	Reputation           *Reputation
}

func (*UpdateUserInput) ToModel

func (n *UpdateUserInput) ToModel() *usersstore.UserUpdate

type User

type User struct {
	Avatar               string
	Bio                  string
	GitContributionStats *GitContributionStats
	Handle               string
	Id                   string
	Name                 string
	Reputation           *Reputation
	TimeCreated          graphql.Time
	TimeUpdated          graphql.Time
	// contains filtered or unexported fields
}

func NewUser

func NewUser(m *usersstore.User) *User

func (*User) Badges

func (n *User) Badges(ctx context.Context, in *UserBadgesInput) (*BadgesConnection, error)

func (*User) ID

func (n *User) ID(ctx context.Context) graphql.ID

func (*User) IssuesFromLastRepo

func (n *User) IssuesFromLastRepo(ctx context.Context, in *UserIssuesFromLastRepoInput) (*IssuesConnection, error)

func (*User) IssuesFromOtherRecentRepos

func (n *User) IssuesFromOtherRecentRepos(ctx context.Context, in *UserIssuesFromOtherRecentReposInput) (*IssuesConnection, error)

func (*User) RelevantIssues

func (n *User) RelevantIssues(ctx context.Context, in *UserRelevantIssuesInput) (*IssuesConnection, error)

func (*User) Stories

func (n *User) Stories(ctx context.Context, in *UserStoriesInput) (*StoriesConnection, error)

type UserBadgesInput

type UserBadgesInput struct {
	First     *int32
	Last      *int32
	After     *string
	Before    *string
	SortOrder *string
	SortBy    *string
}

type UserEdge

type UserEdge struct {
	Node   *User
	Cursor string
}

type UserInput

type UserInput struct {
	Handle *string
}

type UserIssuesFromLastRepoInput

type UserIssuesFromLastRepoInput struct {
	First     *int32
	Last      *int32
	After     *string
	Before    *string
	SortOrder *string
	SortBy    *string
}

type UserIssuesFromOtherRecentReposInput

type UserIssuesFromOtherRecentReposInput struct {
	First     *int32
	Last      *int32
	After     *string
	Before    *string
	SortOrder *string
	SortBy    *string
}

type UserRelevantIssuesInput

type UserRelevantIssuesInput struct {
	First     *int32
	Last      *int32
	After     *string
	Before    *string
	SortOrder *string
	SortBy    *string
}

type UserStoriesInput

type UserStoriesInput struct {
	First     *int32
	Last      *int32
	After     *string
	Before    *string
	SortOrder *string
	SortBy    *string
}

type UsersConnection

type UsersConnection struct {
	Edges    []*UserEdge
	PageInfo *PageInfo
	// contains filtered or unexported fields
}

func NewUsersConnection

func NewUsersConnection(
	filters *usersstore.UserFilters,
	data []*usersstore.User,
	hasNextPage bool,
	hasPreviousPage bool,
	cursors []string,
) *UsersConnection

func (UsersConnection) TotalCount

func (c UsersConnection) TotalCount(ctx context.Context) (int32, error)

Jump to

Keyboard shortcuts

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