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.
Click to show internal directories.
Click to hide internal directories.