Documentation
¶
Index ¶
Constants ¶
View Source
const DEBUG_ON = false
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DependencyGraphManifestsResponse ¶
type DependencyGraphManifestsResponse struct {
Repository struct {
DependencyGraphManifests struct {
Edges []struct {
Cursor string `json:"cursor"`
Node struct {
Dependencies struct {
Nodes []struct {
PackageName string `json:"packageName"`
Repository struct {
LicenseInfo struct {
Name string `json:"name"`
} `json:"licenseInfo"`
PrimaryLanguage struct {
Name string `json:"name"`
} `json:"primaryLanguage"`
} `json:"repository"`
} `json:"nodes"`
TotalCount int `json:"totalCount"`
} `json:"dependencies"`
DependenciesCount int `json:"dependenciesCount"`
} `json:"node"`
} `json:"edges"`
PageInfo struct {
EndCursor string `json:"endCursor"`
HasNextPage bool `json:"hasNextPage"`
HasPreviousPage bool `json:"hasPreviousPage"`
StartCursor string `json:"startCursor"`
} `json:"pageInfo"`
TotalCount int `json:"totalCount"`
} `json:"dependencyGraphManifests"`
} `json:"repository"`
}
DependencyGraphResponse is for the specific query performmed, anon struct types are used for the types.
type GithubRepositoriesResponse ¶
type GithubRepositoriesResponse struct {
Repos struct {
RepositoryCount int `json:"repositoryCount"`
PageInfo struct {
EndCursor string `json:"endCursor"`
StartCursor string `json:"startCursor"`
HasNextPage bool `json:"hasNextPage"`
} `json:"pageInfo"`
Edges []struct {
Node struct {
Name string `json:"name"`
NameWithOwner string `json:"nameWithOwner"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
PrimaryLanguage struct {
Name string `json:"name"`
} `json:"primaryLanguage"`
} `json:"node"`
} `json:"edges"`
} `json:"repos"`
}
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
use graphql to get data from github for the repository
func (*Service) GHRequestJSON ¶
GHRequestJSON a helper function to build a graphql search query in string format The same query can be run at https://docs.github.com/en/graphql/overview/explorer
func (*Service) GetLicenses ¶
func (service *Service) GetLicenses(owner, repo, after string) (*DependencyGraphManifestsResponse, error)
GetLicenses return the licenses
Click to show internal directories.
Click to hide internal directories.