Documentation ¶
Index ¶
- Variables
- func BootstrapModuleCmd(category modules.Category, cmder BootstrapModuleCommander, ...) *cobra.Command
- func EnvCommand(cmder EnvCommander) *cobra.Command
- func ExecuteModuleCommand(category modules.Category, cmder ModuleCommander, ...) *cobra.Command
- func ManCmd(cmder ManCommander, initializer LevelInitializer, ...) *cobra.Command
- func ModuleManCommand(category modules.Category, cmder ManCommander, initializer LevelInitializer, ...) *cobra.Command
- func ModulesCommand(initializer LevelInitializer, registryAcc TypeRegistryAccessor, ...) *cobra.Command
- func ModulesListCommand(initializer LevelInitializer, registryAcc TypeRegistryAccessor, out io.Writer) *cobra.Command
- func NewCmd(subCommands ...*cobra.Command) *cobra.Command
- func PluginListCommand(cmder PluginCommander, initializer LevelInitializer) *cobra.Command
- func PluginUpdateCommand(cmder PluginCommander, initializer LevelInitializer) *cobra.Command
- func PluginsCommand(cmder PluginCommander, initializer LevelInitializer) *cobra.Command
- func ServerCommand(cmder ServerCommander) *cobra.Command
- func VaultCommand(cmder VaultCommander) *cobra.Command
- func VersionCommand() *cobra.Command
- type App
- func (a *App) AppConfig() AppConfig
- func (a *App) BootstrapModule(ctx context.Context, cat modules.Category, typeName, moduleName string) error
- func (a *App) BuildrConfig() config.Buildr
- func (a *App) Init(ctx context.Context) (err error)
- func (a *App) InitAt(ctx context.Context, lvl InitLevel) error
- func (a *App) Repository() *modules.Repository
- func (a *App) Run(ctx context.Context) error
- func (a *App) RunModule(ctx context.Context, cat modules.Category, name string) error
- func (a *App) RunWithArgs(ctx context.Context, args ...string) error
- func (a *App) SetInitializer(lvl InitLevel, init AppInitializer)
- func (a *App) Shutdown() error
- type AppConfig
- func (c *AppConfig) BuildRFS() fs.FS
- func (c *AppConfig) CollectRepoDetails(vcsInfo any) (repoDetails repo.Repo, err error)
- func (c *AppConfig) Flags() *flag.FlagSet
- func (c *AppConfig) Ignorer() (*ignore.Ignorer, error)
- func (c *AppConfig) InitPaths(from string) (err error)
- func (c *AppConfig) InitState(ctx context.Context) (*state.DB, error)
- func (c *AppConfig) InitVault() (*vault.Vault, error)
- func (c *AppConfig) ParseVCSInfo() (vcsDetails any, err error)
- func (c *AppConfig) RepoFS() fs.FS
- type AppConfigAccessor
- type AppInitializer
- type AppInitializerFunc
- type BootstrapModuleCommander
- type BuildrConfigAccessor
- type CommandPager
- type EnvApp
- type EnvCommander
- type InitLevel
- type KnownModulesArgProvider
- type KnownModulesArgProviderFunc
- type KnownTasksArgProvider
- type KnownTasksArgProviderFunc
- type LevelInitializer
- type ManApp
- type ManAppServiceAccess
- type ManCommander
- type ManConfig
- type ModuleCommandOption
- type ModuleCommander
- type ModuleRepositoryAccessor
- type Pager
- type PagerColor
- type PluginApp
- type PluginAppServiceAccess
- type PluginCommander
- type ServerApp
- type ServerCommander
- type TUIPager
- type TypeRegistryAccessor
- type VaultApp
- func (v VaultApp) Get(ctx context.Context, key string, writer io.Writer) error
- func (v VaultApp) Init(ctx context.Context, initCfg VaultInitConfig) error
- func (v VaultApp) List(ctx context.Context, writer io.Writer) error
- func (v VaultApp) Remove(ctx context.Context, key string) error
- func (v VaultApp) Set(ctx context.Context, key string, value []byte) error
- type VaultAppServiceAccess
- type VaultCommander
- type VaultInitConfig
Constants ¶
This section is empty.
Variables ¶
View Source
var CurrentVersion = "development"
View Source
var ErrRepoRootNotFound = errors.New("failed to detect repo root")
View Source
var ErrVaultNotInitiated = errors.New("vault is not initiated set either vault-passphrase or vault-passphrase-file")
Functions ¶
func BootstrapModuleCmd ¶
func BootstrapModuleCmd( category modules.Category, cmder BootstrapModuleCommander, argsProvider KnownModulesArgProvider, opts ...ModuleCommandOption, ) *cobra.Command
func EnvCommand ¶
func EnvCommand(cmder EnvCommander) *cobra.Command
func ExecuteModuleCommand ¶
func ExecuteModuleCommand( category modules.Category, cmder ModuleCommander, argsProvider KnownTasksArgProvider, opts ...ModuleCommandOption, ) *cobra.Command
func ManCmd ¶
func ManCmd( cmder ManCommander, initializer LevelInitializer, registryAcc TypeRegistryAccessor, ) *cobra.Command
func ModuleManCommand ¶
func ModuleManCommand( category modules.Category, cmder ManCommander, initializer LevelInitializer, argsProvider KnownModulesArgProvider, manCfg *ManConfig, ) *cobra.Command
func ModulesCommand ¶
func ModulesCommand( initializer LevelInitializer, registryAcc TypeRegistryAccessor, manCmder ManCommander, moduleCmder BootstrapModuleCommander, ) *cobra.Command
func ModulesListCommand ¶
func ModulesListCommand( initializer LevelInitializer, registryAcc TypeRegistryAccessor, out io.Writer, ) *cobra.Command
func PluginListCommand ¶
func PluginListCommand(cmder PluginCommander, initializer LevelInitializer) *cobra.Command
func PluginUpdateCommand ¶
func PluginUpdateCommand(cmder PluginCommander, initializer LevelInitializer) *cobra.Command
func PluginsCommand ¶
func PluginsCommand(cmder PluginCommander, initializer LevelInitializer) *cobra.Command
func ServerCommand ¶
func ServerCommand(cmder ServerCommander) *cobra.Command
func VaultCommand ¶
func VaultCommand(cmder VaultCommander) *cobra.Command
func VersionCommand ¶
Types ¶
type App ¶
type App struct { *services.Collection // contains filtered or unexported fields }
func (*App) BootstrapModule ¶
func (*App) BuildrConfig ¶
func (*App) Repository ¶
func (a *App) Repository() *modules.Repository
func (*App) SetInitializer ¶
func (a *App) SetInitializer(lvl InitLevel, init AppInitializer)
type AppConfig ¶
type AppConfig struct { Vault struct { FilePath string Passphrase string PassphraseFile string } VCSType vcs.Type BuildRDirectory string RepoRoot string State struct{ FilePath string } Profiling profiling.Config Cache struct{ TTL time.Duration } Execution struct { LogToStderr bool CleanDirectories bool } }
func (*AppConfig) CollectRepoDetails ¶
func (*AppConfig) ParseVCSInfo ¶
type AppConfigAccessor ¶
type AppConfigAccessor interface {
AppConfig() AppConfig
}
type AppInitializer ¶
type AppInitializerFunc ¶
type BuildrConfigAccessor ¶
type CommandPager ¶
type CommandPager struct {
// contains filtered or unexported fields
}
func NewCmdPager ¶
func (*CommandPager) Display ¶
func (c *CommandPager) Display() error
type EnvApp ¶
type EnvApp struct {
// contains filtered or unexported fields
}
func NewEnvApp ¶
func NewEnvApp(initializer LevelInitializer, accessor BuildrConfigAccessor) *EnvApp
type EnvCommander ¶
type KnownModulesArgProvider ¶
type KnownModulesArgProvider interface {
ValidModulesArgs(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)
}
func ModulesArgsProviderFor ¶
func ModulesArgsProviderFor( initializer LevelInitializer, registryAcc TypeRegistryAccessor, cat modules.Category, ) KnownModulesArgProvider
type KnownModulesArgProviderFunc ¶
type KnownModulesArgProviderFunc func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)
func (KnownModulesArgProviderFunc) ValidModulesArgs ¶
func (f KnownModulesArgProviderFunc) ValidModulesArgs( cmd *cobra.Command, args []string, toComplete string, ) ([]string, cobra.ShellCompDirective)
type KnownTasksArgProvider ¶
type KnownTasksArgProvider interface {
ValidTasksArgs(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)
}
func TasksArgsProviderFor ¶
func TasksArgsProviderFor(initializer LevelInitializer, repoAcc ModuleRepositoryAccessor, cat modules.Category) KnownTasksArgProvider
type KnownTasksArgProviderFunc ¶
type KnownTasksArgProviderFunc func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)
func (KnownTasksArgProviderFunc) ValidTasksArgs ¶
func (f KnownTasksArgProviderFunc) ValidTasksArgs( cmd *cobra.Command, args []string, toComplete string, ) ([]string, cobra.ShellCompDirective)
type LevelInitializer ¶
type ManApp ¶
type ManApp struct {
// contains filtered or unexported fields
}
func (ManApp) DisplayModuleManual ¶
func (ManApp) DisplayModulesManual ¶
type ManAppServiceAccess ¶
type ManAppServiceAccess interface { services.TypeRegistryAccessor }
type ManCommander ¶
type ManConfig ¶
type ManConfig struct { ColorOutput PagerColor PagerCommand string }
type ModuleCommandOption ¶
func WithShort ¶
func WithShort(short string) ModuleCommandOption
type ModuleCommander ¶
type ModuleRepositoryAccessor ¶
type ModuleRepositoryAccessor interface {
Repository() *modules.Repository
}
type PagerColor ¶
type PagerColor string
const ( PagerColorAuto PagerColor = "auto" PagerColorAlways PagerColor = "always" PagerColorNever PagerColor = "never" )
func (*PagerColor) Set ¶
func (p *PagerColor) Set(s string) error
func (*PagerColor) String ¶
func (p *PagerColor) String() string
type PluginApp ¶
type PluginApp struct {
// contains filtered or unexported fields
}
func NewPluginApp ¶
func (PluginApp) ListPlugins ¶
type PluginAppServiceAccess ¶
type PluginAppServiceAccess interface { services.PluginsRepoAccessor }
type PluginCommander ¶
type ServerApp ¶
type ServerApp struct {
// contains filtered or unexported fields
}
func NewServerApp ¶
func NewServerApp(initializer LevelInitializer, accessor services.TypeRegistryAccessor) *ServerApp
type ServerCommander ¶
type ServerCommander interface {
ServeAPI(ctx context.Context, cfg *rpc.GrpcConfig) error
}
type TUIPager ¶
type TUIPager struct {
// contains filtered or unexported fields
}
func NewTUIPager ¶
type TypeRegistryAccessor ¶
type TypeRegistryAccessor interface {
TypeRegistry() *modules.TypeRegistry
}
type VaultApp ¶
type VaultApp struct {
// contains filtered or unexported fields
}
func NewVaultApp ¶
func NewVaultApp( initializer LevelInitializer, serviceAccess VaultAppServiceAccess, configAccessor AppConfigAccessor, ) *VaultApp
type VaultAppServiceAccess ¶
type VaultAppServiceAccess interface { services.VaultAccessor services.CollectionModifier }
type VaultCommander ¶
type VaultCommander interface { Init(ctx context.Context, cfg VaultInitConfig) error List(ctx context.Context, writer io.Writer) error Get(ctx context.Context, key string, writer io.Writer) error Set(ctx context.Context, key string, value []byte) error Remove(ctx context.Context, key string) error }
type VaultInitConfig ¶
type VaultInitConfig struct {
PassphraseLength uint `mapstructure:"vault-pw-length"`
}
func (*VaultInitConfig) Flags ¶
func (c *VaultInitConfig) Flags() *flag.FlagSet
Click to show internal directories.
Click to hide internal directories.