nexssflow

package
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 25, 2026 License: Apache-2.0 Imports: 11 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package nexssflow ships the Flow bundle for local SSH setup, profile-based commands, and SFTP transfers.

Typical use:

@require github.com/nexssp/ssh/nexssflow { profiles_file: "~/.config/nexss/ssh/profiles.yml" }
{ profile: "staging", command: "uname -s" } -> ssh.run

Index

Constants

View Source
const ID = "ssh"

Variables

This section is empty.

Functions

func Bundle

func Bundle(rawOpts map[string]string) compiler.Bundle

Bundle creates the Flow extension. Local profiles are loaded on first action execution, not while the compiler or a lint harness loads the extension.

func NewBundle

func NewBundle(cfg Config) (compiler.Bundle, error)

NewBundle validates configuration and eagerly loads an immutable profile snapshot for callers that construct the bundle directly.

func WithProfileProvider added in v0.2.0

func WithProfileProvider(ctx context.Context, provider ProfileProvider) context.Context

WithProfileProvider scopes profile resolution to one Flow execution context. When present, the provider takes precedence over profiles_file; provider failures are returned rather than silently falling back to another store.

Types

type Config

type Config struct {
	ProfilesFile   string        `nflow:"profiles_file"`
	KeyDirectory   string        `nflow:"key_dir"`
	KnownHostsFile string        `nflow:"known_hosts_file"`
	Timeout        time.Duration `nflow:"timeout" default:"2m"`
	MaxBytes       int64         `nflow:"max_bytes" default:"268435456"`
}

Config controls local profile loading, setup paths, and operation limits.

type ConfigRequest added in v0.2.0

type ConfigRequest struct {
	Marker bool `json:"marker,omitempty"`
}

ConfigRequest is intentionally empty; host-specific config paths are bundle options.

type HostRequest added in v0.2.0

type HostRequest struct {
	Host string `json:"host"`
	Port string `json:"port,omitempty"`
}

HostRequest identifies the host whose currently presented key should be inspected.

type KeygenRequest added in v0.2.0

type KeygenRequest struct {
	Name string `json:"name,omitempty"`
}

KeygenRequest requests a local Ed25519 key pair. It never carries key material.

type ProfileProvider added in v0.2.0

type ProfileProvider interface {
	SSHProfile(ctx context.Context, name string) (sshx.Profile, error)
}

ProfileProvider resolves a locally stored SSH profile by name or host-owned identifier. Implementations may read an existing database or settings store; this bundle does not create or persist profiles itself.

type ProfileProviderFunc added in v0.2.0

type ProfileProviderFunc func(context.Context, string) (sshx.Profile, error)

ProfileProviderFunc adapts a function to ProfileProvider.

func (ProfileProviderFunc) SSHProfile added in v0.2.0

func (f ProfileProviderFunc) SSHProfile(ctx context.Context, name string) (sshx.Profile, error)

SSHProfile implements ProfileProvider.

type RunRequest

type RunRequest struct {
	Profile string `json:"profile"`
	Command string `json:"command"`
}

RunRequest selects only a local profile and supplies the remote command. Host, username, identity, and host-key trust are deliberately not inputs.

type TestRequest added in v0.2.0

type TestRequest struct {
	Host string `json:"host"`
	Port string `json:"port,omitempty"`
	User string `json:"user,omitempty"`
	Key  string `json:"key,omitempty"`
}

TestRequest selects a remote host and local key for a batch-mode auth check.

type TransferRequest

type TransferRequest struct {
	Profile    string `json:"profile"`
	LocalPath  string `json:"local_path"`
	RemotePath string `json:"remote_path"`
}

TransferRequest selects a local profile and the two file paths for one SFTP transfer.

type TrustRequest added in v0.2.0

type TrustRequest struct {
	Host string `json:"host"`
	Port string `json:"port,omitempty"`
	Keys string `json:"keys"`
}

TrustRequest carries the key lines shown in the fingerprint response. The calling UI must obtain explicit user confirmation before invoking this action.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL