adapters

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: Apache-2.0 Imports: 13 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Middleware

func Middleware(client ldapi.APIClient, streamingUrl string) func(handler http.Handler) http.Handler

Middleware puts adapters on to the context for consumption by other things

func WithApi

func WithApi(ctx context.Context, s Api) context.Context

func WithApiAndSdk added in v1.9.0

func WithApiAndSdk(ctx context.Context, client ldapi.APIClient, streamingUrl string) context.Context

func WithSdk

func WithSdk(ctx context.Context, s Sdk) context.Context

Types

type Api

type Api interface {
	GetSdkKey(ctx context.Context, projectKey, environmentKey string) (string, error)
	GetAllFlags(ctx context.Context, projectKey string) ([]ldapi.FeatureFlag, error)
	GetProjectEnvironments(ctx context.Context, projectKey string, query string, limit *int) ([]ldapi.Environment, error)
}

func GetApi

func GetApi(ctx context.Context) Api

func NewApi

func NewApi(client ldapi.APIClient) Api

type Sdk

type Sdk interface {
	GetAllFlagsState(ctx context.Context, ldContext ldcontext.Context, sdkKey string) (flagstate.AllFlags, error)
}

func GetSdk

func GetSdk(ctx context.Context) Sdk

Directories

Path Synopsis
Package internal is a generated GoMock package.
Package internal is a generated GoMock package.
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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