server

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2026 License: MIT Imports: 17 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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddHostToKnownHosts

func AddHostToKnownHosts(ip string, knownHostsPath string) error

func GenerateVPSResourceView

func GenerateVPSResourceView(appCfg *config.AppConfig, resMap VPSResourceMap) (string, error)

GenerateVPSResourceView creates a premium HTML report of the provisioned resources

Types

type SSHClient

type SSHClient struct {
	Client     *ssh.Client
	Config     *ssh.ClientConfig
	SFTPClient *sftp.Client
	LastUsed   time.Time
	// contains filtered or unexported fields
}

type ServerOption

type ServerOption func(*ServerStruct) error

func WithConfig

func WithConfig() ServerOption

func WithDaemon

func WithDaemon() ServerOption

func WithSSH

func WithSSH() ServerOption

type ServerStruct

type ServerStruct struct {
	// contains filtered or unexported fields
}

func New

func New(opts ...ServerOption) (*ServerStruct, error)

func (*ServerStruct) BasicCaddySetup

func (s *ServerStruct) BasicCaddySetup(ctx context.Context, serverName string, stream io.Writer) error

func (*ServerStruct) CloseSSHConnection

func (s *ServerStruct) CloseSSHConnection() error

func (*ServerStruct) DownloadFile

func (s *ServerStruct) DownloadFile(ctx context.Context, serverName, remotePath, localPath string) error

func (*ServerStruct) ExecuteCommand

func (s *ServerStruct) ExecuteCommand(ctx context.Context, serverName, command string, stream io.Writer) (string, error)

func (*ServerStruct) GetDeploymentServer

func (s *ServerStruct) GetDeploymentServer() (string, error)

func (*ServerStruct) GetServerStatus

func (s *ServerStruct) GetServerStatus(serverName string, stream io.Writer) (string, error)

func (*ServerStruct) ListServers

func (s *ServerStruct) ListServers() []string

func (*ServerStruct) PingServer

func (s *ServerStruct) PingServer(serverName string) error

func (*ServerStruct) Reconnect

func (s *ServerStruct) Reconnect(serverName string) error

func (*ServerStruct) UploadFile

func (s *ServerStruct) UploadFile(ctx context.Context, serverName, localPath, remotePath string) error

type VPSResourceMap

type VPSResourceMap struct {
	AppName        string
	Environment    string
	ServerIP       string
	CustomDomain   string
	Port           int
	DeploymentTime time.Time
	DNSProvider    string // "namecheap", "cloudflare", "godaddy", "route53", "other"
}

VPSResourceMap holds the metadata for the visual report

Jump to

Keyboard shortcuts

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