Documentation ¶
Index ¶
- Constants
- func Translate[T beans.BeanType](params beans.BeanType) T
- func TranslateList[T beans.BeanType](params []beans.BeanType) []T
- func UnmarshalListResponse(resp *http.Response, bean beans.Bean) ([]beans.BeanType, error)
- func UnmarshalResponse(resp *http.Response, params beans.BeanType) error
- func UrlParamsAction(prev url.Values, action string) url.Values
- func UrlParamsCount(prev url.Values, count int) url.Values
- func UrlParamsFilters(prev url.Values, filterType FilterType, filters ...Filter) url.Values
- func UrlParamsOffset(prev url.Values, offset int) url.Values
- func UrlParamsProps(prev url.Values, props ...string) url.Values
- func WithInsecureSkipVerify(insecureSkipVerify bool) clientOpt
- func WithLocker(locker sync.Locker) clientOpt
- func WithNoAutoApplySaveSync() clientOpt
- func WithNoLock() clientOpt
- type AgApplyConfig
- type AgSaveConfig
- type AgSyncStatus
- type BulkItem
- type BulkMethod
- type Client
- func (c *Client) Apply() (*StatusResponse, error)
- func (c *Client) ApplySaveSync() (st *StatusGlobal, err error)
- func (c *Client) Bulk(items []*BulkItem) ([]*StatusResponse, error)
- func (c *Client) Create(bean beans.Bean, urlParams url.Values) (*StatusResponse, error)
- func (c *Client) Delete(bean beans.Bean, urlParams url.Values) (*StatusResponse, error)
- func (c *Client) Do(req *http.Request) (*http.Response, error)
- func (c *Client) ExportAppShape(params *ImpExpAppShapeParams) ([]byte, error)
- func (c *Client) ExportConfig(params *ImpExpConfigParams) ([]byte, error)
- func (c *Client) ExportHcExtScript(params *ImpExpHcExtScriptParams) ([]byte, error)
- func (c *Client) ExportSsl(params *ImpExpSslParams) ([]byte, error)
- func (c *Client) Get(bean beans.Bean, urlParams url.Values) (beans.BeanType, error)
- func (c *Client) ImportAppShape(data []byte, params *ImpExpAppShapeParams) (*StatusResponse, error)
- func (c *Client) ImportAppShapeAsBulk(data []byte, params *ImpExpAppShapeParams) (*BulkItem, error)
- func (c *Client) ImportConfig(data []byte, params *ImpExpConfigParams) (*StatusResponse, error)
- func (c *Client) ImportHcExtScript(data []byte, params *ImpExpHcExtScriptParams) (*StatusResponse, error)
- func (c *Client) ImportHcExtScriptAsBulk(data []byte, params *ImpExpHcExtScriptParams) (*BulkItem, error)
- func (c *Client) ImportSsl(data []byte, params *ImpExpSslParams) (*StatusResponse, error)
- func (c *Client) ImportSslAsBulk(data []byte, params *ImpExpSslParams) (*BulkItem, error)
- func (c *Client) IsApplyPending() (bool, error)
- func (c *Client) List(bean beans.Bean, urlParams url.Values) ([]beans.BeanType, error)
- func (c *Client) Logout() error
- func (c *Client) NewRequest(method string, bean beans.Bean, urlParams url.Values) (*http.Request, error)
- func (c *Client) Post(bean beans.Bean, urlParams url.Values) (*StatusResponse, error)
- func (c *Client) Put(bean beans.Bean, urlParams url.Values) (*StatusResponse, error)
- func (c *Client) Revert() (*StatusResponse, error)
- func (c *Client) RevertAll() (*StatusResponse, error)
- func (c *Client) Save() (*StatusResponse, error)
- func (c *Client) SetDebug(debug bool)
- func (c *Client) ShowDiff() (string, error)
- func (c *Client) ShowDiffFlash() (string, error)
- func (c *Client) StatusGlobal() (*StatusGlobal, error)
- func (c *Client) Sync() (*StatusResponse, error)
- func (c *Client) Update(bean beans.Bean, urlParams url.Values) (*StatusResponse, error)
- type ConfigRecoveryType
- type ConfigType
- type Filter
- type FilterType
- type ImpExpAppShapeParams
- type ImpExpConfigParams
- type ImpExpHcExtScriptParams
- type ImpExpSslParams
- type NoLocker
- type SrcType
- type SslType
- type StatusGlobal
- type StatusResponse
Constants ¶
View Source
const ( UrlParamsKeyProp = "prop" UrlParamsKeyProps = "props" UrlParamsKeyOffset = "offset" UrlParamsKeyCount = "count" UrlParamsKeyAction = "action" UrlParamsKeyFilter = "filter" UrlParamsKeyFilterType = "filtertype" )
View Source
const (
DefaultCount = 9000
)
Variables ¶
This section is empty.
Functions ¶
func UnmarshalListResponse ¶
func UrlParamsFilters ¶
func WithInsecureSkipVerify ¶
func WithInsecureSkipVerify(insecureSkipVerify bool) clientOpt
func WithLocker ¶
func WithNoAutoApplySaveSync ¶
func WithNoAutoApplySaveSync() clientOpt
func WithNoLock ¶
func WithNoLock() clientOpt
Types ¶
type AgApplyConfig ¶
type AgApplyConfig int
const ( AgApplyConfigApply AgApplyConfig = 1 AgApplyConfigIdle AgApplyConfig = 2 AgApplyConfigInProgress AgApplyConfig = 3 AgApplyConfigComplete AgApplyConfig = 4 AgApplyConfigFailed AgApplyConfig = 5 )
type AgSaveConfig ¶
type AgSaveConfig int
const ( AgSaveConfigSave AgSaveConfig = 1 AgSaveConfigIdle AgSaveConfig = 2 AgSaveConfigInProgress AgSaveConfig = 3 AgSaveConfigComplete AgSaveConfig = 4 AgSaveConfigFailed AgSaveConfig = 5 AgSaveConfigSaveNoBackup AgSaveConfig = 6 )
type AgSyncStatus ¶
type AgSyncStatus int
const ( AgSyncStatusIdle AgSyncStatus = 0 AgSyncStatusInProgress AgSyncStatus = 1 AgSyncStatusSuccess AgSyncStatus = 2 AgSyncStatusFailure AgSyncStatus = 3 )
type BulkItem ¶
func NewBulkItem ¶
type BulkMethod ¶
type BulkMethod uint
const ( BulkMethodPost BulkMethod = iota BulkMethodCreate BulkMethodPut BulkMethodUpdate BulkMethodDelete )
func (BulkMethod) ToHttpMethod ¶
func (m BulkMethod) ToHttpMethod() string
type Client ¶
type Client struct { Target string // contains filtered or unexported fields }
func (*Client) Apply ¶
func (c *Client) Apply() (*StatusResponse, error)
func (*Client) ApplySaveSync ¶
func (c *Client) ApplySaveSync() (st *StatusGlobal, err error)
func (*Client) ExportAppShape ¶
func (c *Client) ExportAppShape(params *ImpExpAppShapeParams) ([]byte, error)
func (*Client) ExportConfig ¶
func (c *Client) ExportConfig(params *ImpExpConfigParams) ([]byte, error)
func (*Client) ExportHcExtScript ¶ added in v0.6.0
func (c *Client) ExportHcExtScript(params *ImpExpHcExtScriptParams) ([]byte, error)
func (*Client) ImportAppShape ¶
func (c *Client) ImportAppShape(data []byte, params *ImpExpAppShapeParams) (*StatusResponse, error)
func (*Client) ImportAppShapeAsBulk ¶ added in v0.10.0
func (c *Client) ImportAppShapeAsBulk(data []byte, params *ImpExpAppShapeParams) (*BulkItem, error)
func (*Client) ImportConfig ¶
func (c *Client) ImportConfig(data []byte, params *ImpExpConfigParams) (*StatusResponse, error)
func (*Client) ImportHcExtScript ¶ added in v0.6.0
func (c *Client) ImportHcExtScript(data []byte, params *ImpExpHcExtScriptParams) (*StatusResponse, error)
func (*Client) ImportHcExtScriptAsBulk ¶ added in v0.10.0
func (c *Client) ImportHcExtScriptAsBulk(data []byte, params *ImpExpHcExtScriptParams) (*BulkItem, error)
func (*Client) ImportSsl ¶
func (c *Client) ImportSsl(data []byte, params *ImpExpSslParams) (*StatusResponse, error)
func (*Client) ImportSslAsBulk ¶ added in v0.10.0
func (c *Client) ImportSslAsBulk(data []byte, params *ImpExpSslParams) (*BulkItem, error)
func (*Client) IsApplyPending ¶ added in v0.8.0
func (*Client) NewRequest ¶
func (*Client) Revert ¶
func (c *Client) Revert() (*StatusResponse, error)
func (*Client) RevertAll ¶
func (c *Client) RevertAll() (*StatusResponse, error)
func (*Client) Save ¶
func (c *Client) Save() (*StatusResponse, error)
func (*Client) ShowDiffFlash ¶
func (*Client) StatusGlobal ¶
func (c *Client) StatusGlobal() (*StatusGlobal, error)
func (*Client) Sync ¶
func (c *Client) Sync() (*StatusResponse, error)
type ConfigRecoveryType ¶
type ConfigRecoveryType string
const ( ConfigRecoveryTypeAll ConfigRecoveryType = "all" ConfigRecoveryTypeVAdmin ConfigRecoveryType = "vadmin" )
type ConfigType ¶
type ConfigType string
const ( ConfigTypeAll ConfigType = "all" ConfigTypeVADC ConfigType = "vadc" ConfigTypePADC ConfigType = "padc" )
type FilterType ¶
type FilterType string
const ( FilterTypeExact FilterType = "exact" FilterTypeAny FilterType = "any" )
type ImpExpAppShapeParams ¶
func (*ImpExpAppShapeParams) Values ¶
func (i *ImpExpAppShapeParams) Values() url.Values
type ImpExpConfigParams ¶
type ImpExpConfigParams struct { Pkey bool Passphrase string ManSync bool ConfigType ConfigType VADCList []string ConfigRecoveryType ConfigRecoveryType SrcType SrcType }
func (*ImpExpConfigParams) Values ¶
func (i *ImpExpConfigParams) Values() url.Values
type ImpExpHcExtScriptParams ¶ added in v0.6.0
func (*ImpExpHcExtScriptParams) Values ¶ added in v0.6.0
func (i *ImpExpHcExtScriptParams) Values() url.Values
type ImpExpSslParams ¶
type ImpExpSslParams struct { ID string SslType SslType Passphrase string SrcType SrcType RenewId string }
func (*ImpExpSslParams) Values ¶
func (i *ImpExpSslParams) Values() url.Values
type StatusGlobal ¶
type StatusGlobal struct { NoApplyPending bool AgSaveConfig AgSaveConfig `mapstructure:"agSaveConfig"` AgSaveLastError error AgApplyConfig AgApplyConfig `mapstructure:"agApplyConfig"` AgApplyLastError error AgSyncStatus AgSyncStatus `mapstructure:"agSyncStatus"` AgLastSyncErrorReason string `mapstructure:"agLastSyncErrorReason"` AgLastSyncError error }
type StatusResponse ¶
type StatusResponse struct { StatusCode int `json:"-"` Status string `json:"status"` Message string `json:"message"` TestErr string `json:"testErr"` }
func UnmarshalStatus ¶
func UnmarshalStatus(statusCode int, data []byte) (*StatusResponse, error)
func UnmarshalStatusResponse ¶
func UnmarshalStatusResponse(resp *http.Response) (*StatusResponse, error)
func (*StatusResponse) Error ¶
func (s *StatusResponse) Error() string
func (*StatusResponse) IsError ¶
func (s *StatusResponse) IsError() bool
func (*StatusResponse) String ¶
func (s *StatusResponse) String() string
Source Files ¶
Click to show internal directories.
Click to hide internal directories.