factoryconfig

package
v1.29.0 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package factoryconfig holds configuration for the Factory service SDK. This service is hosted by Common Fate, so configuring a client is slightly different than configuring a client for a Common Fate deployment.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

type Context struct {
	// BaseURL of the Factory service to connect to.
	// Defaults to "https://factory.commonfate.io"
	// if not provided.
	BaseURL string

	// OIDCIssuer is the OIDC issuer to use.
	// Defaults to "https://factory.commonfate.io"
	// if not provided.
	OIDCIssuer string

	// HTTPClient is filled in by calling Load()
	HTTPClient *http.Client

	// AuthClient is filled in by calling Load()
	AuthClient *auth.AuthClient
}

func Load

func Load(ctx context.Context, opts Opts) (*Context, error)

Load and initialize a client context. You can override values by providing them in 'opts'.

type Opts

type Opts struct {
	LicenceKey     string
	DeploymentName string

	// BaseURL of the Factory service to connect to.
	// Defaults to "https://factory.commonfate.io"
	// if not provided.
	BaseURL string

	// OIDCIssuer is the OIDC issuer to use.
	// Defaults to "https://factory.commonfate.io"
	// if not provided.
	OIDCIssuer string

	// BaseClient is an optional base HTTP client to use when
	// constructing the authenticated HTTP client.
	BaseClient *http.Client
}

Jump to

Keyboard shortcuts

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