Documentation
¶
Overview ¶
A simple SDK client for 1Panel v1. API documentation: https://1panel.cn/docs/v1/dev_manual/api_manual/
Index ¶
- type Client
- func (c *Client) SetTLSConfig(config *tls.Config) *Client
- func (c *Client) SetTimeout(timeout time.Duration) *Client
- func (c *Client) SettingsSSLUpdate(req *SettingsSSLUpdateRequest) (*SettingsSSLUpdateResponse, error)
- func (c *Client) SettingsSSLUpdateWithContext(ctx context.Context, req *SettingsSSLUpdateRequest) (*SettingsSSLUpdateResponse, error)
- func (c *Client) WebsiteGet(websiteId int64) (*WebsiteGetResponse, error)
- func (c *Client) WebsiteGetWithContext(ctx context.Context, websiteId int64) (*WebsiteGetResponse, error)
- func (c *Client) WebsiteHttpsGet(websiteId int64) (*WebsiteHttpsGetResponse, error)
- func (c *Client) WebsiteHttpsGetWithContext(ctx context.Context, websiteId int64) (*WebsiteHttpsGetResponse, error)
- func (c *Client) WebsiteHttpsPost(websiteId int64, req *WebsiteHttpsPostRequest) (*WebsiteHttpsPostResponse, error)
- func (c *Client) WebsiteHttpsPostWithContext(ctx context.Context, websiteId int64, req *WebsiteHttpsPostRequest) (*WebsiteHttpsPostResponse, error)
- func (c *Client) WebsiteSSLSearch(req *WebsiteSSLSearchRequest) (*WebsiteSSLSearchResponse, error)
- func (c *Client) WebsiteSSLSearchWithContext(ctx context.Context, req *WebsiteSSLSearchRequest) (*WebsiteSSLSearchResponse, error)
- func (c *Client) WebsiteSSLUpload(req *WebsiteSSLUploadRequest) (*WebsiteSSLUploadResponse, error)
- func (c *Client) WebsiteSSLUploadWithContext(ctx context.Context, req *WebsiteSSLUploadRequest) (*WebsiteSSLUploadResponse, error)
- func (c *Client) WebsiteSearch(req *WebsiteSearchRequest) (*WebsiteSearchResponse, error)
- func (c *Client) WebsiteSearchWithContext(ctx context.Context, req *WebsiteSearchRequest) (*WebsiteSearchResponse, error)
- type Options
- type OptionsFunc
- type SSLCertificate
- type SettingsSSLUpdateRequest
- type SettingsSSLUpdateResponse
- type Website
- type WebsiteDetail
- type WebsiteDomainConfig
- type WebsiteGetRequest
- type WebsiteGetResponse
- type WebsiteHTTPSConfig
- type WebsiteHttpsGetResponse
- type WebsiteHttpsPostRequest
- type WebsiteHttpsPostResponse
- type WebsiteSSLSearchRequest
- type WebsiteSSLSearchResponse
- type WebsiteSSLUploadRequest
- type WebsiteSSLUploadResponse
- type WebsiteSearchRequest
- type WebsiteSearchResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) SettingsSSLUpdate ¶ added in v0.4.6
func (c *Client) SettingsSSLUpdate(req *SettingsSSLUpdateRequest) (*SettingsSSLUpdateResponse, error)
func (*Client) SettingsSSLUpdateWithContext ¶ added in v0.4.6
func (c *Client) SettingsSSLUpdateWithContext(ctx context.Context, req *SettingsSSLUpdateRequest) (*SettingsSSLUpdateResponse, error)
func (*Client) WebsiteGet ¶ added in v0.4.6
func (c *Client) WebsiteGet(websiteId int64) (*WebsiteGetResponse, error)
func (*Client) WebsiteGetWithContext ¶ added in v0.4.6
func (*Client) WebsiteHttpsGet ¶ added in v0.4.6
func (c *Client) WebsiteHttpsGet(websiteId int64) (*WebsiteHttpsGetResponse, error)
func (*Client) WebsiteHttpsGetWithContext ¶ added in v0.4.6
func (*Client) WebsiteHttpsPost ¶ added in v0.4.6
func (c *Client) WebsiteHttpsPost(websiteId int64, req *WebsiteHttpsPostRequest) (*WebsiteHttpsPostResponse, error)
func (*Client) WebsiteHttpsPostWithContext ¶ added in v0.4.6
func (c *Client) WebsiteHttpsPostWithContext(ctx context.Context, websiteId int64, req *WebsiteHttpsPostRequest) (*WebsiteHttpsPostResponse, error)
func (*Client) WebsiteSSLSearch ¶ added in v0.4.6
func (c *Client) WebsiteSSLSearch(req *WebsiteSSLSearchRequest) (*WebsiteSSLSearchResponse, error)
func (*Client) WebsiteSSLSearchWithContext ¶ added in v0.4.6
func (c *Client) WebsiteSSLSearchWithContext(ctx context.Context, req *WebsiteSSLSearchRequest) (*WebsiteSSLSearchResponse, error)
func (*Client) WebsiteSSLUpload ¶ added in v0.4.6
func (c *Client) WebsiteSSLUpload(req *WebsiteSSLUploadRequest) (*WebsiteSSLUploadResponse, error)
func (*Client) WebsiteSSLUploadWithContext ¶ added in v0.4.6
func (c *Client) WebsiteSSLUploadWithContext(ctx context.Context, req *WebsiteSSLUploadRequest) (*WebsiteSSLUploadResponse, error)
func (*Client) WebsiteSearch ¶ added in v0.4.6
func (c *Client) WebsiteSearch(req *WebsiteSearchRequest) (*WebsiteSearchResponse, error)
func (*Client) WebsiteSearchWithContext ¶ added in v0.4.6
func (c *Client) WebsiteSearchWithContext(ctx context.Context, req *WebsiteSearchRequest) (*WebsiteSearchResponse, error)
type OptionsFunc ¶ added in v0.4.25
type OptionsFunc func(*Options)
func WithApiKey ¶ added in v0.4.25
func WithApiKey(apiKey string) OptionsFunc
type SSLCertificate ¶ added in v0.4.26
type SettingsSSLUpdateRequest ¶ added in v0.4.6
type SettingsSSLUpdateResponse ¶ added in v0.4.6
type SettingsSSLUpdateResponse struct {
// contains filtered or unexported fields
}
func (*SettingsSSLUpdateResponse) GetCode ¶ added in v0.4.6
func (r *SettingsSSLUpdateResponse) GetCode() int
func (*SettingsSSLUpdateResponse) GetMessage ¶ added in v0.4.6
func (r *SettingsSSLUpdateResponse) GetMessage() string
type Website ¶ added in v0.4.26
type Website struct {
ID int64 `json:"id"`
Alias string `json:"alias"`
PrimaryDomain string `json:"primaryDomain"`
Protocol string `json:"protocol"`
Type string `json:"type"`
Status string `json:"status"`
SitePath string `json:"sitePath"`
Remark string `json:"remark"`
SSLStatus string `json:"sslStatus,omitempty"`
SSLExpireDate string `json:"sslExpireDate,omitempty"`
WebsiteSSLID int64 `json:"webSiteSSLId,omitempty"`
UpdatedAt string `json:"updatedAt"`
CreatedAt string `json:"createdAt"`
}
type WebsiteDetail ¶ added in v0.4.26
type WebsiteDetail struct {
Website
Domains []*WebsiteDomainConfig `json:"domains"`
}
type WebsiteDomainConfig ¶ added in v0.4.26
type WebsiteGetRequest ¶ added in v0.4.6
type WebsiteGetResponse ¶ added in v0.4.6
type WebsiteGetResponse struct {
Data *WebsiteDetail `json:"data,omitempty"`
// contains filtered or unexported fields
}
func (*WebsiteGetResponse) GetMessage ¶ added in v0.4.6
func (r *WebsiteGetResponse) GetMessage() string
type WebsiteHTTPSConfig ¶ added in v0.4.26
type WebsiteHttpsGetResponse ¶ added in v0.4.6
type WebsiteHttpsGetResponse struct {
Data *WebsiteHTTPSConfig `json:"data,omitempty"`
// contains filtered or unexported fields
}
func (*WebsiteHttpsGetResponse) GetCode ¶ added in v0.4.6
func (r *WebsiteHttpsGetResponse) GetCode() int
func (*WebsiteHttpsGetResponse) GetMessage ¶ added in v0.4.6
func (r *WebsiteHttpsGetResponse) GetMessage() string
type WebsiteHttpsPostRequest ¶ added in v0.4.6
type WebsiteHttpsPostRequest struct {
WebsiteID int64 `json:"websiteId"`
Enable bool `json:"enable"`
Type string `json:"type"`
WebsiteSSLID int64 `json:"websiteSSLId"`
HttpConfig string `json:"httpConfig"`
SSLProtocol []string `json:"SSLProtocol"`
Algorithm string `json:"algorithm"`
Hsts bool `json:"hsts"`
}
type WebsiteHttpsPostResponse ¶ added in v0.4.6
type WebsiteHttpsPostResponse struct {
// contains filtered or unexported fields
}
func (*WebsiteHttpsPostResponse) GetCode ¶ added in v0.4.6
func (r *WebsiteHttpsPostResponse) GetCode() int
func (*WebsiteHttpsPostResponse) GetMessage ¶ added in v0.4.6
func (r *WebsiteHttpsPostResponse) GetMessage() string
type WebsiteSSLSearchRequest ¶ added in v0.4.6
type WebsiteSSLSearchResponse ¶ added in v0.4.6
type WebsiteSSLSearchResponse struct {
Data *struct {
Items []*SSLCertificate `json:"items"`
Total int32 `json:"total"`
} `json:"data,omitempty"`
// contains filtered or unexported fields
}
func (*WebsiteSSLSearchResponse) GetCode ¶ added in v0.4.6
func (r *WebsiteSSLSearchResponse) GetCode() int
func (*WebsiteSSLSearchResponse) GetMessage ¶ added in v0.4.6
func (r *WebsiteSSLSearchResponse) GetMessage() string
type WebsiteSSLUploadRequest ¶ added in v0.4.6
type WebsiteSSLUploadRequest struct {
SSLID int64 `json:"sslID"`
Type string `json:"type"`
Certificate string `json:"certificate"`
CertificatePath string `json:"certificatePath"`
PrivateKey string `json:"privateKey"`
PrivateKeyPath string `json:"privateKeyPath"`
Description string `json:"description"`
}
type WebsiteSSLUploadResponse ¶ added in v0.4.6
type WebsiteSSLUploadResponse struct {
// contains filtered or unexported fields
}
func (*WebsiteSSLUploadResponse) GetCode ¶ added in v0.4.6
func (r *WebsiteSSLUploadResponse) GetCode() int
func (*WebsiteSSLUploadResponse) GetMessage ¶ added in v0.4.6
func (r *WebsiteSSLUploadResponse) GetMessage() string
type WebsiteSearchRequest ¶ added in v0.4.6
type WebsiteSearchResponse ¶ added in v0.4.6
type WebsiteSearchResponse struct {
Data *struct {
Items []*Website `json:"items"`
Total int32 `json:"total"`
} `json:"data,omitempty"`
// contains filtered or unexported fields
}
func (*WebsiteSearchResponse) GetCode ¶ added in v0.4.6
func (r *WebsiteSearchResponse) GetCode() int
func (*WebsiteSearchResponse) GetMessage ¶ added in v0.4.6
func (r *WebsiteSearchResponse) GetMessage() string
Source Files
¶
Click to show internal directories.
Click to hide internal directories.