Documentation
¶
Index ¶
- Constants
- type AuthConfig
- type AuthMethod
- type Client
- func (c *Client) ApplyReconciliation(ctx context.Context, instanceID string, ...) (*container.ApplyReconciliationResult, error)
- func (c *Client) CheckReconciliation(ctx context.Context, instanceID string, ...) (*container.ReconciliationCheckResult, error)
- func (c *Client) CleanupBlueprintValidations(ctx context.Context) (*manage.CleanupOperation, error)
- func (c *Client) CleanupChangesets(ctx context.Context) (*manage.CleanupOperation, error)
- func (c *Client) CleanupEvents(ctx context.Context) (*manage.CleanupOperation, error)
- func (c *Client) CleanupReconciliationResults(ctx context.Context) (*manage.CleanupOperation, error)
- func (c *Client) CreateBlueprintInstance(ctx context.Context, payload *types.BlueprintInstancePayload) (*types.BlueprintInstanceResponse, error)
- func (c *Client) CreateBlueprintValidation(ctx context.Context, payload *types.CreateBlueprintValidationPayload, ...) (*types.BlueprintValidationResponse, error)
- func (c *Client) CreateChangeset(ctx context.Context, payload *types.CreateChangesetPayload) (*types.ChangesetResponse, error)
- func (c *Client) DestroyBlueprintInstance(ctx context.Context, instanceID string, ...) (*types.BlueprintInstanceResponse, error)
- func (c *Client) GetBlueprintInstance(ctx context.Context, instanceID string) (*state.InstanceState, error)
- func (c *Client) GetBlueprintInstanceExports(ctx context.Context, instanceID string) (map[string]*state.ExportState, error)
- func (c *Client) GetBlueprintValidation(ctx context.Context, validationID string) (*manage.BlueprintValidation, error)
- func (c *Client) GetChangeset(ctx context.Context, changesetID string) (*manage.Changeset, error)
- func (c *Client) GetCleanupOperation(ctx context.Context, cleanupType manage.CleanupType, operationID string) (*manage.CleanupOperation, error)
- func (c *Client) ListBlueprintInstances(ctx context.Context, params state.ListInstancesParams) (state.ListInstancesResult, error)
- func (c *Client) StreamBlueprintInstanceEvents(ctx context.Context, instanceID string, lastEventID string, ...) error
- func (c *Client) StreamBlueprintValidationEvents(ctx context.Context, validationID string, lastEventID string, ...) error
- func (c *Client) StreamChangeStagingEvents(ctx context.Context, changesetID string, lastEventID string, ...) error
- func (c *Client) UpdateBlueprintInstance(ctx context.Context, instanceID string, ...) (*types.BlueprintInstanceResponse, error)
- func (c *Client) WaitForCleanupCompletion(ctx context.Context, cleanupType manage.CleanupType, operationID string, ...) (*manage.CleanupOperation, error)
- type ClientOption
- func WithClientAPIKey(apiKey string) ClientOption
- func WithClientAuthMethod(method AuthMethod) ClientOption
- func WithClientBluelinkSigv1CustomHeaders(headers []string) ClientOption
- func WithClientBluelinkSigv1KeyPair(keyPair *sigv1.KeyPair) ClientOption
- func WithClientClock(clock core.Clock) ClientOption
- func WithClientConnectProtocol(protocol ConnectProtocol) ClientOption
- func WithClientEndpoint(endpoint string) ClientOption
- func WithClientHTTPRoundTripper(createRoundTripper func(transport *http.Transport) http.RoundTripper) ClientOption
- func WithClientLogger(logger core.Logger) ClientOption
- func WithClientOAuth2Config(config *OAuth2Config) ClientOption
- func WithClientRequestTimeout(timeout time.Duration) ClientOption
- func WithClientStreamTimeout(timeout time.Duration) ClientOption
- func WithClientUnixDomainSocket(socket string) ClientOption
- type ConnectProtocol
- type OAuth2Config
Constants ¶
const ( // BluelinkAPIKeyHeaderName is the name of the header // used to pass the API key for authentication. BluelinkAPIKeyHeaderName = "Bluelink-Api-Key" // AuthorisationHeaderName is the name of the header // used to send a bearer token issued by an OAuth2 or OIDC provider. AuthorisationHeaderName = "Authorization" // LastEventIDHeaderName is the name of the header used to specify // the starting event ID for SSE streaming. LastEventIDHeaderName = "Last-Event-ID" // ChannelTypeValidation is the channel type identifier // for validation events. ChannelTypeValidation = "validation" // ChannelTypeChangeset is the channel type identifier // for change staging (change set) events. ChannelTypeChangeset = "changeset" // ChannelTypeDeployment is the channel type identifier // for deployment events. ChannelTypeDeployment = "deployment" )
const ( // DefaultEndpoint specifies the default endpoint to use to connect // to the Bluelink Deploy Engine when no endpoint is specified for // the client. // There is no default production endpoint for the Deploy Engine // so it makes more sense for the end user to default to a version // of the Deploy Engine that is running locally as a part of a standard // Bluelink installation or otherwise. DefaultEndpoint = "http://localhost:8325" // DefaultProtocol specifies the default connection protocol to use // to connect to the Bluelink Deploy Engine when no protocol is specified // for the client. DefaultProtocol = ConnectProtocolTCP // DefaultUnixDomainSocket specifies the default Unix domain socket // file to use to connect to the Bluelink Deploy Engine when // the protocol is set to `ConnectProtocolUnixDomainSocket`. DefaultUnixDomainSocket = "/tmp/bluelink.sock" // DefaultAuthMethod specifies the default authentication method to use // to connect to the Bluelink Deploy Engine when no authentication method // is specified for the client. // This defaults to the Bluelink Signature v1 method which is the more secure // of the simpler authentication methods. DefaultAuthMethod = AuthMethodBluelinkSignatureV1 // DefaultRequestTimeout specifies the default timeout to use for HTTP requests // to the Bluelink Deploy Engine when no timeout is specified for the client. // This only applies to standard HTTP requests and not streaming requests. DefaultRequestTimeout = 60 * time.Second // DefaultStreamTimeout specifies the default timeout to use for streaming // requests to the Bluelink Deploy Engine when no timeout is specified for // the client. // This default is high to allow for long-running processes like deployments // of infrastructure that can take a long time to complete. DefaultStreamTimeout = 3 * time.Hour )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthConfig ¶
type AuthConfig struct {
// Method specifies the authentication method to use for requests
// to the Bluelink Deploy Engine.
Method AuthMethod
// APIKey is the API key to use to authenticate requests
// when Method is `AuthMethodAPIKey`.
APIKey string
// OAuth2Config is the OAuth configuration to use to authenticate
// requests when Method is `AuthMethodOAuth2`.
OAuth2Config *OAuth2Config
// BluelinkSignatureKeyPair is the Bluelink Signature v1 key pair
// to use to authenticate requests when Method is `AuthMethodBluelinkSignatureV1`.
BluelinkSignatureKeyPair *sigv1.KeyPair
// BluelinkSignatureCustomHeaders is a list of custom headers
// to include in the signed message for the Bluelink Signature v1
// authentication method.
BluelinkSignatureCustomHeaders []string
}
type AuthMethod ¶
type AuthMethod int32
AuthMethod represents the method of authentication that should be used to connect to an instance of the Bluelink Deploy Engine.
const ( // AuthMethodAPIKey indicates that the client should // authenticate using an API key. AuthMethodAPIKey AuthMethod = iota // AuthMethodOAuth2 indicates that the client should // authenticate using OAuth where a token is obtained // from a third-party identity provider through the // client credentials grant type. // This version of the Deploy Engine supports OAuth2/OIDC // providers that produce JWTs for access tokens that are compatible // with the auth method documentation that can be found here: // https://www.bluelink.dev/docs/auth/jwts AuthMethodOAuth2 // AuthMethodBluelinkSignatureV1 indicates that the client should // authenticate using the Bluelink Signature v1 method. // See: https://www.bluelink.dev/docs/auth/signature-v1 AuthMethodBluelinkSignatureV1 )
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client provides a client implementation of the Bluelink Deploy Engine API. This supports v1 of the API including the v1 streaming interface.
func NewClient ¶
func NewClient( opts ...ClientOption, ) (*Client, error)
NewClient creates a client for an instance of the Bluelink Deploy Engine v1 API. If an OAuth2/OIDC provider is configured, the client will fetch the discovery document from the provider if a token endpoint is not provided during client creation.
func (*Client) ApplyReconciliation ¶ added in v0.2.0
func (c *Client) ApplyReconciliation( ctx context.Context, instanceID string, payload *types.ApplyReconciliationPayload, ) (*container.ApplyReconciliationResult, error)
ApplyReconciliation applies reconciliation actions to resolve drift or interrupted state. This is a synchronous operation that returns the result of applying the reconciliation actions.
The instanceID parameter can be either the unique instance ID or the user-defined instance name.
This is the `POST {baseURL}/v1/deployments/instances/{id}/reconciliation/apply` API endpoint.
func (*Client) CheckReconciliation ¶ added in v0.2.0
func (c *Client) CheckReconciliation( ctx context.Context, instanceID string, payload *types.CheckReconciliationPayload, ) (*container.ReconciliationCheckResult, error)
CheckReconciliation checks for drift and interrupted state in a blueprint instance. This is a synchronous operation that returns the reconciliation check result containing any resources or links that need reconciliation.
The instanceID parameter can be either the unique instance ID or the user-defined instance name.
This is the `POST {baseURL}/v1/deployments/instances/{id}/reconciliation/check` API endpoint.
func (*Client) CleanupBlueprintValidations ¶
func (c *Client) CleanupBlueprintValidations( ctx context.Context, ) (*manage.CleanupOperation, error)
CleanupBlueprintValidations cleans up blueprint validation that are older than the retention period configured for the Deploy Engine instance. This is the `POST {baseURL}/v1/validations/cleanup` API endpoint.
func (*Client) CleanupChangesets ¶
CleanupChangesets cleans up change sets that are older than the retention period configured for the Deploy Engine instance. This is the `POST {baseURL}/v1/deployments/changes/cleanup` API endpoint.
func (*Client) CleanupEvents ¶
CleanupEvents cleans up events that are older than the retention period configured for the Deploy Engine instance.
This will clean up events for all processes including blueprint validations, change staging and deployments. This will not clean up the resources themselves, only the events that are associated with them. You can clean up change sets and blueprint validations using the dedicated methods. This is the `POST {baseURL}/v1/events/cleanup` API endpoint.
func (*Client) CleanupReconciliationResults ¶ added in v0.2.0
func (c *Client) CleanupReconciliationResults( ctx context.Context, ) (*manage.CleanupOperation, error)
CleanupReconciliationResults triggers cleanup of old reconciliation results. This is an asynchronous operation that returns immediately after triggering the cleanup. Reconciliation results older than the configured retention period will be removed.
This is the `POST {baseURL}/v1/deployments/reconciliation-results/cleanup` API endpoint.
func (*Client) CreateBlueprintInstance ¶
func (c *Client) CreateBlueprintInstance( ctx context.Context, payload *types.BlueprintInstancePayload, ) (*types.BlueprintInstanceResponse, error)
CreateBlueprintInstance (Deploy New) creates a new blueprint deployment instance. This will start the deployment process for the provided blueprint document and change set. It will return a response containing the blueprint instance resource and a lastEventId that can be used as a starting offset when streaming deployment events. This is the `POST {baseURL}/v1/deployments/instances` API endpoint.
func (*Client) CreateBlueprintValidation ¶
func (c *Client) CreateBlueprintValidation( ctx context.Context, payload *types.CreateBlueprintValidationPayload, query *types.CreateBlueprintValidationQuery, ) (*types.BlueprintValidationResponse, error)
CreateBlueprintValidation creates a new blueprint validation for the provided blueprint document and starts the validation process. This will return a response containing the validation resource and a lastEventId that can be used as a starting offset when streaming validation events. This is the `POST {baseURL}/v1/validations` API endpoint.
func (*Client) CreateChangeset ¶
func (c *Client) CreateChangeset( ctx context.Context, payload *types.CreateChangesetPayload, ) (*types.ChangesetResponse, error)
CreateChangeset creates a change set for a blueprint deployment. This will start a change staging process for the provided blueprint document and return a response containing the change set resource and a lastEventId that can be used as a starting offset when streaming change staging events.
If a valid instance ID or name is provided, a change set will be created by comparing the provided blueprint document with the current state of the existing blueprint instance.
Creating a change set should be carried out in preparation for deploying new blueprint instances or updating existing blueprint instances.
This is the `POST {baseURL}/v1/deployments/changes` API endpoint.
func (*Client) DestroyBlueprintInstance ¶
func (c *Client) DestroyBlueprintInstance( ctx context.Context, instanceID string, payload *types.DestroyBlueprintInstancePayload, ) (*types.BlueprintInstanceResponse, error)
DestroyBlueprintInstance destroys a blueprint deployment instance. This will start the destroy process for the provided change set. It will return a response containing the current state of the blueprint instance and a lastEventId that can be used as a starting offset when streaming destroy events. This is the `POST {baseURL}/v1/deployments/instances/{id}/destroy` API endpoint.
The instanceID parameter can be either the unique instance ID or the user-defined instance name.
func (*Client) GetBlueprintInstance ¶
func (c *Client) GetBlueprintInstance( ctx context.Context, instanceID string, ) (*state.InstanceState, error)
GetBlueprintInstance retrieves a blueprint deployment instance. This will return the current status of the deployment along with the current state of the blueprint intance. This is the `GET {baseURL}/v1/deployments/instances/{id}` API endpoint.
The instanceID parameter can be either the unique instance ID or the user-defined instance name.
func (*Client) GetBlueprintInstanceExports ¶
func (c *Client) GetBlueprintInstanceExports( ctx context.Context, instanceID string, ) (map[string]*state.ExportState, error)
GetBlueprintInstanceExports retrieves the exports from a blueprint deployment instance. This will return the exported fields from the blueprint instance. This is the `GET {baseURL}/v1/deployments/instances/{id}/exports` API endpoint.
The instanceID parameter can be either the unique instance ID or the user-defined instance name.
func (*Client) GetBlueprintValidation ¶
func (c *Client) GetBlueprintValidation( ctx context.Context, validationID string, ) (*manage.BlueprintValidation, error)
GetBlueprintValidation retrieves metadata and status information about a blueprint validation. To get validation events (diagnostics), use the `StreamBlueprintValidationEvents` method. This is the `GET {baseURL}/v1/validations/{id}` API endpoint.
func (*Client) GetChangeset ¶
func (c *Client) GetChangeset( ctx context.Context, changesetID string, ) (*manage.Changeset, error)
GetChangeset retrieves a change set for a blueprint deployment. This will return the current status of the change staging process. If complete, the response will include a full set of changes that will be applied when deploying the change set. This is the `GET {baseURL}/v1/deployments/changes/{id}` API endpoint.
func (*Client) GetCleanupOperation ¶ added in v0.3.0
func (c *Client) GetCleanupOperation( ctx context.Context, cleanupType manage.CleanupType, operationID string, ) (*manage.CleanupOperation, error)
GetCleanupOperation retrieves the status of a cleanup operation by ID. This is used to poll the status of an asynchronous cleanup operation.
func (*Client) ListBlueprintInstances ¶ added in v0.2.0
func (c *Client) ListBlueprintInstances( ctx context.Context, params state.ListInstancesParams, ) (state.ListInstancesResult, error)
ListBlueprintInstances retrieves a paginated list of blueprint instances. The params allow filtering by name and paginating results. This is the `GET {baseURL}/v1/deployments/instances` API endpoint.
func (*Client) StreamBlueprintInstanceEvents ¶
func (c *Client) StreamBlueprintInstanceEvents( ctx context.Context, instanceID string, lastEventID string, streamTo chan<- types.BlueprintInstanceEvent, errChan chan<- error, ) error
StreamBlueprintInstanceEvents streams events from the current deployment process for the given blueprint instance ID.
This will stream events for new deployments, updates and for destroying a blueprint instance.
This will produce a stream of events as they occur or that have recently occurred.
The lastEventID parameter can be used to start streaming from a specific event ID. Pass the lastEventId from the Create/Update/Destroy response to avoid missing events. Pass an empty string to start from recently queued events.
For a blueprint instance that has been destroyed, this stream will no longer be available to new connections once the destroy process has been successfully completed.
Any HTTP errors that occur when estabilishing a connection or unexpected failures in the deployment process will be sent to the provided error channel.
This comes with built-in re-connect logic that makes use of the the `Last-Event-ID` header to resume the stream from the last event received.
This is the `GET {baseURL}/v1/deployments/instances/{id}/stream` API SSE stream endpoint.
The instanceID parameter can be either the unique instance ID or the user-defined instance name.
func (*Client) StreamBlueprintValidationEvents ¶
func (c *Client) StreamBlueprintValidationEvents( ctx context.Context, validationID string, lastEventID string, streamTo chan<- types.BlueprintValidationEvent, errChan chan<- error, ) error
StreamBlueprintValidationEvents streams events from a blueprint validation process. This will produce a stream of events as they occur or that have recently occurred.
The lastEventID parameter can be used to start streaming from a specific event ID. Pass the lastEventId from the CreateBlueprintValidation response to avoid missing events. Pass an empty string to start from recently queued events.
Any HTTP errors that occur when estabilishing a connection will be sent to the provided error channel. This comes with built-in re-connect logic that makes use of the the `Last-Event-ID` header to resume the stream from the last event received. This is the `GET {baseURL}/v1/validations/{id}/stream` API SSE stream endpoint.
func (*Client) StreamChangeStagingEvents ¶
func (c *Client) StreamChangeStagingEvents( ctx context.Context, changesetID string, lastEventID string, streamTo chan<- types.ChangeStagingEvent, errChan chan<- error, ) error
StreamChangeStagingEvents streams events from the change staging process for the given change set ID. This will produce a stream of events as they occur or that have recently occurred.
The lastEventID parameter can be used to start streaming from a specific event ID. Pass the lastEventId from the CreateChangeset response to avoid missing events. Pass an empty string to start from recently queued events.
Any HTTP errors that occur when estabilishing a connection will be sent to the provided error channel. This comes with built-in re-connect logic that makes use of the the `Last-Event-ID` header to resume the stream from the last event received. This is the `GET {baseURL}/v1/deployments/changes/{id}/stream` API SSE stream endpoint.
func (*Client) UpdateBlueprintInstance ¶
func (c *Client) UpdateBlueprintInstance( ctx context.Context, instanceID string, payload *types.BlueprintInstancePayload, ) (*types.BlueprintInstanceResponse, error)
UpdateBlueprintInstance (Deploy Existing) updates an existing blueprint deployment instance. This will start the deployment process for the provided blueprint document and change set. It will return a response containing the current state of the blueprint instance and a lastEventId that can be used as a starting offset when streaming deployment events. This is the `PATCH {baseURL}/v1/deployments/instances/{id}` API endpoint.
The instanceID parameter can be either the unique instance ID or the user-defined instance name.
func (*Client) WaitForCleanupCompletion ¶ added in v0.3.0
func (c *Client) WaitForCleanupCompletion( ctx context.Context, cleanupType manage.CleanupType, operationID string, pollInterval time.Duration, ) (*manage.CleanupOperation, error)
WaitForCleanupCompletion polls until the cleanup operation completes or fails. The pollInterval parameter controls how often the status is checked. Returns the final operation state when status is no longer "running".
type ClientOption ¶
type ClientOption func(*Client)
ClientOption is a function that configures the client.
func WithClientAPIKey ¶
func WithClientAPIKey(apiKey string) ClientOption
WithClientAPIKey configures the API key to use to authenticate to the Bluelink Deploy Engine. This is only used when the authentication method is set to `AuthMethodAPIKey`. When an API key is not provided, the client will not be able to authenticate to the Bluelink Deploy Engine.
func WithClientAuthMethod ¶
func WithClientAuthMethod(method AuthMethod) ClientOption
WithClientAuthMethod configures the authentication method to use to connect to the Bluelink Deploy Engine. This can be either `AuthMethodAPIKey`, `AuthMethodOAuth2` or `AuthMethodBluelinkSignatureV1`. When an authentication method is not provided, the client will default to `AuthMethodBluelinkSignatureV1`.
func WithClientBluelinkSigv1CustomHeaders ¶
func WithClientBluelinkSigv1CustomHeaders(headers []string) ClientOption
WithClientBluelinkSigv1CustomHeaders configures the custom headers to use to authenticate to the Bluelink Deploy Engine using the Bluelink Signature v1 method. This is only used when the authentication method is set to `AuthMethodBluelinkSignatureV1`. Bluelink Signature v1 configuration must be provided when the authentication method is set to `AuthMethodBluelinkSignatureV1`. This is a list of headers that will be included in the signed message when creating the signature header.
func WithClientBluelinkSigv1KeyPair ¶
func WithClientBluelinkSigv1KeyPair(keyPair *sigv1.KeyPair) ClientOption
WithClientBluelinkSigv1KeyPair configures the Bluelink Signature v1 configuration to use to authenticate to the Bluelink Deploy Engine. This is only used when the authentication method is set to `AuthMethodBluelinkSignatureV1`. Bluelink Signature v1 configuration must be provided when the authentication method is set to `AuthMethodBluelinkSignatureV1`.
func WithClientClock ¶
func WithClientClock(clock core.Clock) ClientOption
WithClientClock configures the clock to use to get the current time and measure elapsed time. When a clock is not provided, the client will default to the current system clock.
func WithClientConnectProtocol ¶
func WithClientConnectProtocol(protocol ConnectProtocol) ClientOption
WithClientConnectProtocol configures the protocol to use to connect to the Bluelink Deploy Engine. This can be either `ConnectProtocolTCP` or `ConnectProtocolUnixDomainSocket`. When a protocol is not provided, the client will default to `ConnectProtocolTCP`.
func WithClientEndpoint ¶
func WithClientEndpoint(endpoint string) ClientOption
WithClientEndpoint configures the endpoint to use to connect to the Bluelink Deploy Engine. When an endpoint is not provided, the client will use `http://localhost:8325`. When the protocol is set to `ConnectProtocolUnixDomainSocket`, the endpoint will be ignored and the client will use a placeholder endpoint of "http://unix" to make sure the underlying HTTP client does not try to resolve the endpoint via DNS.
func WithClientHTTPRoundTripper ¶
func WithClientHTTPRoundTripper( createRoundTripper func(transport *http.Transport) http.RoundTripper, ) ClientOption
WithClientHTTPRoundTripper configures the HTTP round tripper to use to connect to the Bluelink Deploy Engine. This is used to configure the HTTP client with a custom transport that supports retries and other features. This is a function that takes a transport and returns a round tripper as there is core configuration that needs to be applied to the underlying transport (e.g. Unix domain socket support) in all cases. This round tripper will only be used for standard HTTP requests and not streaming requests. When a round tripper is not provided, the client will default to a transport that supports retries with exponential backoff and jitter configured with reasonable defaults.
func WithClientLogger ¶
func WithClientLogger(logger core.Logger) ClientOption
WithClientLogger configures the logger to use to log messages from the Bluelink Deploy Engine client. When a logger is not provided, the client will default to a no-op logger that does not log any messages.
func WithClientOAuth2Config ¶
func WithClientOAuth2Config(config *OAuth2Config) ClientOption
WithClientOAuth2Config configures the OAuth2 configuration to use to authenticate to the Bluelink Deploy Engine. This is only used when the authentication method is set to `AuthMethodOAuth2`. OAuth2 configuration must be provided when the authentication method is set to `AuthMethodOAuth2`.
func WithClientRequestTimeout ¶
func WithClientRequestTimeout(timeout time.Duration) ClientOption
WithClientRequestTimeout configures the request timeout to use to connect to the Bluelink Deploy Engine. This is used to configure the HTTP client with a custom timeout for requests. When a timeout is not provided, the client will default to 60 seconds. This only applies to standard HTTP requests and not streaming requests.
func WithClientStreamTimeout ¶
func WithClientStreamTimeout(timeout time.Duration) ClientOption
WithClientStreamTimeout configures the stream timeout to use to connect to the Bluelink Deploy Engine. This is used to configure the HTTP client with a custom timeout for streaming requests. When a timeout is not provided, the client will default to 3 hours.
func WithClientUnixDomainSocket ¶
func WithClientUnixDomainSocket(socket string) ClientOption
WithClientUnixDomainSocket configures the Unix domain socket to use to connect to the Bluelink Deploy Engine. This is only used when the protocol is set to `ConnectProtocolUnixDomainSocket`. When a Unix domain socket is not provided, the client will default to `/tmp/bluelink.sock`.
type ConnectProtocol ¶
type ConnectProtocol int32
ConnectProtocol represents the protocol used to connect to an instance of the Bluelink Deploy Engine.
const ( // ConnectProtocolTCP indicates that the client should connect // to the Bluelink Deploy Engine using HTTP over TCP. ConnectProtocolTCP ConnectProtocol = iota // ConnectProtocolUnixDomainSocket indicates that the client should connect // to the Bluelink Deploy Engine using a Unix domain socket. ConnectProtocolUnixDomainSocket )
type OAuth2Config ¶
type OAuth2Config struct {
// ProviderBaseURL is the base URL of the OAuth2 or OIDC provider.
// This is the URL from which the client will use to obtain
// the discovery document for the provider at either `/.well-known/openid-configuration`
// or `/.well-known/oauth-authorization-server`.
// When TokenEndpoint is set, this value is ignored.
ProviderBaseURL string
// TokenEndpoint is the fully qualified URL of the token endpoint to use to obtain
// an access token from the OAuth2 or OIDC provider.
// When this value is left empty, the client will attempt to obtain the discovery document
// from the ProviderBaseURL and use the token endpoint from that document.
TokenEndpoint string
// ClientID is used as a part of the client credentials grant type
// to obtain an access token from the OAuth2 or OIDC provider.
ClientID string
// ClientSecret is used as a part of the client credentials grant type
// to obtain an access token from the OAuth2 or OIDC provider.
ClientSecret string
}
OAuth2Config contains the configuration for gaining access to the Deploy Engine using an OAuth2 or OIDC provider.
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
internal
|
|
|
sseconfig
The github.com/r3labs/sse/v2 package provides an interface for creating clients that takes options but doesn't implement any of the options.
|
The github.com/r3labs/sse/v2 package provides an interface for creating clients that takes options but doesn't implement any of the options. |
|
testutils
Provides a stub implementation of a Deploy Engine server.
|
Provides a stub implementation of a Deploy Engine server. |