You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: branches.go
    path of file: ./repos/mergestat-lite/extensions/internal/github
    
    the code of the file until where you have to start completion: package github

import (
	"context"
	"io"

	"github.com/augmentable-dev/vtab"
	"github.com/mergestat/mergestat-lite/extensions/options"
	"github.com/rs/zerolog"
	"github.com/shurcooL/githubv4"
	"go.riyazali.net/sqlite"
)

type ref struct {
	Name   githubv4.String
	Prefix githubv4.String
	Target struct {
		Commit struct {
			Oid    githubv4.GitObjectID
			Author struct {
				Name  githubv4.String
				Email githubv4.String
			}
		} `graphql:"... on Commit"`
	}
}

type fetchBranchResults struct {
	RateLimit   *options.GitHubRateLimitResponse
	Edges       []*ref
	HasNextPage bool
	EndCursor   *githubv4.String
}

func (i *iterBranches) fetchBranches(ctx context.Context, startCursor *githubv4.String) (*fetchBranchResults, error) {
	var BranchQuery struct {
		RateLimit  *options.GitHubRateLimitResponse
		Reposi
    
func (i *iterBranches) fetchBranches(ctx context.Context, startCursor *githubv4.String) (*fetchBranchResults, error) {
	var BranchQuery struct {
		RateLimit  *options.GitHubRateLimitResponse
		Repository struct {
			Owner struct {
				Login string
			}
			Name string
			Refs struct {
				Nodes    []*ref
				PageInfo struct {
					EndCursor   githubv4.String
					HasNextPage bool
				}
			} `graphql:"refs(refPrefix: $refs, after: $refcursor, first: $perpage)"`
		} `graphql:"repository(owner: $owner, name: $name)"`
	}
	variables := map[string]interface{}{
		"owner":     githubv4.String(i.owner),
		"name":      githubv4.String(i.name),
		"perpage":   githubv4.Int(i.PerPage),
		"refs":      githubv4.String("refs/heads/"),
		"refcursor": startCursor,
	}

	err := i.Client().Query(ctx, &BranchQuery, variables)
	if err != nil {
		return nil, err
	}

	return &fetchBranchResults{
		RateLimit:   BranchQuery.RateLimit,
		Edges:       BranchQuery.Repository.Refs.Nodes,
		HasNextPage: BranchQuery.Repository.Refs.PageInfo.HasNextPage,
		EndCursor:   &BranchQuery.Repository.Refs.PageInfo.EndCursor,
	}, nil
}