Documentation
¶
Index ¶
- type APIError
- type APIInfo
- type CertificateInfo
- type CertificateService
- type Client
- func (c *Client) ImportCertificate(req *ImportCertificateRequest) (*ImportCertificateResponse, error)
- func (c *Client) ListCertificates() (*ListCertificatesResponse, error)
- func (c *Client) Login(req *LoginRequest) (*LoginResponse, error)
- func (c *Client) Logout() (*LogoutResponse, error)
- func (c *Client) QueryAPIInfo(req *QueryAPIInfoRequest) (*QueryAPIInfoResponse, error)
- func (c *Client) SetServiceCertificate(req *SetServiceCertificateRequest) (*SetServiceCertificateResponse, error)
- func (c *Client) SetTLSConfig(config *tls.Config) *Client
- func (c *Client) SetTimeout(timeout time.Duration) *Client
- type ImportCertificateRequest
- type ImportCertificateResponse
- type ListCertificatesResponse
- type LoginRequest
- type LoginResponse
- type LogoutResponse
- type QueryAPIInfoRequest
- type QueryAPIInfoResponse
- type ServiceCertificateSetting
- type SetServiceCertificateRequest
- type SetServiceCertificateResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CertificateInfo ¶
type CertificateInfo struct {
ID string `json:"id"`
Description string `json:"desc"`
IsDefault bool `json:"is_default"`
IsBroken bool `json:"is_broken"`
Issuer struct {
CommonName string `json:"common_name"`
Country string `json:"country"`
Organization string `json:"organization"`
} `json:"issuer"`
Subject struct {
CommonName string `json:"common_name"`
Country string `json:"country"`
Organization string `json:"organization"`
SAN []string `json:"sub_alt_name"`
} `json:"subject"`
ValidFrom string `json:"valid_from"`
ValidTill string `json:"valid_till"`
SignatureAlgorithm string `json:"signature_algorithm"`
Renewable bool `json:"renewable"`
Services []*CertificateService `json:"services"`
}
type CertificateService ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) ImportCertificate ¶
func (c *Client) ImportCertificate(req *ImportCertificateRequest) (*ImportCertificateResponse, error)
func (*Client) ListCertificates ¶
func (c *Client) ListCertificates() (*ListCertificatesResponse, error)
func (*Client) Login ¶
func (c *Client) Login(req *LoginRequest) (*LoginResponse, error)
func (*Client) Logout ¶
func (c *Client) Logout() (*LogoutResponse, error)
func (*Client) QueryAPIInfo ¶
func (c *Client) QueryAPIInfo(req *QueryAPIInfoRequest) (*QueryAPIInfoResponse, error)
func (*Client) SetServiceCertificate ¶
func (c *Client) SetServiceCertificate(req *SetServiceCertificateRequest) (*SetServiceCertificateResponse, error)
type ImportCertificateResponse ¶
type ImportCertificateResponse struct {
Data *struct {
RestartHttpd bool `json:"restart_httpd"`
} `json:"data,omitempty"`
// contains filtered or unexported fields
}
func (*ImportCertificateResponse) GetErrorCode ¶
func (r *ImportCertificateResponse) GetErrorCode() int
func (*ImportCertificateResponse) GetSuccess ¶
func (r *ImportCertificateResponse) GetSuccess() bool
type ListCertificatesResponse ¶
type ListCertificatesResponse struct {
Data *struct {
Certificates []*CertificateInfo `json:"certificates"`
} `json:"data,omitempty"`
// contains filtered or unexported fields
}
func (*ListCertificatesResponse) GetErrorCode ¶
func (r *ListCertificatesResponse) GetErrorCode() int
func (*ListCertificatesResponse) GetSuccess ¶
func (r *ListCertificatesResponse) GetSuccess() bool
type LoginRequest ¶
type LoginResponse ¶
type LoginResponse struct {
Data *struct {
Sid string `json:"sid"`
SynoToken string `json:"synotoken"`
DeviceId string `json:"device_id,omitempty"`
Did string `json:"did,omitempty"`
} `json:"data,omitempty"`
// contains filtered or unexported fields
}
func (*LoginResponse) GetErrorCode ¶
func (r *LoginResponse) GetErrorCode() int
func (*LoginResponse) GetSuccess ¶
func (r *LoginResponse) GetSuccess() bool
type LogoutResponse ¶
type LogoutResponse struct {
// contains filtered or unexported fields
}
func (*LogoutResponse) GetErrorCode ¶
func (r *LogoutResponse) GetErrorCode() int
func (*LogoutResponse) GetSuccess ¶
func (r *LogoutResponse) GetSuccess() bool
type QueryAPIInfoRequest ¶
type QueryAPIInfoRequest struct {
Query string `json:"query" url:"query"`
}
type QueryAPIInfoResponse ¶
type QueryAPIInfoResponse struct {
Data map[string]APIInfo `json:"data,omitempty"`
// contains filtered or unexported fields
}
func (*QueryAPIInfoResponse) GetErrorCode ¶
func (r *QueryAPIInfoResponse) GetErrorCode() int
func (*QueryAPIInfoResponse) GetSuccess ¶
func (r *QueryAPIInfoResponse) GetSuccess() bool
type ServiceCertificateSetting ¶
type ServiceCertificateSetting struct {
Service *CertificateService `json:"service"`
OldCertID string `json:"old_id"`
CertID string `json:"id"`
}
type SetServiceCertificateRequest ¶
type SetServiceCertificateRequest struct {
Settings []*ServiceCertificateSetting `json:"settings"`
}
type SetServiceCertificateResponse ¶
type SetServiceCertificateResponse struct {
// contains filtered or unexported fields
}
func (*SetServiceCertificateResponse) GetErrorCode ¶
func (r *SetServiceCertificateResponse) GetErrorCode() int
func (*SetServiceCertificateResponse) GetSuccess ¶
func (r *SetServiceCertificateResponse) GetSuccess() bool
Click to show internal directories.
Click to hide internal directories.