onepanel

package
v0.4.13 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2026 License: MIT Imports: 12 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) SetTLSConfig

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

func (*Client) SetTimeout

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

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 (c *Client) WebsiteGetWithContext(ctx context.Context, websiteId int64) (*WebsiteGetResponse, error)

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 (c *Client) WebsiteHttpsGetWithContext(ctx context.Context, websiteId int64) (*WebsiteHttpsGetResponse, error)

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) WebsiteSSLGet added in v0.4.6

func (c *Client) WebsiteSSLGet(sslId int64) (*WebsiteSSLGetResponse, error)

func (*Client) WebsiteSSLGetWithContext added in v0.4.6

func (c *Client) WebsiteSSLGetWithContext(ctx context.Context, sslId int64) (*WebsiteSSLGetResponse, 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 SettingsSSLUpdateRequest added in v0.4.6

type SettingsSSLUpdateRequest 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 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() int32

func (*SettingsSSLUpdateResponse) GetMessage added in v0.4.6

func (r *SettingsSSLUpdateResponse) GetMessage() string

type WebsiteGetRequest added in v0.4.6

type WebsiteGetRequest struct {
	Name     string `json:"name"`
	Type     string `json:"type"`
	Page     int32  `json:"page"`
	PageSize int32  `json:"pageSize"`
}

type WebsiteGetResponse added in v0.4.6

type WebsiteGetResponse struct {
	Data *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"`
		Domains       []*struct {
			ID        int64  `json:"id"`
			Domain    string `json:"domain"`
			Port      int32  `json:"port"`
			SSL       bool   `json:"ssl"`
			UpdatedAt string `json:"updatedAt"`
			CreatedAt string `json:"createdAt"`
		} `json:"domains"`
		WebsiteSSLId int64  `json:"webSiteSSLId"`
		UpdatedAt    string `json:"updatedAt"`
		CreatedAt    string `json:"createdAt"`
	} `json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*WebsiteGetResponse) GetCode added in v0.4.6

func (r *WebsiteGetResponse) GetCode() int32

func (*WebsiteGetResponse) GetMessage added in v0.4.6

func (r *WebsiteGetResponse) GetMessage() string

type WebsiteHttpsGetResponse added in v0.4.6

type WebsiteHttpsGetResponse struct {
	Data *struct {
		Enable       bool     `json:"enable"`
		WebsiteSSLID int64    `json:"websiteSSLId"`
		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 (*WebsiteHttpsGetResponse) GetCode added in v0.4.6

func (r *WebsiteHttpsGetResponse) GetCode() int32

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() int32

func (*WebsiteHttpsPostResponse) GetMessage added in v0.4.6

func (r *WebsiteHttpsPostResponse) GetMessage() string

type WebsiteSSLGetResponse added in v0.4.6

type WebsiteSSLGetResponse 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 (*WebsiteSSLGetResponse) GetCode added in v0.4.6

func (r *WebsiteSSLGetResponse) GetCode() int32

func (*WebsiteSSLGetResponse) GetMessage added in v0.4.6

func (r *WebsiteSSLGetResponse) GetMessage() string

type WebsiteSSLSearchRequest added in v0.4.6

type WebsiteSSLSearchRequest struct {
	Domain   string `json:"domain"`
	Page     int32  `json:"page"`
	PageSize int32  `json:"pageSize"`
}

type WebsiteSSLSearchResponse added in v0.4.6

type WebsiteSSLSearchResponse 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 (*WebsiteSSLSearchResponse) GetCode added in v0.4.6

func (r *WebsiteSSLSearchResponse) GetCode() int32

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() int32

func (*WebsiteSSLUploadResponse) GetMessage added in v0.4.6

func (r *WebsiteSSLUploadResponse) GetMessage() string

type WebsiteSearchRequest added in v0.4.6

type WebsiteSearchRequest struct {
	Name     string `json:"name"`
	Type     string `json:"type"`
	Order    string `json:"order"`
	OrderBy  string `json:"orderBy"`
	Page     int32  `json:"page"`
	PageSize int32  `json:"pageSize"`
}

type WebsiteSearchResponse added in v0.4.6

type WebsiteSearchResponse struct {
	Data *struct {
		Items []*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"`
			SSLExpireDate string `json:"sslExpireDate"`
			UpdatedAt     string `json:"updatedAt"`
			CreatedAt     string `json:"createdAt"`
		} `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() int32

func (*WebsiteSearchResponse) GetMessage added in v0.4.6

func (r *WebsiteSearchResponse) GetMessage() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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