onepanel

package
v0.3.21 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 4, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

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 NewClient

func NewClient(serverUrl, apiKey string) (*Client, error)

func (*Client) GetHttpsConf

func (c *Client) GetHttpsConf(websiteId int64) (*GetHttpsConfResponse, error)

func (*Client) GetHttpsConfWithContext

func (c *Client) GetHttpsConfWithContext(ctx context.Context, websiteId int64) (*GetHttpsConfResponse, error)

func (*Client) GetWebsiteSSL

func (c *Client) GetWebsiteSSL(sslId int64) (*GetWebsiteSSLResponse, error)

func (*Client) GetWebsiteSSLWithContext

func (c *Client) GetWebsiteSSLWithContext(ctx context.Context, sslId int64) (*GetWebsiteSSLResponse, error)

func (*Client) SearchWebsiteSSL

func (c *Client) SearchWebsiteSSL(req *SearchWebsiteSSLRequest) (*SearchWebsiteSSLResponse, error)

func (*Client) SearchWebsiteSSLWithContext

func (c *Client) SearchWebsiteSSLWithContext(ctx context.Context, req *SearchWebsiteSSLRequest) (*SearchWebsiteSSLResponse, error)

func (*Client) SetTLSConfig

func (c *Client) SetTLSConfig(config *tls.Config) *Client

func (*Client) SetTimeout

func (c *Client) SetTimeout(timeout time.Duration) *Client

func (*Client) UpdateHttpsConf

func (c *Client) UpdateHttpsConf(websiteId int64, req *UpdateHttpsConfRequest) (*UpdateHttpsConfResponse, error)

func (*Client) UpdateHttpsConfWithContext

func (c *Client) UpdateHttpsConfWithContext(ctx context.Context, websiteId int64, req *UpdateHttpsConfRequest) (*UpdateHttpsConfResponse, error)

func (*Client) UpdateSettingsSSL

func (c *Client) UpdateSettingsSSL(req *UpdateSettingsSSLRequest) (*UpdateSettingsSSLResponse, error)

func (*Client) UpdateSettingsSSLWithContext

func (c *Client) UpdateSettingsSSLWithContext(ctx context.Context, req *UpdateSettingsSSLRequest) (*UpdateSettingsSSLResponse, error)

func (*Client) UploadWebsiteSSL

func (c *Client) UploadWebsiteSSL(req *UploadWebsiteSSLRequest) (*UploadWebsiteSSLResponse, error)

func (*Client) UploadWebsiteSSLWithContext

func (c *Client) UploadWebsiteSSLWithContext(ctx context.Context, req *UploadWebsiteSSLRequest) (*UploadWebsiteSSLResponse, error)

type GetHttpsConfResponse

type GetHttpsConfResponse struct {
	Data *struct {
		Enable      bool     `json:"enable"`
		HttpConfig  string   `json:"httpConfig"`
		SSLProtocol []string `json:"SSLProtocol"`
		Algorithm   string   `json:"algorithm"`
		Hsts        bool     `json:"hsts"`
	} `json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*GetHttpsConfResponse) GetCode

func (r *GetHttpsConfResponse) GetCode() int32

func (*GetHttpsConfResponse) GetMessage

func (r *GetHttpsConfResponse) GetMessage() string

type GetWebsiteSSLResponse

type GetWebsiteSSLResponse struct {
	Data *struct {
		ID            int64  `json:"id"`
		Provider      string `json:"provider"`
		Description   string `json:"description"`
		PrimaryDomain string `json:"primaryDomain"`
		Domains       string `json:"domains"`
		Type          string `json:"type"`
		Organization  string `json:"organization"`
		Status        string `json:"status"`
		StartDate     string `json:"startDate"`
		ExpireDate    string `json:"expireDate"`
		CreatedAt     string `json:"createdAt"`
		UpdatedAt     string `json:"updatedAt"`
	} `json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*GetWebsiteSSLResponse) GetCode

func (r *GetWebsiteSSLResponse) GetCode() int32

func (*GetWebsiteSSLResponse) GetMessage

func (r *GetWebsiteSSLResponse) GetMessage() string

type SearchWebsiteSSLRequest

type SearchWebsiteSSLRequest struct {
	Page     int32 `json:"page"`
	PageSize int32 `json:"pageSize"`
}

type SearchWebsiteSSLResponse

type SearchWebsiteSSLResponse struct {
	Data *struct {
		Items []*struct {
			ID          int64  `json:"id"`
			PEM         string `json:"pem"`
			PrivateKey  string `json:"privateKey"`
			Domains     string `json:"domains"`
			Description string `json:"description"`
			Status      string `json:"status"`
			UpdatedAt   string `json:"updatedAt"`
			CreatedAt   string `json:"createdAt"`
		} `json:"items"`
		Total int32 `json:"total"`
	} `json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*SearchWebsiteSSLResponse) GetCode

func (r *SearchWebsiteSSLResponse) GetCode() int32

func (*SearchWebsiteSSLResponse) GetMessage

func (r *SearchWebsiteSSLResponse) GetMessage() string

type UpdateHttpsConfRequest

type UpdateHttpsConfRequest struct {
	WebsiteID       int64    `json:"websiteId"`
	Enable          bool     `json:"enable"`
	Type            string   `json:"type"`
	WebsiteSSLID    int64    `json:"websiteSSLId"`
	PrivateKey      string   `json:"privateKey"`
	Certificate     string   `json:"certificate"`
	PrivateKeyPath  string   `json:"privateKeyPath"`
	CertificatePath string   `json:"certificatePath"`
	ImportType      string   `json:"importType"`
	HttpConfig      string   `json:"httpConfig"`
	SSLProtocol     []string `json:"SSLProtocol"`
	Algorithm       string   `json:"algorithm"`
	Hsts            bool     `json:"hsts"`
}

type UpdateHttpsConfResponse

type UpdateHttpsConfResponse struct {
	// contains filtered or unexported fields
}

func (*UpdateHttpsConfResponse) GetCode

func (r *UpdateHttpsConfResponse) GetCode() int32

func (*UpdateHttpsConfResponse) GetMessage

func (r *UpdateHttpsConfResponse) GetMessage() string

type UpdateSettingsSSLRequest

type UpdateSettingsSSLRequest struct {
	Cert        string `json:"cert"`
	Key         string `json:"key"`
	SSLType     string `json:"sslType"`
	SSL         string `json:"ssl"`
	SSLID       int64  `json:"sslID"`
	AutoRestart string `json:"autoRestart"`
}

type UpdateSettingsSSLResponse

type UpdateSettingsSSLResponse struct {
	// contains filtered or unexported fields
}

func (*UpdateSettingsSSLResponse) GetCode

func (r *UpdateSettingsSSLResponse) GetCode() int32

func (*UpdateSettingsSSLResponse) GetMessage

func (r *UpdateSettingsSSLResponse) GetMessage() string

type UploadWebsiteSSLRequest

type UploadWebsiteSSLRequest 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 UploadWebsiteSSLResponse

type UploadWebsiteSSLResponse struct {
	// contains filtered or unexported fields
}

func (*UploadWebsiteSSLResponse) GetCode

func (r *UploadWebsiteSSLResponse) GetCode() int32

func (*UploadWebsiteSSLResponse) GetMessage

func (r *UploadWebsiteSSLResponse) GetMessage() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL