Documentation
¶
Index ¶
- type CSVOutput
- type Command
- type CommandBuilder
- func (b CommandBuilder) Build() (*Command, error)
- func (b CommandBuilder) WithAgeLimit(limit time.Time) CommandBuilder
- func (b CommandBuilder) WithCache(cacheFilePath string) CommandBuilder
- func (b CommandBuilder) WithFallbackVersionsGetter(getter VersionsGetter) CommandBuilder
- func (b CommandBuilder) WithModulesRepo(repo ModulesRepo) CommandBuilder
- func (b CommandBuilder) WithOptions(opts ...Option) CommandBuilder
- func (b CommandBuilder) WithVCSRegistry(registry *VCSRegistry) CommandBuilder
- type FileSource
- type JSONOutput
- type ModulesRepo
- type Option
- type Output
- type PkgSource
- type Source
- type StdinSource
- type Summary
- type TableOutput
- type URLSource
- type VCSHandler
- type VCSRegistry
- type VersionsGetter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommandBuilder ¶
type CommandBuilder struct {
// contains filtered or unexported fields
}
func NewCommandBuilder ¶
func NewCommandBuilder(source Source, output Output) CommandBuilder
func (CommandBuilder) Build ¶
func (b CommandBuilder) Build() (*Command, error)
func (CommandBuilder) WithAgeLimit ¶ added in v0.4.0
func (b CommandBuilder) WithAgeLimit(limit time.Time) CommandBuilder
func (CommandBuilder) WithCache ¶
func (b CommandBuilder) WithCache(cacheFilePath string) CommandBuilder
func (CommandBuilder) WithFallbackVersionsGetter ¶
func (b CommandBuilder) WithFallbackVersionsGetter(getter VersionsGetter) CommandBuilder
func (CommandBuilder) WithModulesRepo ¶
func (b CommandBuilder) WithModulesRepo(repo ModulesRepo) CommandBuilder
func (CommandBuilder) WithOptions ¶
func (b CommandBuilder) WithOptions(opts ...Option) CommandBuilder
func (CommandBuilder) WithVCSRegistry ¶ added in v0.3.0
func (b CommandBuilder) WithVCSRegistry(registry *VCSRegistry) CommandBuilder
type FileSource ¶
type FileSource struct {
Path string
}
func (FileSource) Read ¶
func (s FileSource) Read() ([]byte, error)
type JSONOutput ¶
type JSONOutput struct{}
func (JSONOutput) Send ¶
func (j JSONOutput) Send(summary Summary) error
type ModulesRepo ¶
type PkgSource ¶
type PkgSource struct { Pkg string // contains filtered or unexported fields }
func (*PkgSource) SetModulesRepo ¶
func (p *PkgSource) SetModulesRepo(repo ModulesRepo)
func (*PkgSource) SetVCSRegistry ¶ added in v0.3.0
func (p *PkgSource) SetVCSRegistry(registry *VCSRegistry)
type StdinSource ¶
type StdinSource struct{}
func (StdinSource) Read ¶
func (s StdinSource) Read() ([]byte, error)
type TableOutput ¶
type TableOutput struct{}
func (TableOutput) Send ¶
func (p TableOutput) Send(summary Summary) error
type VCSHandler ¶ added in v0.3.0
type VCSHandler interface { ModulesRepo // CanHandle reports whether the vcs can handle the given path. CanHandle(path string) (bool, error) // Name reports the name of the VCS system. Name() string }
VCSHandler is an interface that can be implemented by specifc VCS handler.
type VCSRegistry ¶ added in v0.3.0
type VCSRegistry struct {
// contains filtered or unexported fields
}
VCSRegistry implements [command.ModulesRepo] and delegates handling of an invoked method to the registered VCS handler which supports the given path.
func NewVCSRegistry ¶ added in v0.3.0
func NewVCSRegistry(cacheDir string) *VCSRegistry
func (*VCSRegistry) GetHandler ¶ added in v0.3.0
func (v *VCSRegistry) GetHandler(path string) (ModulesRepo, error)
GetHandler returns the VCS handler which supports the given path. nolint: ireturn
func (*VCSRegistry) IsPrivate ¶ added in v0.3.0
func (v *VCSRegistry) IsPrivate(path string) bool
Click to show internal directories.
Click to hide internal directories.