Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClusterContext ¶
type ClusterContext struct {
Identifier string
ClusterName string
Organization string
Config *v2.Config
Paths *paths.ClusterPaths
}
ClusterContext contains the resolved config and filesystem paths for a cluster.
type ClusterResolver ¶
type ClusterResolver struct {
// contains filtered or unexported fields
}
ClusterResolver resolves cluster identifiers to canonical config and path state.
func NewClusterResolver ¶
func NewClusterResolver() (*ClusterResolver, error)
NewClusterResolver returns a resolver backed by the shared config directories.
func (*ClusterResolver) Resolve ¶
func (r *ClusterResolver) Resolve(ctx context.Context, identifier string) (*ClusterContext, error)
Resolve loads a cluster config and resolves its organization-aware paths.
type DefaultExecutor ¶
type DefaultExecutor struct {
// contains filtered or unexported fields
}
DefaultExecutor delegates to the shared command runner.
func NewExecutor ¶
func NewExecutor() *DefaultExecutor
NewExecutor returns an executor backed by the process-wide command runner.
func (*DefaultExecutor) Run ¶
func (e *DefaultExecutor) Run(ctx context.Context, opts RunOptions) ([]byte, error)
Run executes a command and returns captured stdout/stderr.
func (*DefaultExecutor) RunStreaming ¶
func (e *DefaultExecutor) RunStreaming(ctx context.Context, opts RunOptions) error
RunStreaming executes a command while streaming stdout/stderr to the caller.
type Executor ¶
type Executor interface {
Run(ctx context.Context, opts RunOptions) ([]byte, error)
RunStreaming(ctx context.Context, opts RunOptions) error
}
Executor runs sanitized external commands.
type Layout ¶
type Layout struct {
Root string
GiteaDataDir string
GiteaConfDir string
GiteaCertDir string
TokensDir string
MetadataPath string
AppIniPath string
CACertPath string
ServerCertPath string
ServerKeyPath string
AdminTokenPath string
UserTokenPath string
}
Layout describes the local-dev plugin state directory.
func ResolveLayout ¶
ResolveLayout returns the absolute state layout for the plugin. When root is empty the layout defaults to <OPENCENTER_CONFIG_DIR>/local, keeping all state inside the standard configuration tree instead of creating a dot-directory in the working directory.