atom

package
v0.55.3 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Flows

type Flows struct {
	ID                    int    `json:"id"`
	Label                 string `json:"label"`
	Name                  string `json:"name"`
	FullName              string `json:"fullName"`
	Signature             string `json:"signature"`
	IsExternal            bool   `json:"isExternal"`
	Code                  string `json:"code"`
	TypeFullName          string `json:"typeFullName"`
	ParentMethodName      string `json:"parentMethodName"`
	ParentMethodSignature string `json:"parentMethodSignature"`
	ParentFileName        string `json:"parentFileName"`
	ParentPackageName     string `json:"parentPackageName"`
	ParentClassName       string `json:"parentClassName"`
	LineNumber            int    `json:"lineNumber"`
	ColumnNumber          int    `json:"columnNumber"`
	Tags                  string `json:"tags"`
}

Flows describes the flows on how to reach such reachable.

type Reachable

type Reachable struct {
	Flows []Flows  `json:"flows"`
	Purls []string `json:"purls"`
}

Reachable represents an atom reachable result.

type ReachablePurls

type ReachablePurls map[string]struct{}

ReachablePurls maps reachable purls based on the report.

func (ReachablePurls) IsPurlReachable

func (rp ReachablePurls) IsPurlReachable(purl string) bool

type Reachables

type Reachables []Reachable

Reachables is a slice of Reachable.

type Reader

type Reader struct {
	// contains filtered or unexported fields
}

Reader is responsible for managing how to read atom files and understand their contents.

func NewReader

func NewReader(atomFilePath string, purlParser *purl.Parser) (*Reader, error)

NewReader returns a new atom file reader.

func (*Reader) ReachablePurls

func (r *Reader) ReachablePurls(ctx context.Context, reachables *Response) (ReachablePurls, error)

ReachablePurls finds all the reachable purls presents in the atom reachability result.

func (*Reader) Read

func (r *Reader) Read(ctx context.Context) (*Response, error)

Read deserialises the json content of the provided atom file into Reachables format.

type Response

type Response struct {
	Reachables Reachables `json:"reachables"`
}

Response maps the content of an atom reachability report in json format.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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