{"modulePath":"github.com/coder/starquery","version":"v0.0.0-20240725144443-7aab316a9e6b","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package starquery\n\nPackage starquery provides functionality to query and manage GitHub stargazers.\n\n## Types\n\n```go\ntype API struct {\n\t// contains filtered or unexported fields\n}\n```\nAPI handles GitHub stargazer queries.\n\n```go\nfunc New(ctx context.Context, opts Options) *API\n```\nNew creates a new API handler that fetches stargazers for the given repos.\n\n```go\nfunc (a *API) Close()\n```\nClose shuts down the API and waits for all goroutines to finish.\n\n```go\nfunc (a *API) ServeHTTP(w http.ResponseWriter, r *http.Request)\n```\n\n```go\ntype Options struct {\n\tClient        *http.Client\n\tKV            kv.Store\n\tLogger        *slog.Logger\n\tRepos         []Repo\n\tWebhookSecret string\n}\n```\nOptions holds configuration for the API.\n\n```go\ntype Repo struct {\n\tOwner string\n\tName  string\n}\n```\nRepo represents a GitHub repository.\n\n```go\nfunc (r Repo) Key(username string) string\n```\nKey returns the storage key for the repo with the username.\n\n```go\nfunc (r Repo) String() string\n```\n\n```go\ntype Stargazer struct {\n\tLogin  string\n\tCursor string\n}\n```\nStargazer stores the username and cursor of the user starring.\n\n","path":"github.com/coder/starquery","name":"starquery","synopsis":"Package starquery provides functionality to query and manage GitHub stargazers.","isRedistributable":true}
