Documentation ¶
Overview ¶
Copyright © 2022 Kostas Antonopoulos kost.antonopoulos@gmail.com
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright © 2022 Kostas Antonopoulos kost.antonopoulos@gmail.com
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright © 2022 Kostas Antonopoulos kost.antonopoulos@gmail.com
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- Constants
- type Server
- func (server Server) CloseClient() error
- func (server *Server) Connect() error
- func (server *Server) CreateServerChain(servers map[string]ServerInterface) error
- func (server Server) Download(file, dest string) error
- func (server Server) GetName() string
- func (server Server) String() string
- func (server Server) Upload(file, dest string) error
- type ServerInterface
Constants ¶
const DefaultPort = 22
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct { Name string `mapstructure:"name"` Addr string `mapstructure:"addr"` Port int `mapstructure:"port"` AuthenticationMethod string `mapstructure:"authentication_method"` User string `mapstructure:"user"` Pass string `mapstructure:"pass"` Gateway string `mapstructure:"gateway"` BecomeUser string `mapstructure:"become_user"` // contains filtered or unexported fields }
func (*Server) Connect ¶
Connect to server connects to the server, hopping through all of the servers in the list starting from the last
func (*Server) CreateServerChain ¶
func (server *Server) CreateServerChain(servers map[string]ServerInterface) error
CreateServerChain populates the serverChain field with a list of servers that should be used as gateways server index 0 is the server closest to our Server