Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // BuildVersion is the build version BuildVersion = "v0.0" // BuildDate is the build date BuildDate = "0000-00-00T00:00:00+0000" // BuildCommit is the commit id of source BuildCommit = "XXXX" // BuildBranch is the branch name BuildBranch = "XXXX" // BuildRepo is the repository url BuildRepo = "XXXX" // BuildEnv is the build environment information BuildEnv = "XXXX" )
var Commands = map[string]Command{}
Commands is the collection of sault commands
var ConfigFileExt = ".conf"
ConfigFileExt is the file extension of config file
var DefaultClientKey = "./sault-client.key"
DefaultClientKey is the default internal client key file path
var DefaultHostKey = "./sault-host.key"
DefaultHostKey is the default host key file path
var DefaultSaultHostID = "sault-host"
DefaultSaultHostID is the default host name, which is running the sault server
var DefaultSaultServerName = "sault"
DefaultSaultServerName is the name of sault server, it will be use to connect to the sault server directly.
var DefaultServerPort = uint64(2222)
DefaultServerPort is the default bind address of sault server
Functions ¶
Types ¶
type Command ¶
type Command interface { Request(allFlags []*saultflags.Flags, thisFlags *saultflags.Flags) error Response(user saultregistry.UserRegistry, channel saultssh.Channel, msg saultcommon.CommandMsg, registry *saultregistry.Registry, config *Config) error }
Command is the command interface for sault server
type Config ¶
type Config struct { Server configServer Registry configRegistry // contains filtered or unexported fields }
Config contains configurations
func LoadConfigs ¶
LoadConfigs loads configs
func (*Config) GetBaseDirectory ¶
GetBaseDirectory returns base directory
func (*Config) SetBaseDirectory ¶
SetBaseDirectory set the base directory
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is the main server of sault