Documentation ¶
Overview ¶
Package labels has helper functions for conditionally supporting functionality based on the command's labels.
Index ¶
- Constants
- func ToDigest(l map[string]string) (string, error)
- func ToKey(labels map[string]string) string
- func ToMap(l Labels) map[string]string
- type Labels
- func ClangCLCppLabels() Labels
- func ClangCppLabels() Labels
- func ClangLinkLabels() Labels
- func ClangLintLabels() Labels
- func D8Labels() Labels
- func FromMap(l map[string]string) Labels
- func HeaderAbiDumpLabels() Labels
- func JavacLabels() Labels
- func LLVMArLabels() Labels
- func MetalavaLabels() Labels
- func NaClLabels() Labels
- func NaClLinkLabels() Labels
- func R8Labels() Labels
- func SignAPKLabels() Labels
- func ToolLabels() Labels
- func TscLabels() Labels
Constants ¶
const ( // Compile is a compile action. Compile = "compile" // Tool is an action that invokes a generic tool. Tool = "tool" // Link denotes the C++ link action type label. Link = "link" // Archive denotes the C++ archive action type label. Archive = "archive" // AbiDump is a header abi dump action. AbiDump = "abi-dump" // Lint is a code linting action. Lint = "lint" // APKSigning is an action that's used to digitally sign Android APKs. APKSigning = "apksigning" // Clang for compiling c/c++. Clang = "clang" // ClangCL for compiling c/c++ with clang-cl (different flag semantics) ClangCL = "clang-cl" // NaCl for compiling c/c++ with nacl clang (different flag semantics) NaCl = "nacl" // Javac for compiling java files. Javac = "javac" // R8 for compiling class files into dex files with further optimizations. R8 = "r8" // D8 for compiling class files into dex files. D8 = "d8" // Metalava for compiling documentation of java source files. Metalava = "metalava" // HeaderAbiDumper for generating docs for C++. HeaderAbiDumper = "header-abi-dumper" // ClangTidy for C++ linting. ClangTidy = "clang-tidy" // SignAPKJAR for signing apk files in Android. SignAPKJAR = "signapkjar" // TsCompiler for compiling typescript files. TsCompiler = "tsc" // Cpp indicates the language is c++. Cpp = "cpp" // Java indicates the language is java. Java = "java" // Ts indicates the language is typescript. Ts = "typescript" // ClangTool indicates that the tool being used for this action is clang. // This is currently used for link actions, where clang++ is used as a driver // to call underlying ld linker. ClangTool = "clang" // LLVMTool indicates that the tool being used for this action is llvm. // This is currently used for archive actions, where llvm-ar is used. LLVMTool = "llvm" )
Variables ¶
This section is empty.
Functions ¶
func ToDigest ¶
ToDigest returns a SHA256 of the given labels.
Digest of labels of various action types for quick reference: [compiler=clang,lang=cpp,type=compile]=1c2a12e4 [compiler=clang-cl,lang=cpp,type=compile]=f1d5b747 [tool=clang,type=link]=c8d5e900 [lang=cpp,tool=clang-tidy,type=lint]=ef9b9dea [tool=header-abi-dumper,type=abi-dump]=480a02e7 [compiler=javac,lang=java,type=compile]=2c59b32a [compiler=r8,type=compile]=fc0915a4 [compiler=d8,type=compile]=4be622a4 [compiler=metalava,lang=java,type=compile]=44779548 [compiler=signapkjar,type=apksigning]=c5a25a91 [type=tool]=8ea55c85
Types ¶
type Labels ¶
type Labels struct { // ActionType is the type of the action. ActionType string // Compiler is the compiler used in a compile action. Compiler string // Lang is the code language. Lang string // ActionTool refers to a generic tool used for the action. ActionTool string }
Labels encapsulates common labels used to identify actions.
func ClangCLCppLabels ¶
func ClangCLCppLabels() Labels
ClangCLCppLabels is the set of labels identifying a cpp compile with clang-cl.
func ClangCppLabels ¶
func ClangCppLabels() Labels
ClangCppLabels is the set of labels identifying a cpp compile with clang.
func ClangLinkLabels ¶
func ClangLinkLabels() Labels
ClangLinkLabels is the set of labels identifying a cpp link with clang driver.
func ClangLintLabels ¶
func ClangLintLabels() Labels
ClangLintLabels is the set of labels identifying a clang-tidy action.
func HeaderAbiDumpLabels ¶
func HeaderAbiDumpLabels() Labels
HeaderAbiDumpLabels is the set of labels identifying a header ABI dumper action.
func JavacLabels ¶
func JavacLabels() Labels
JavacLabels is the set of labels identifying a java compile with javac.
func LLVMArLabels ¶
func LLVMArLabels() Labels
LLVMArLabels is the set of labels identifying a cpp archive with llvm driver.
func MetalavaLabels ¶
func MetalavaLabels() Labels
MetalavaLabels is the set of labels identifying a metalava compile.
func NaClLabels ¶
func NaClLabels() Labels
NaClLabels is the set of labels identifying a cpp compile with native client compilers.
func NaClLinkLabels ¶
func NaClLinkLabels() Labels
NaClLinkLabels is the set of labels identifying a cpp link with native client.
func SignAPKLabels ¶
func SignAPKLabels() Labels
SignAPKLabels is the set of labels identifying a signapk command.
func ToolLabels ¶
func ToolLabels() Labels
ToolLabels is the set of labels for running a generic tool.