Documentation
¶
Index ¶
- Variables
- type Client
- func (c Client) Authenticate(ctx context.Context, apiKey string, target domain.Target) (string, error)
- func (c Client) AuthenticateProxyKey(ctx context.Context, key string) (domain.AuthenticateProxyKeyResponse, error)
- func (c Client) FetchFeatureConfigForEnvironment(ctx context.Context, authToken, cluster, envID string) ([]clientgen.FeatureConfig, error)
- func (c Client) FetchSegmentConfigForEnvironment(ctx context.Context, authToken, cluster, envID string) ([]clientgen.Segment, error)
- func (c Client) GetProxyConfig(ctx context.Context, input domain.GetProxyConfigInput) (domain.ProxyConfig, error)
- func (c Client) PageProxyConfig(ctx context.Context, input domain.GetProxyConfigInput) ([]domain.ProxyConfig, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrNotFound is the error returned when the client service gets a 404 from Harness SaaS ErrNotFound = errors.New("ErrNotFound") ErrUnauthorized = errors.New("ErrUnauthorized") // ErrInternal is the error returned when the client service gets a 500 or unexpected error from Harness SaaS ErrInternal = errors.New("ErrInternal") // ErrBadRequest is the error returned when the client service gets a 400 from Harness SaaS ErrBadRequest = errors.New("bad request") )
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a type for interacting with the Feature Flag Client Service
func (Client) Authenticate ¶
func (c Client) Authenticate(ctx context.Context, apiKey string, target domain.Target) (string, error)
Authenticate makes an authentication request to the client service
func (Client) AuthenticateProxyKey ¶
func (c Client) AuthenticateProxyKey(ctx context.Context, key string) (domain.AuthenticateProxyKeyResponse, error)
AuthenticateProxyKey makes an auth request to the ff-client-service's /proxy/auth endpoint
func (Client) FetchFeatureConfigForEnvironment ¶
func (Client) FetchSegmentConfigForEnvironment ¶
func (Client) GetProxyConfig ¶
func (c Client) GetProxyConfig(ctx context.Context, input domain.GetProxyConfigInput) (domain.ProxyConfig, error)
GetProxyConfig makes a /proxy/config request and returns the result.
func (Client) PageProxyConfig ¶
func (c Client) PageProxyConfig(ctx context.Context, input domain.GetProxyConfigInput) ([]domain.ProxyConfig, error)
PageProxyConfig pages over the /proxy/config API until its retrieved all the results
Click to show internal directories.
Click to hide internal directories.