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 ComplexityRoot ¶
type ComplexityRoot struct { Advisories struct { Edges func(childComplexity int) int PageInfo func(childComplexity int) int TotalCount func(childComplexity int) int } AdvisoriesEdge struct { Node func(childComplexity int) int } Advisory struct { AdvisoryType func(childComplexity int) int Dependency func(childComplexity int) int Description func(childComplexity int) int EndOfLifeFrom func(childComplexity int) int SupportedUntil func(childComplexity int) int } Dependency struct { CurrentVersion func(childComplexity int) int DepTypes func(childComplexity int) int Health func(childComplexity int) int PackageFilePath func(childComplexity int) int PackageManager func(childComplexity int) int PackageName func(childComplexity int) int Version func(childComplexity int) int } DependencyHealth struct { Ecosystems func(childComplexity int) int SecurityScorecard func(childComplexity int) int } DependentOnResponse struct { Repositories func(childComplexity int) int } DependentOnUsage struct { CurrentVersion func(childComplexity int) int DepTypes func(childComplexity int) int Organisation func(childComplexity int) int Owner func(childComplexity int) int PackageFilePath func(childComplexity int) int Platform func(childComplexity int) int Repo func(childComplexity int) int Version func(childComplexity int) int } EcosystemsPackage struct { Funding func(childComplexity int) int LastSyncedAt func(childComplexity int) int LatestReleasePublishedAt func(childComplexity int) int Repo func(childComplexity int) int Status func(childComplexity int) int } EcosystemsRepo struct { Archived func(childComplexity int) int LastSyncedAt func(childComplexity int) int PushedAt func(childComplexity int) int UpdatedAt func(childComplexity int) int } FundingPlatform struct { Key func(childComplexity int) int Value func(childComplexity int) int } Metadata struct { DMDVersion func(childComplexity int) int FinalisedAt func(childComplexity int) int } Owner struct { Notes func(childComplexity int) int Owner func(childComplexity int) int } PageInfo struct { HasNextPage func(childComplexity int) int NextCursor func(childComplexity int) int } PolicyViolation struct { AdvisoryType func(childComplexity int) int Dependency func(childComplexity int) int Description func(childComplexity int) int Level func(childComplexity int) int } Query struct { DependentOn func(childComplexity int, packageName string, version *string, currentVersion *string, packageManager string) int GetMetadata func(childComplexity int) int RepositoriesIn func(childComplexity int, keys []model.RepositoryKey) int RepositoriesLike func(childComplexity int, platformLike *string, organisationLike *string, repoLike *string) int Repository func(childComplexity int, key *model.RepositoryKey) int } RepositoriesResponse struct { Repositories func(childComplexity int) int TotalAdvisories func(childComplexity int) int TotalDependencies func(childComplexity int) int TotalPolicyViolations func(childComplexity int) int } Repository struct { Advisories func(childComplexity int, pageSize *int, cursor *string) int Dependencies func(childComplexity int) int Libyears func(childComplexity int) int Metadata func(childComplexity int) int Organisation func(childComplexity int) int Owner func(childComplexity int) int Platform func(childComplexity int) int PolicyViolations func(childComplexity int) int Repo func(childComplexity int) int TotalAdvisories func(childComplexity int) int TotalDependencies func(childComplexity int) int TotalPolicyViolations func(childComplexity int) int } RepositoryAdditionalMetadatum struct { Key func(childComplexity int) int Value func(childComplexity int) int } RepositoryMetadata struct { AddititionalMetadata func(childComplexity int) int Description func(childComplexity int) int IsFork func(childComplexity int) int IsMonorepo func(childComplexity int) int RepositoryType func(childComplexity int) int RepositoryUsage func(childComplexity int) int Visibility func(childComplexity int) int } SecurityScorecard struct { BinaryArtifacts func(childComplexity int) int BranchProtection func(childComplexity int) int CiiBestPractices func(childComplexity int) int CodeReview func(childComplexity int) int DangerousWorkflow func(childComplexity int) int Fuzzing func(childComplexity int) int License func(childComplexity int) int Maintained func(childComplexity int) int Packaging func(childComplexity int) int PinnedDependencies func(childComplexity int) int Sast func(childComplexity int) int Score func(childComplexity int) int SecurityPolicy func(childComplexity int) int SignedReleases func(childComplexity int) int TokenPermissions func(childComplexity int) int Vulnerabilities func(childComplexity int) int } }
type Config ¶
type Config struct { Schema *ast.Schema Resolvers ResolverRoot Directives DirectiveRoot Complexity ComplexityRoot }
type DependencyResolver ¶ added in v0.76.0
type DependencyResolver interface {
Health(ctx context.Context, obj *model.Dependency) (*model.DependencyHealth, error)
}
type DirectiveRoot ¶
type DirectiveRoot struct { }
type PaginationCursor ¶ added in v0.95.0
type PaginationCursor struct {
Offset int64 `json:"offset"`
}
func NewPaginationCursor ¶ added in v0.95.0
func NewPaginationCursor(s *string) (PaginationCursor, error)
func (PaginationCursor) MarshalString ¶ added in v0.95.0
func (c PaginationCursor) MarshalString() (string, error)
func (PaginationCursor) NextPageInfo ¶ added in v0.95.0
type QueryResolver ¶
type QueryResolver interface { GetMetadata(ctx context.Context) (*model.Metadata, error) DependentOn(ctx context.Context, packageName string, version *string, currentVersion *string, packageManager string) (*model.DependentOnResponse, error) Repository(ctx context.Context, key *model.RepositoryKey) (*model.Repository, error) RepositoriesLike(ctx context.Context, platformLike *string, organisationLike *string, repoLike *string) (*model.RepositoriesResponse, error) RepositoriesIn(ctx context.Context, keys []model.RepositoryKey) (*model.RepositoriesResponse, error) }
type RepositoryResolver ¶
type RepositoryResolver interface { Owner(ctx context.Context, obj *model.Repository) (*model.Owner, error) TotalDependencies(ctx context.Context, obj *model.Repository) (int, error) Dependencies(ctx context.Context, obj *model.Repository) ([]model.Dependency, error) TotalAdvisories(ctx context.Context, obj *model.Repository) (int, error) Advisories(ctx context.Context, obj *model.Repository, pageSize *int, cursor *string) (*model.Advisories, error) TotalPolicyViolations(ctx context.Context, obj *model.Repository) (int, error) PolicyViolations(ctx context.Context, obj *model.Repository) ([]model.PolicyViolation, error) Libyears(ctx context.Context, obj *model.Repository) (float64, error) Metadata(ctx context.Context, obj *model.Repository) (*model.RepositoryMetadata, error) }
type Resolver ¶
type Resolver struct {
// contains filtered or unexported fields
}
func (*Resolver) Dependency ¶ added in v0.76.0
func (r *Resolver) Dependency() DependencyResolver
Dependency returns DependencyResolver implementation.
func (*Resolver) Query ¶
func (r *Resolver) Query() QueryResolver
Query returns QueryResolver implementation.
func (*Resolver) Repository ¶
func (r *Resolver) Repository() RepositoryResolver
Repository returns RepositoryResolver implementation.
type ResolverRoot ¶
type ResolverRoot interface { Dependency() DependencyResolver Query() QueryResolver Repository() RepositoryResolver }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.