nginxproxymanager

package
v0.4.25 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 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 Certificate added in v0.4.25

type Certificate struct {
	Id          int64           `json:"id"`
	CreatedOn   string          `json:"created_on"`
	ModifiedOn  string          `json:"modified_on"`
	Provider    string          `json:"provider"`
	NiceName    string          `json:"nice_name"`
	DomainNames []string        `json:"domain_names"`
	ExpiresOn   string          `json:"expires_on"`
	Meta        CertificateMeta `json:"meta"`
}

type CertificateMeta

type CertificateMeta struct {
	Certificate             string `json:"certificate"`
	CertificateKey          string `json:"certificate_key"`
	IntermediateCertificate string `json:"intermediate_certificate"`
}

type Client

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

func NewClient

func NewClient(serverUrl string, optFns ...OptionsFunc) (*Client, error)

func (*Client) NginxCreateCertificate

func (c *Client) NginxCreateCertificate(req *NginxCreateCertificateRequest) (*NginxCreateCertificateResponse, error)

func (*Client) NginxCreateCertificateWithContext

func (c *Client) NginxCreateCertificateWithContext(ctx context.Context, req *NginxCreateCertificateRequest) (*NginxCreateCertificateResponse, error)

func (*Client) NginxListCertificates

func (c *Client) NginxListCertificates(req *NginxListCertificatesRequest) (*NginxListCertificatesResponse, error)

func (*Client) NginxListCertificatesWithContext

func (c *Client) NginxListCertificatesWithContext(ctx context.Context, req *NginxListCertificatesRequest) (*NginxListCertificatesResponse, error)

func (*Client) NginxListDeadHosts

func (c *Client) NginxListDeadHosts(req *NginxListDeadHostsRequest) (*NginxListDeadHostsResponse, error)

func (*Client) NginxListDeadHostsWithContext

func (c *Client) NginxListDeadHostsWithContext(ctx context.Context, req *NginxListDeadHostsRequest) (*NginxListDeadHostsResponse, error)

func (*Client) NginxListProxyHosts

func (c *Client) NginxListProxyHosts(req *NginxListProxyHostsRequest) (*NginxListProxyHostsResponse, error)

func (*Client) NginxListProxyHostsWithContext

func (c *Client) NginxListProxyHostsWithContext(ctx context.Context, req *NginxListProxyHostsRequest) (*NginxListProxyHostsResponse, error)

func (*Client) NginxListRedirectionHostsWithContext

func (c *Client) NginxListRedirectionHostsWithContext(ctx context.Context, req *NginxListRedirectionHostsRequest) (*NginxListRedirectionHostsResponse, error)

func (*Client) NginxListStreams

func (c *Client) NginxListStreams(req *NginxListStreamsRequest) (*NginxListStreamsResponse, error)

func (*Client) NginxListStreamsWithContext

func (c *Client) NginxListStreamsWithContext(ctx context.Context, req *NginxListStreamsRequest) (*NginxListStreamsResponse, error)

func (*Client) NginxUpdateDeadHost

func (c *Client) NginxUpdateDeadHost(hostId int64, req *NginxUpdateDeadHostRequest) (*NginxUpdateDeadHostResponse, error)

func (*Client) NginxUpdateDeadHostWithContext

func (c *Client) NginxUpdateDeadHostWithContext(ctx context.Context, hostId int64, req *NginxUpdateDeadHostRequest) (*NginxUpdateDeadHostResponse, error)

func (*Client) NginxUpdateProxyHost

func (c *Client) NginxUpdateProxyHost(hostId int64, req *NginxUpdateProxyHostRequest) (*NginxUpdateProxyHostResponse, error)

func (*Client) NginxUpdateProxyHostWithContext

func (c *Client) NginxUpdateProxyHostWithContext(ctx context.Context, hostId int64, req *NginxUpdateProxyHostRequest) (*NginxUpdateProxyHostResponse, error)

func (*Client) NginxUpdateRedirectionHost

func (c *Client) NginxUpdateRedirectionHost(hostId int64, req *NginxUpdateRedirectionHostRequest) (*NginxUpdateRedirectionHostResponse, error)

func (*Client) NginxUpdateRedirectionHostWithContext

func (c *Client) NginxUpdateRedirectionHostWithContext(ctx context.Context, hostId int64, req *NginxUpdateRedirectionHostRequest) (*NginxUpdateRedirectionHostResponse, error)

func (*Client) NginxUpdateStream

func (c *Client) NginxUpdateStream(hostId int64, req *NginxUpdateStreamRequest) (*NginxUpdateStreamResponse, error)

func (*Client) NginxUpdateStreamWithContext

func (c *Client) NginxUpdateStreamWithContext(ctx context.Context, hostId int64, req *NginxUpdateStreamRequest) (*NginxUpdateStreamResponse, error)

func (*Client) NginxUploadCertificate

func (c *Client) NginxUploadCertificate(certId int64, req *NginxUploadCertificateRequest) (*NginxUploadCertificateResponse, error)

func (*Client) NginxUploadCertificateWithContext

func (c *Client) NginxUploadCertificateWithContext(ctx context.Context, certId int64, req *NginxUploadCertificateRequest) (*NginxUploadCertificateResponse, 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) SettingsGetDefaultSite

func (c *Client) SettingsGetDefaultSite(req *SettingsGetDefaultSiteRequest) (*SettingsGetDefaultSiteResponse, error)

func (*Client) SettingsGetDefaultSiteWithContext

func (c *Client) SettingsGetDefaultSiteWithContext(ctx context.Context, req *SettingsGetDefaultSiteRequest) (*SettingsGetDefaultSiteResponse, error)

func (*Client) SettingsSetDefaultSite

func (c *Client) SettingsSetDefaultSite(req *SettingsSetDefaultSiteRequest) (*SettingsSetDefaultSiteResponse, error)

func (*Client) SettingsSetDefaultSiteWithContext

func (c *Client) SettingsSetDefaultSiteWithContext(ctx context.Context, req *SettingsSetDefaultSiteRequest) (*SettingsSetDefaultSiteResponse, error)

type DeadHost added in v0.4.25

type DeadHost struct {
	Host
	SslForced      bool `json:"ssl_forced"`
	Http2Support   bool `json:"http2_support"`
	HstsEnabled    bool `json:"hsts_enabled"`
	HstsSubdomains bool `json:"hsts_subdomains"`
}

type Host added in v0.4.25

type Host struct {
	Id            int64    `json:"id"`
	CreatedOn     string   `json:"created_on"`
	ModifiedOn    string   `json:"modified_on"`
	DomainNames   []string `json:"domain_names"`
	CertificateId int64    `json:"certificate_id"`
	Meta          HostMeta `json:"meta"`
	Enabled       bool     `json:"enabled"`
}

type HostMeta

type HostMeta struct {
	NginxOnline bool `json:"nginx_online"`
	NginxErr    any  `json:"nginx_err"`
}

type NginxCreateCertificateRequest

type NginxCreateCertificateRequest struct {
	Provider string `json:"provider"`
	NiceName string `json:"nice_name"`
}

type NginxCreateCertificateResponse

type NginxCreateCertificateResponse struct {
	Certificate
}

type NginxListCertificatesRequest

type NginxListCertificatesRequest struct {
	Expand *string `json:"expand,omitempty" url:"expand,omitempty"`
}

type NginxListCertificatesResponse

type NginxListCertificatesResponse = []*Certificate

type NginxListDeadHostsRequest

type NginxListDeadHostsRequest struct {
	Expand *string `json:"expand,omitempty" url:"expand,omitempty"`
}

type NginxListDeadHostsResponse

type NginxListDeadHostsResponse = []*DeadHost

type NginxListProxyHostsRequest

type NginxListProxyHostsRequest struct {
	Expand *string `json:"expand,omitempty" url:"expand,omitempty"`
}

type NginxListProxyHostsResponse

type NginxListProxyHostsResponse = []*ProxyHost

type NginxListRedirectionHostsRequest

type NginxListRedirectionHostsRequest struct {
	Expand *string `json:"expand,omitempty" url:"expand,omitempty"`
}

type NginxListRedirectionHostsResponse

type NginxListRedirectionHostsResponse = []*RedirectionHost

type NginxListStreamsRequest

type NginxListStreamsRequest struct {
	Expand *string `json:"expand,omitempty" url:"expand,omitempty"`
}

type NginxListStreamsResponse

type NginxListStreamsResponse = []*StreamHost

type NginxUpdateDeadHostRequest

type NginxUpdateDeadHostRequest struct {
	CertificateId *int64 `json:"certificate_id,omitempty"`
}

type NginxUpdateDeadHostResponse

type NginxUpdateDeadHostResponse struct {
	DeadHost
}

type NginxUpdateProxyHostRequest

type NginxUpdateProxyHostRequest struct {
	CertificateId *int64 `json:"certificate_id,omitempty"`
}

type NginxUpdateProxyHostResponse

type NginxUpdateProxyHostResponse struct {
	ProxyHost
}

type NginxUpdateRedirectionHostRequest

type NginxUpdateRedirectionHostRequest struct {
	CertificateId *int64 `json:"certificate_id,omitempty"`
}

type NginxUpdateRedirectionHostResponse

type NginxUpdateRedirectionHostResponse struct {
	RedirectionHost
}

type NginxUpdateStreamRequest

type NginxUpdateStreamRequest struct {
	CertificateId *int64 `json:"certificate_id,omitempty"`
}

type NginxUpdateStreamResponse

type NginxUpdateStreamResponse struct {
	StreamHost
}

type NginxUploadCertificateRequest

type NginxUploadCertificateRequest struct {
	CertificateMeta
}

type NginxUploadCertificateResponse

type NginxUploadCertificateResponse struct {
	CertificateMeta
}

type Options added in v0.4.25

type Options struct {
	Username string
	Password string
	JwtToken string
}

type OptionsFunc added in v0.4.25

type OptionsFunc func(*Options)

func WithJwtToken added in v0.4.25

func WithJwtToken(jwtToken string) OptionsFunc

func WithLogins added in v0.4.25

func WithLogins(username, password string) OptionsFunc

type ProxyHost added in v0.4.25

type ProxyHost struct {
	Host
	ForwardScheme  string `json:"forward_scheme"`
	ForwardHost    string `json:"forward_host"`
	ForwardPort    int32  `json:"forward_port"`
	SslForced      bool   `json:"ssl_forced"`
	Http2Support   bool   `json:"http2_support"`
	HstsEnabled    bool   `json:"hsts_enabled"`
	HstsSubdomains bool   `json:"hsts_subdomains"`
}

type RedirectionHost added in v0.4.25

type RedirectionHost struct {
	Host
	ForwardScheme     string `json:"forward_scheme"`
	ForwardDomainName string `json:"forward_domain_name"`
	ForwardHttpCode   int32  `json:"forward_http_code"`
	SslForced         bool   `json:"ssl_forced"`
	Http2Support      bool   `json:"http2_support"`
	HstsEnabled       bool   `json:"hsts_enabled"`
	HstsSubdomains    bool   `json:"hsts_subdomains"`
}

type SettingsGetDefaultSiteRequest

type SettingsGetDefaultSiteRequest struct{}

type SettingsGetDefaultSiteResponse

type SettingsGetDefaultSiteResponse struct {
	Id          string `json:"id"`
	Name        string `json:"name"`
	Description string `json:"description"`
	Value       string `json:"value"`
	Meta        struct {
		Redirect string `json:"redirect"`
		Html     string `json:"urhtmll"`
	} `json:"meta"`
}

type SettingsSetDefaultSiteRequest

type SettingsSetDefaultSiteRequest struct {
	Value string `json:"value"`
	Meta  struct {
		Redirect string `json:"redirect"`
		Html     string `json:"html"`
	} `json:"meta"`
}

type SettingsSetDefaultSiteResponse

type SettingsSetDefaultSiteResponse struct{}

type StreamHost added in v0.4.25

type StreamHost struct {
	Host
	ForwardingHost string `json:"forwarding_host"`
	ForwardingPort int32  `json:"forwarding_port"`
	IncomingPort   int32  `json:"incoming_port"`
	TcpForwarding  bool   `json:"tcp_forwarding"`
	UdpForwarding  bool   `json:"udp_forwarding"`
}

Jump to

Keyboard shortcuts

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