Documentation ¶
Index ¶
- type AppCreateResponse
- type AppHttpCreateRequest
- type AppSshCreateRequest
- type AppTcpCreateRequest
- type ApplicationList
- type Client
- func (c *Client) BindAppToSite(ctx context.Context, appID string, siteID string) (*http.Response, error)
- func (c *Client) CreateApp(ctx context.Context, newapp interface{}) (*AppCreateResponse, *http.Response, error)
- func (c *Client) CreateConnector(ctx context.Context, connector NewConnectorRequest, siteID string) (*NewConnectorResponse, *http.Response, error)
- func (c *Client) CreateSite(ctx context.Context, site NewSiteRequest) (*NewSiteResponse, *http.Response, error)
- func (c *Client) DeleteApp(ctx context.Context, appID string) (*http.Response, error)
- func (c *Client) DeleteConnector(ctx context.Context, connectorID string) (*http.Response, error)
- func (c *Client) DeleteSite(ctx context.Context, siteID string) (*http.Response, error)
- func (c *Client) Do(ctx context.Context, req *http.Request, target interface{}) (*http.Response, error)
- func (c *Client) GetApp(ctx context.Context, appID string) (*http.Response, error)
- func (c *Client) GetConnector(ctx context.Context, connectorID string) (*http.Response, error)
- func (c *Client) GetConnectorCommand(ctx context.Context, connectorConfig ConnectorCommandRequest, ...) (*ConnectorCommandResponse, *http.Response, error)
- func (c *Client) GetSite(ctx context.Context, siteID string) (*NewSiteRequest, *http.Response, error)
- func (c *Client) ListApp(ctx context.Context, opt string) (*ApplicationList, *http.Response, error)
- func (c *Client) NewRequest(method, urlStr string, body interface{}) (*http.Request, error)
- func (c *Client) UpdateApp(ctx context.Context, app interface{}, appID string) (*AppCreateResponse, *http.Response, error)
- func (c *Client) UpdateConnector(ctx context.Context, connector NewConnectorRequest, connectorID string) (*NewConnectorResponse, *http.Response, error)
- func (c *Client) UpdateSite(ctx context.Context, site *NewSiteRequest, siteID string) (*NewSiteResponse, *http.Response, error)
- type ConnectorCommandRequest
- type ConnectorCommandResponse
- type NewConnectorRequest
- type NewConnectorResponse
- type NewSiteRequest
- type NewSiteResponse
- type SshUserAccounts
- type TcpTunnelSettings
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppCreateResponse ¶
type AppCreateResponse struct { ID string `json:"id"` CreatedOn int64 `json:"createdOn"` ModifiedOn int64 `json:"modifiedOn"` Name string `json:"name"` Description interface{} `json:"description"` Type string `json:"type"` Icon interface{} `json:"icon"` IsVisible bool `json:"isVisible"` IsNotificationEnabled bool `json:"isNotificationEnabled"` ConnectionSettings struct { InternalAddress string `json:"internalAddress"` InternalSSLCertificatePublicHalf interface{} `json:"internalSSLCertificatePublicHalf"` ExternalAddress string `json:"externalAddress"` CustomExternalAddress interface{} `json:"customExternalAddress"` LuminateAddress string `json:"luminateAddress"` CustomSSLCertificate interface{} `json:"customSSLCertificate"` AuthenticationType string `json:"authenticationType"` SsoSettings struct { } `json:"ssoSettings"` CustomRootPath interface{} `json:"customRootPath"` HealthURL string `json:"healthUrl"` HealthMethod string `json:"healthMethod"` Subdomain string `json:"subdomain"` } `json:"connectionSettings"` SiteSettings struct { SiteID string `json:"siteId"` } `json:"siteSettings"` LinkTranslationSettings struct { BaseURL interface{} `json:"baseUrl"` IsDefaultContentRewriteRulesEnabled bool `json:"isDefaultContentRewriteRulesEnabled"` IsDefaultHeaderRewriteRulesEnabled bool `json:"isDefaultHeaderRewriteRulesEnabled"` UseExternalAddressForHostAndSni bool `json:"useExternalAddressForHostAndSni"` CharsetEncoding interface{} `json:"charsetEncoding"` LinkedApplications interface{} `json:"linkedApplications"` DefaultRewriteRules interface{} `json:"defaultRewriteRules"` CustomRewriteRules interface{} `json:"customRewriteRules"` } `json:"linkTranslationSettings"` Health struct { ApplicationID string `json:"applicationId"` Status string `json:"status"` Cause interface{} `json:"cause"` LastUpdatedOn interface{} `json:"lastUpdatedOn"` TotalNumberOfConnectors int `json:"totalNumberOfConnectors"` TotalNumberOfAvailableConnectors int `json:"totalNumberOfAvailableConnectors"` ConnectorsStatus interface{} `json:"connectorsStatus"` LastAvailableOn interface{} `json:"lastAvailableOn"` } `json:"health"` SSHSettings struct { UserAccounts []interface{} `json:"userAccounts"` } `json:"sshSettings"` RequestCustomizationSettings struct { HeaderCustomization struct { XForwardedHost string `json:"X-Forwarded-Host"` XForwardedFor string `json:"X-Forwarded-For"` XForwardedProto string `json:"X-Forwarded-Proto"` } `json:"headerCustomization"` } `json:"requestCustomizationSettings"` }
type AppHttpCreateRequest ¶
type AppHttpCreateRequest struct { ConnectionSettings struct { InternalAddress string `json:"internalAddress"` CustomRootPath string `json:"customRootPath"` HealthURL string `json:"healthUrl"` HealthMethod string `json:"healthMethod"` } `json:"connectionSettings"` Type string `json:"type"` Name string `json:"name"` IsVisible bool `json:"isVisible"` IsNotificationEnabled bool `json:"isNotificationEnabled"` LinkTranslationSettings struct { IsDefaultContentRewriteRulesEnabled bool `json:"isDefaultContentRewriteRulesEnabled"` IsDefaultHeaderRewriteRulesEnabled bool `json:"isDefaultHeaderRewriteRulesEnabled"` UseExternalAddressForHostAndSni bool `json:"useExternalAddressForHostAndSni"` LinkedApplications []interface{} `json:"linkedApplications"` } `json:"linkTranslationSettings"` RequestCustomizationSettings struct { XForwardedFor string `json:"X-Forwarded-For"` XForwardedHost string `json:"X-Forwarded-Host"` XForwardedProto string `json:"X-Forwarded-Proto"` } `json:"requestCustomizationSettings"` }
type AppSshCreateRequest ¶
type AppSshCreateRequest struct { Type string `json:"type"` Name string `json:"name"` IsVisible bool `json:"isVisible"` IsNotificationEnabled bool `json:"isNotificationEnabled"` ConnectionSettings struct { InternalAddress string `json:"internalAddress"` } `json:"connectionSettings"` SSHSettings struct { UserAccounts []SshUserAccounts `json:"userAccounts"` } `json:"sshSettings"` }
type AppTcpCreateRequest ¶
type AppTcpCreateRequest struct { Type string `json:"type"` Name string `json:"name"` IsVisible bool `json:"isVisible"` IsNotificationEnabled bool `json:"isNotificationEnabled"` ConnectionSettings struct { Subdomain string `json:"subdomain"` } `json:"connectionSettings"` TcpTunnelSettings []TcpTunnelSettings `json:"tcpTunnelSettings"` }
type ApplicationList ¶
type ApplicationList struct { Content []struct { ID string `json:"id"` CreatedOn int64 `json:"createdOn"` ModifiedOn int64 `json:"modifiedOn"` Name string `json:"name"` Description interface{} `json:"description"` Type string `json:"type"` Icon interface{} `json:"icon"` IsVisible bool `json:"isVisible"` IsNotificationEnabled bool `json:"isNotificationEnabled"` ConnectionSettings struct { InternalAddress string `json:"internalAddress"` InternalSSLCertificatePublicHalf interface{} `json:"internalSSLCertificatePublicHalf"` ExternalAddress string `json:"externalAddress"` CustomExternalAddress interface{} `json:"customExternalAddress"` LuminateAddress string `json:"luminateAddress"` CustomSSLCertificate interface{} `json:"customSSLCertificate"` AuthenticationType string `json:"authenticationType"` SsoSettings struct { } `json:"ssoSettings"` CustomRootPath interface{} `json:"customRootPath"` HealthURL interface{} `json:"healthUrl"` HealthMethod string `json:"healthMethod"` Subdomain string `json:"subdomain"` } `json:"connectionSettings"` SiteSettings struct { SiteID string `json:"siteId"` } `json:"siteSettings"` LinkTranslationSettings struct { BaseURL interface{} `json:"baseUrl"` IsDefaultContentRewriteRulesEnabled bool `json:"isDefaultContentRewriteRulesEnabled"` IsDefaultHeaderRewriteRulesEnabled bool `json:"isDefaultHeaderRewriteRulesEnabled"` UseExternalAddressForHostAndSni interface{} `json:"useExternalAddressForHostAndSni"` CharsetEncoding interface{} `json:"charsetEncoding"` LinkedApplications []interface{} `json:"linkedApplications"` DefaultRewriteRules interface{} `json:"defaultRewriteRules"` CustomRewriteRules interface{} `json:"customRewriteRules"` } `json:"linkTranslationSettings"` Health struct { ApplicationID string `json:"applicationId"` Status string `json:"status"` Cause string `json:"cause"` LastUpdatedOn int64 `json:"lastUpdatedOn"` TotalNumberOfConnectors int `json:"totalNumberOfConnectors"` TotalNumberOfAvailableConnectors int `json:"totalNumberOfAvailableConnectors"` ConnectorsStatus []struct { ConnectorID string `json:"connectorId"` IsHealthy bool `json:"isHealthy"` } `json:"connectorsStatus"` LastAvailableOn int64 `json:"lastAvailableOn"` } `json:"health"` SSHSettings struct { UserAccounts []interface{} `json:"userAccounts"` } `json:"sshSettings"` RequestCustomizationSettings struct { HeaderCustomization struct { XForwardedFor string `json:"X-Forwarded-For"` XForwardedHost string `json:"X-Forwarded-Host"` XForwardedProto string `json:"X-Forwarded-Proto"` } `json:"headerCustomization"` } `json:"requestCustomizationSettings"` TCPTunnelSettings []struct { Target string `json:"target"` Ports []int `json:"ports"` } `json:"tcpTunnelSettings,omitempty"` } `json:"content"` TotalElements int `json:"totalElements"` TotalPages int `json:"totalPages"` Last bool `json:"last"` First bool `json:"first"` Sort []struct { Direction string `json:"direction"` Property string `json:"property"` IgnoreCase bool `json:"ignoreCase"` NullHandling string `json:"nullHandling"` Ascending bool `json:"ascending"` Descending bool `json:"descending"` } `json:"sort"` NumberOfElements int `json:"numberOfElements"` Size int `json:"size"` Number int `json:"number"` }
type Client ¶
type Client struct { // The base-URL that should be used should be api.<tenant-name>.luminatesec.com. BaseURL *url.URL UserAgent string // User agent used when communicating with the luminate API. // contains filtered or unexported fields }
func NewClient ¶
https://luminatepublicapi.docs.apiary.io/#introduction/authorization NewClient returns a new luminate API client with provided base URL.
func (*Client) BindAppToSite ¶
func (*Client) CreateApp ¶
func (c *Client) CreateApp(ctx context.Context, newapp interface{}) (*AppCreateResponse, *http.Response, error)
https://luminatepublicapi.docs.apiary.io/#reference/applications/add-application
func (*Client) CreateConnector ¶
func (c *Client) CreateConnector(ctx context.Context, connector NewConnectorRequest, siteID string) (*NewConnectorResponse, *http.Response, error)
https://luminatepublicapi.docs.apiary.io/#reference/connectors/v2connectors/add-connector
func (*Client) CreateSite ¶
func (c *Client) CreateSite(ctx context.Context, site NewSiteRequest) (*NewSiteResponse, *http.Response, error)
func (*Client) DeleteConnector ¶
func (*Client) DeleteSite ¶
https://luminatepublicapi.docs.apiary.io/#reference/sites/v2sitessiteid/delete-site
func (*Client) Do ¶
func (c *Client) Do(ctx context.Context, req *http.Request, target interface{}) (*http.Response, error)
Do sends an API request and returns the API response. The API response is JSON decoded and stored in the value pointed to by target, or returned as an error if an API error has occurred. If target implements the io.Writer interface, the raw response body will be written to v, without attempting to first decode it.
The provided ctx must be non-nil. If it is canceled or times out, ctx.Err() will be returned.
func (*Client) GetConnector ¶
https://luminatepublicapi.docs.apiary.io/#reference/connectors/v2connectorsconnectorid/get-connector
func (*Client) GetConnectorCommand ¶
func (c *Client) GetConnectorCommand(ctx context.Context, connectorConfig ConnectorCommandRequest, connectorID string) (*ConnectorCommandResponse, *http.Response, error)
func (*Client) GetSite ¶
func (c *Client) GetSite(ctx context.Context, siteID string) (*NewSiteRequest, *http.Response, error)
https://luminatepublicapi.docs.apiary.io/#reference/sites/v2sitessiteid/get-site
func (*Client) ListApp ¶
https://luminatepublicapi.docs.apiary.io/#reference/applications/v2applications/list-applications
func (*Client) NewRequest ¶
NewRequest creates an API request. A relative URL can be provided in urlStr, in which case it is resolved relative to the BaseURL of the Client. Relative URLs should always be specified without a preceding slash. If specified, the value pointed to by body is JSON encoded and included as the request body.
func (*Client) UpdateApp ¶
func (*Client) UpdateConnector ¶
func (c *Client) UpdateConnector(ctx context.Context, connector NewConnectorRequest, connectorID string) (*NewConnectorResponse, *http.Response, error)
func (*Client) UpdateSite ¶
func (c *Client) UpdateSite(ctx context.Context, site *NewSiteRequest, siteID string) (*NewSiteResponse, *http.Response, error)
https://luminatepublicapi.docs.apiary.io/#reference/sites/v2sitessiteid/update-site
type ConnectorCommandRequest ¶
type NewConnectorRequest ¶
type NewConnectorResponse ¶
type NewConnectorResponse struct { ID string `json:"id"` Name string `json:"name"` Version string `json:"version"` Registered bool `json:"registered"` Otp string `json:"otp"` DateCreated time.Time `json:"date_created"` DateRegistered time.Time `json:"date_registered"` DateOtpExpire time.Time `json:"date_otp_expire"` SendLogs bool `json:"send_logs"` ConnectorStatus string `json:"connector_status"` UpdateMode string `json:"update_mode"` UpdateStatus string `json:"update_status"` UpdateStatusInfo string `json:"update_status_info"` }
type NewSiteRequest ¶
type NewSiteRequest struct { Name string `json:"name"` Description string `json:"description"` Settings struct { ProxyAddress string `json:"proxyAddress"` ProxyPort int `json:"proxyPort"` ProxyUsername string `json:"proxyUsername"` ProxyPassword string `json:"proxyPassword"` } `json:"settings"` Connectors []interface{} `json:"connectors"` MuteHealthNotification bool `json:"mute_health_notification"` }
type NewSiteResponse ¶
type NewSiteResponse struct { ID string `json:"id"` Name string `json:"name"` Description string `json:"description"` Settings struct { ProxyAddress string `json:"proxyAddress"` ProxyPort int `json:"proxyPort"` ProxyUsername string `json:"proxyUsername"` ProxyPassword string `json:"proxyPassword"` } `json:"settings"` Connectors []interface{} `json:"connectors"` ConnectorObjects []interface{} `json:"connector_objects"` UpdateMode string `json:"update_mode"` SiteStatus struct { ConnectorsUp []interface{} `json:"ConnectorsUp"` ConnectorsDown []interface{} `json:"ConnectorsDown"` ConnectorsNotConfigured []interface{} `json:"ConnectorsNotConfigured"` Status string `json:"Status"` } `json:"site_status"` DownSince string `json:"down_since"` MuteHealthNotification bool `json:"mute_health_notification"` }
type SshUserAccounts ¶
type SshUserAccounts struct {
Name string `json:"name"`
}