flags

package
v0.0.0-...-cba8fe1 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const DowngradeAssessmentTeamKey = "downgradeAssessmentTeam"

DowngradeAssessmentTeamKey is the Flag Key in LaunchDarkly for downgrading assessment team users

View Source
const DowngradeNonCMSKey = "downgradeNonCMS"

DowngradeNonCMSKey is the Flag Key in LaunchDarkly for downgrading users with the NON-CMS job code

Variables

This section is empty.

Functions

func ContextKeyForID

func ContextKeyForID(id string) string

ContextKeyForID generates a context key from an ID we should not be using bare EUA IDs as identifiers to LaunchDarkly (per Jimil/ISSO), so we use a cryptographically secure one-way hash of the EUA ID as "key" for the LD Context object.

func NewLaunchDarklyClient

func NewLaunchDarklyClient(config Config) (*ld.LDClient, error)

NewLaunchDarklyClient returns a client backed by Launch Darkly

func Principal

func Principal(ctx context.Context) ldcontext.Context

Principal builds the LaunchDarkly user object for the currently authenticated principal.

Types

type Config

type Config struct {
	Source         appconfig.FlagSourceOption
	Key            string
	Timeout        time.Duration
	FlagValuesFile string
}

Config has all the parts for creating a new LD Client

Jump to

Keyboard shortcuts

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