Versions in this module Expand all Collapse all v1 v1.0.5 Sep 19, 2024 v1.0.4 Sep 13, 2024 v1.0.3 Aug 28, 2024 v1.0.2 Aug 22, 2024 Changes in this version + const F5TimeLayout + const MaxChunkSize + const PathBackup + const PathBashCmd + const PathConfigSync + const PathDeviceInfo + const PathDownloadImage + const PathDownloadQKView + const PathDownloadUCS + const PathSyncStatus + const PathTransaction + const QKViewPath + const UploadRESTPath + var DefaultTimeout = 5 * time.Second + var ErrNoToken = errors.New("no token") + var ErrNoTransaction = errors.New("no active transaction") + var PathUploadFile = FileTransferPath + var PathUploadImage = FileTransferPath + var PathUploadUCS = FileTransferPath + func CreateToken(baseURL, user, password, loginProvName string) (string, time.Time, error) + func IsRequestError(err error) bool + type BackupResponse struct + Action string + File string + ID string + Status string + func (resp BackupResponse) IsCanceled() bool + func (resp BackupResponse) IsDone() bool + func (resp BackupResponse) IsFailure() bool + func (resp BackupResponse) IsSuccess() bool + type Client struct + func NewBasicClient(baseURL, user, password string) (*Client, error) + func NewTokenClient(baseURL, user, password, loginProvName string) (*Client, error) + func TokenClientConnection(baseURL, token string) (*Client, error) + func (c *Client) Backup(filename string) (*BackupResponse, error) + func (c *Client) Begin() (*Client, error) + func (c *Client) CheckAuth() error + func (c *Client) CheckBackup(id string) (*BackupResponse, error) + func (c *Client) CheckQKView(id string) (*QKViewResponse, error) + func (c *Client) Commit() error + func (c *Client) ConfigSync(opts ...ConfigSyncOption) error + func (c *Client) DeleteQKView(id string) (*QKViewResponse, error) + func (c *Client) DisableCertCheck() + func (c *Client) Do(req *http.Request) (*http.Response, error) + func (c *Client) DownloadImage(w io.Writer, filename string, opts ...FileTransferOption) (n int64, err error) + func (c *Client) DownloadQKView(w io.Writer, filename string, opts ...FileTransferOption) (n int64, err error) + func (c *Client) DownloadUCS(w io.Writer, filename string, opts ...FileTransferOption) (n int64, err error) + func (c *Client) Exec(cmd string) (*ExecOutput, error) + func (c *Client) ExecTMSH(cmd string) (*ExecOutput, error) + func (c *Client) FailoverState(host, ip string) (string, error) + func (c *Client) GenerateQKView(filename string) (*QKViewResponse, error) + func (c *Client) IsActive(host string) bool + func (c *Client) ListQKViews() ([]QKViewResponse, error) + func (c *Client) MakeRequest(method, restPath string, data interface{}) (*http.Request, error) + func (c *Client) ModQuery(method, restPath string, inputData interface{}) error + func (c *Client) ReadError(resp *http.Response) error + func (c *Client) ReadQuery(restPath string, outputData interface{}) error + func (c *Client) RestoreBackup(filename string) (*BackupResponse, error) + func (c *Client) RestoreBackupWithNoLicense(filename string) (*BackupResponse, error) + func (c *Client) RevokeToken() error + func (c *Client) Rollback() error + func (c *Client) SendRequest(method, restPath string, data interface{}) (*http.Response, error) + func (c *Client) SetHTTPClient(client http.Client) + func (c *Client) SetTimeout(timeout time.Duration) + func (c *Client) SyncStatus() (status string, color string, err error) + func (c *Client) SyncStatusDetails() (SyncStatusResp, error) + func (c *Client) TransactionID() string + func (c *Client) TransactionState() (*Transaction, error) + func (c *Client) UploadFile(r io.Reader, filename string, filesize int64, opts ...FileTransferOption) (*UploadResponse, error) + func (c *Client) UploadImage(r io.Reader, filename string, filesize int64, opts ...FileTransferOption) (*UploadResponse, error) + func (c *Client) UploadUCS(r io.Reader, filename string, filesize int64, opts ...FileTransferOption) (*UploadResponse, error) + func (c *Client) UseProxy(proxy string) error + func (c *Client) UseSystemProxy() error + type ConfigSyncOption func(*ConfigSyncOptions) + func WithForceFullLoadPush() ConfigSyncOption + func WithFromGroup(name string) ConfigSyncOption + func WithRecoverSync() ConfigSyncOption + func WithToGroup(name string) ConfigSyncOption + type ConfigSyncOptions struct + ForceFullLoadPush bool + FromGroup string + RecoverSync bool + ToGroup string + type ExecOutput struct + Command string + CommandResult string + Kind string + UtilCmdArgs string + type F5Date struct + func (d *F5Date) UnmarshalJSON(b []byte) error + type FileTransferOption func(*FileTransferOptions) + func WithRemotePath(path string) FileTransferOption + func WithSFTP(config *ssh.ClientConfig) FileTransferOption + func WithTarget(target FileTransferPath) FileTransferOption + type FileTransferOptions struct + ClientConfig *ssh.ClientConfig + RemotePath string + Target FileTransferPath + UseSFTP bool + type FileTransferPath struct + RemoteDir string + URI string + type QKViewResponse struct + ID string + Name string + Status string + type RequestError struct + Code int + ErrStack []string + Message string + func NewRequestError(body io.Reader) (*RequestError, error) + func (err RequestError) Error() string + func (err RequestError) String() string + type SyncStatusResp struct + Action string + Color string + GroupName string + Status string + type Transaction struct + AsyncExecution bool + ExecutionTimeout int64 + FailureReason string + Kind string + SelfLink string + State string + TimeoutSeconds int64 + TransID int64 + ValidateOnly bool + type UploadResponse struct + Generation int64 + LastUpdateMicros int64 + LocalFilePath string + RemainingByteCount int64 + TemporaryFilePath string + TotalByteCount int64 + UsedChunks map[string]int