servicediscovery

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: May 6, 2025 License: Apache-2.0 Imports: 8 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
}

Client is a Golang client for interacting with the CyberArk Discovery Service. It allows users to fetch URLs for various APIs available in CyberArk. This client is specialised to fetch only API endpoints, since only API endpoints are required by the Venafi Kubernetes Agent currently.

func New

func New(clientOpts ...ClientOpt) *Client

New creates a new CyberArk Service Discovery client, configurable with ClientOpt

func (*Client) DiscoverIdentityAPIURL

func (c *Client) DiscoverIdentityAPIURL(ctx context.Context, subdomain string) (string, error)

DiscoverIdentityAPIURL fetches from the service discovery service for a given subdomain and parses the CyberArk Identity API URL.

type ClientOpt

type ClientOpt func(*Client)

ClientOpt allows configuration of a Client when using New

func WithCustomEndpoint

func WithCustomEndpoint(endpoint string) ClientOpt

WithCustomEndpoint sets the endpoint to a custom URL without checking that the URL is a CyberArk Service Discovery server.

func WithHTTPClient

func WithHTTPClient(httpClient *http.Client) ClientOpt

WithHTTPClient allows the user to specify a custom HTTP client for the discovery client

func WithIntegrationEndpoint

func WithIntegrationEndpoint() ClientOpt

WithIntegrationEndpoint sets the discovery client to use the integration testing endpoint rather than production

Jump to

Keyboard shortcuts

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