Documentation ¶
Index ¶
- func AllFormatsToString() string
- func ImageFormatsToString() string
- func NewRelProtoFilePathResolver(dirPath string, chainedResolver bufbuild.ProtoRealFilePathResolver) (bufbuild.ProtoRealFilePathResolver, error)
- func SourceFormatsToString() string
- type ConfigOverrideParser
- type Format
- type InputRef
- type InputRefParser
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AllFormatsToString ¶
func AllFormatsToString() string
AllFormatsToString returns all format strings.
func ImageFormatsToString ¶
func ImageFormatsToString() string
ImageFormatsToString returns image format strings.
func NewRelProtoFilePathResolver ¶
func NewRelProtoFilePathResolver( dirPath string, chainedResolver bufbuild.ProtoRealFilePathResolver, ) (bufbuild.ProtoRealFilePathResolver, error)
NewRelProtoFilePathResolver returns a new ProtoFilePathResolver that will:
- Apply the chained resolver, if it is not nil. - Add the dirPath as a prefix. - Make the path relative to pwd if the path is relative, or return the path if it is absolute.
func SourceFormatsToString ¶
func SourceFormatsToString() string
SourceFormatsToString returns source format strings.
Types ¶
type ConfigOverrideParser ¶
type ConfigOverrideParser interface { // ParseConfigOverride parses the config override. // // If the trimmed input is empty, this returns system error. ParseConfigOverride(value string) (*bufconfig.Config, error) }
ConfigOverrideParser parses config overrides.
func NewConfigOverrideParser ¶
func NewConfigOverrideParser( configProvider bufconfig.Provider, configOverrideFlagName string, ) ConfigOverrideParser
NewConfigOverrideParser returns a new ConfigOverrideParser.
type Format ¶
type Format int
Format is a format.
const ( // FormatDir is a format. FormatDir Format = 1 // FormatTar is a format. FormatTar Format = 2 // FormatTarGz is a format. FormatTarGz Format = 3 // FormatGit is a format. FormatGit Format = 4 // FormatBin is a format. FormatBin Format = 5 // FormatBinGz is a format. FormatBinGz Format = 6 // FormatJSON is a format. FormatJSON Format = 7 // FormatJSONGz is a format. FormatJSONGz Format = 8 )
type InputRef ¶
type InputRef struct { // Format is the format of the input. // Required. Format Format // Path is the path of the input. // The special value "-" indicates stdin or stdout. // If this is "-", Format == FormatTar, FormatTarGz, FormatBin, FormatBinGz, FormatJSON, FormatJSONGz. // Required. Path string // GitBranch is the branch of the git repository. // This will only be set if Format == FormatGit. // Only one of GitBranch and GitTag will be set. // Optional regardless. GitBranch string // GitTag is the tag of the git repository. // This will only be set if Format == FormatGit. // Only one of GitBranch and GitTag will be set. // Optional regardless. GitTag string // StripComponents is the number of components to strip from a tarball. // This will only be set if Format == FormatTar, FormatTarGz StripComponents uint32 }
InputRef is a parsed input reference.
type InputRefParser ¶
type InputRefParser interface { // ParseInputRef parses the InputRef from the value. // // Value should always be non-empty - if you want this to be ".", specify it. // If onlySources is true, the Format will only be FormatDir, FormatTar, FormatTarGz, FormatGit. // If onlyImages is true, the Format will only be FormatBin, FormatBinGz, FormatJSON, FormatJSONGz. // If onlySources and onlyImages is true, this returns system error. // Format will be valid and only one of these eight types. ParseInputRef(value string, onlySources bool, onlyImages bool) (*InputRef, error) }
InputRefParser parses InputRefs.
func NewInputRefParser ¶
func NewInputRefParser(valueFlagName string) InputRefParser
NewInputRefParser returns a new InputRefParser.
Click to show internal directories.
Click to hide internal directories.