describer

package
v0.44.12 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2025 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

artifact_dockerfile.go

Index

Constants

View Source
const MAX_DOCKERFILE_LEN = 500

MAX_DOCKERFILE_LEN is the maximum allowed number of lines in a Dockerfile.

View Source
const MAX_RESULTS = 500

MAX_RESULTS is the maximum number of Dockerfiles to collect or stream.

Variables

This section is empty.

Functions

func GetDockerfile added in v0.11.1

func GetDockerfile(
	ctx context.Context,
	githubClient model.GitHubClient,
	organizationName, repoFullName, filePath string,
	stream *models.StreamSender,
) (*models.Resource, error)

GetDockerfile fetches a single Dockerfile from GitHub, decodes the base64 content, checks line count, uses `utils.ExtractExternalBaseImagesFromBase64` to parse external images. If parse fails, we store an empty Images slice.

func ListArtifactDockerFiles added in v0.4.0

func ListArtifactDockerFiles(
	ctx context.Context,
	githubClient model.GitHubClient,
	organizationName string,
	stream *models.StreamSender,
) ([]models.Resource, error)

ListArtifactDockerFiles performs a single code search across the organization for "filename:Dockerfile" and processes each result. Each Dockerfile is streamed immediately upon processing, and also added to the final slice.

Types

This section is empty.

Jump to

Keyboard shortcuts

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