app

package
v0.0.0-...-c52ba3c Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Copyright 2022 The Android Open Source Project

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BuildCmdResult

type BuildCmdResult struct {
	Name    string   `json:"name"`
	Output  []string `json:"output"`
	Success bool     `json:"success"`
}

Build command result

type BuildCommand

type BuildCommand struct {
	Target string   `json:"target"`
	Cmds   []string `json:"cmds"`
}

Commands

type BuildDeps

type BuildDeps struct {
	Targets map[string][]string `json:"targets"`
}

Build dependencies

type BuildInput

type BuildInput struct {
	Target string   `json:"target"`
	Files  []string `json:"files"`
}

Input

type BuildPath

type BuildPath struct {
	Target     string   `json:"target"`
	Dependency string   `json:"dependency"`
	Paths      []string `json:paths"`
}

Path

type BuildQuery

type BuildQuery struct {
	Target  string   `json:"target"`
	Inputs  []string `json:"inputs"`
	Outputs []string `json:"outputs"`
}

Query

type BuildTarget

type BuildTarget struct {
	Name      string                 `json:"name"`        // Target name
	Steps     int                    `json:"build_steps"` // Number of steps to build target
	FileCount int                    `json:"files"`       // Number of input files for a target
	Projects  map[string]*GitProject `json:"projects"`    // Inputs projects/files of a target
}

Build target

type GitCommit

type GitCommit struct {
	Sha   string          `json:"sha"`
	Files []GitCommitFile `json:"files"`
}

Git commit

type GitCommitFile

type GitCommitFile struct {
	Filename string            `json:"filename"`
	Type     GitCommitFileType `json:"type"`
}

type GitCommitFileType

type GitCommitFileType int
const (
	GitFileAdded GitCommitFileType = iota
	GitFileModified
	GitFileRemoved
)

func (GitCommitFileType) String

func (t GitCommitFileType) String() string

type GitDiff

type GitDiff struct {
	AddedLines   int  `json:"added_lines"`
	DeletedLines int  `json:"deleted_lines"`
	BinaryDiff   bool `json:"binary_diff"`
}

GIT diff

type GitProject

type GitProject struct {
	RepoDir   string                 `json:"repo_dir"`    // Relative directory within repo
	WorkDir   string                 `json:"working_dir"` // Working directory
	GitDir    string                 `json:"git_dir"`     // GIT directory
	Remote    string                 `json:"remote"`      // Remote Name
	RemoteUrl string                 `json:"remote_url"`  // Remote URL
	Revision  string                 `json:"revision"`    // Revision (SHA)
	Files     map[string]*GitTreeObj `json:"files"`       // Files within the project
}

GitProject

type GitTreeObj

type GitTreeObj struct {
	Permissions string   `json:"permissions"`
	Type        string   `json:"type"`
	Sha         string   `json:"sha"`
	Filename    string   `json:"filename"`
	BranchDiff  *GitDiff `json:"branch_diff"`
}

GIT tree object (files,dirs...)

type HostReport

type HostReport struct {
	Path     string   `json:"path"`      // Path to find host tools
	SymLinks int      `json:"sym_links"` // Number of symlinks found
	Targets  []string `json:"targets"`   // Target for tools found
}

Host tool report response data

type ProjectCommit

type ProjectCommit struct {
	Project  string `json:"project"`  // Project
	Revision string `json:"revision"` // Revision
}

Project level commit

type QueryRequest

type QueryRequest struct {
	Files []string `json:"files"` // Files to resolve
}

Query request

type QueryResponse

type QueryResponse struct {
	InputFiles   []string `json:"input_files"`             // Input files found
	OutputFiles  []string `json:"output_files"`            // Output files found
	UnknownFiles []string `json:"unknown_files,omitempty"` // Unknown files
}

Output response

type RepoDefault

type RepoDefault struct {
	Remote   string `xml:"remote,attr"`
	Revision string `xml:"revision,attr"`
}

type RepoManifest

type RepoManifest struct {
	XMLName  xml.Name      `xml:"manifest"`
	Remotes  []RepoRemote  `xml:"remote"`
	Default  RepoDefault   `xml:"default"`
	Projects []RepoProject `xml:"project"`
}

func ParseXml

func ParseXml(filename string) (*RepoManifest, error)

Parse a repo manifest file

type RepoProject

type RepoProject struct {
	Groups   string  `xml:"groups,attr"`
	Name     string  `xml:"name,attr"`
	Revision string  `xml:"revision,attr"`
	Path     string  `xml:"path,attr"`
	Remote   *string `xml:"remote,attr"`
}

type RepoRemote

type RepoRemote struct {
	Name     string `xml:"name,attr"`
	Revision string `xml:"fetch,attr"`
}

type Report

type Report struct {
	Targets map[string]*BuildTarget `json:"targets"` // Build target data
}

Report response data

type ReportRequest

type ReportRequest struct {
	Targets []string `json:"targets"` // Targets
}

Report request structure

Jump to

Keyboard shortcuts

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