ldapi

package module
v5.3.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2021 License: Apache-2.0 Imports: 21 Imported by: 13

README

This repository contains a client library for LaunchDarkly's REST API. This client was automatically generated from our OpenAPI specification.

This REST API is for custom integrations, data export, or automating your feature flag workflows. DO NOT use this client library to include feature flags in your web or mobile application. To integrate feature flags with your application, please see the SDK documentation

Go API client for ldapi

Build custom integrations with the LaunchDarkly REST API

Overview

This API client was generated by the swagger-codegen project. By using the swagger-spec from a remote server, you can easily generate an API client.

  • API version: 5.3.0
  • Package version: 1.0.0
  • Build package: io.swagger.codegen.languages.GoClientCodegen For more information, please visit https://support.launchdarkly.com

Installation

import "github.com/launchdarkly/api-client-go"

Documentation for API Endpoints

All URIs are relative to https://app.launchdarkly.com/api/v2

Class Method HTTP request Description
AccessTokensApi DeleteToken Delete /tokens/{tokenId} Delete an access token by ID.
AccessTokensApi GetToken Get /tokens/{tokenId} Get a single access token by ID.
AccessTokensApi GetTokens Get /tokens Returns a list of tokens in the account.
AccessTokensApi PatchToken Patch /tokens/{tokenId} Modify an access token by ID.
AccessTokensApi PostToken Post /tokens Create a new token.
AccessTokensApi ResetToken Post /tokens/{tokenId}/reset Reset an access token's secret key with an optional expiry time for the old key.
AuditLogApi GetAuditLogEntries Get /auditlog Get a list of all audit log entries. The query parameters allow you to restrict the returned results by date ranges, resource specifiers, or a full-text search query.
AuditLogApi GetAuditLogEntry Get /auditlog/{resourceId} Use this endpoint to fetch a single audit log entry by its resouce ID.
CustomRolesApi DeleteCustomRole Delete /roles/{customRoleKey} Delete a custom role by key.
CustomRolesApi GetCustomRole Get /roles/{customRoleKey} Get one custom role by key.
CustomRolesApi GetCustomRoles Get /roles Return a complete list of custom roles.
CustomRolesApi PatchCustomRole Patch /roles/{customRoleKey} Modify a custom role by key.
CustomRolesApi PostCustomRole Post /roles Create a new custom role.
CustomerMetricsApi GetEvaluations Get /usage/evaluations/{envId}/{flagKey} Get events usage by event id and the feature flag key.
CustomerMetricsApi GetEvent Get /usage/events/{type} Get events usage by event type.
CustomerMetricsApi GetEvents Get /usage/events Get events usage endpoints.
CustomerMetricsApi GetMAU Get /usage/mau Get monthly active user data.
CustomerMetricsApi GetMAUByCategory Get /usage/mau/bycategory Get monthly active user data by category.
CustomerMetricsApi GetStream Get /usage/streams/{source} Get a stream endpoint and return timeseries data.
CustomerMetricsApi GetStreamBySDK Get /usage/streams/{source}/bysdkversion Get a stream timeseries data by source show sdk version metadata.
CustomerMetricsApi GetStreamSDKVersion Get /usage/streams/{source}/sdkversions Get a stream timeseries data by source and show all sdk version associated.
CustomerMetricsApi GetStreams Get /usage/streams Returns a list of all streams.
CustomerMetricsApi GetUsage Get /usage Returns of the usage endpoints available.
DataExportDestinationsApi DeleteDestination Delete /destinations/{projectKey}/{environmentKey}/{destinationId} Get a single data export destination by ID
DataExportDestinationsApi GetDestination Get /destinations/{projectKey}/{environmentKey}/{destinationId} Get a single data export destination by ID
DataExportDestinationsApi GetDestinations Get /destinations Returns a list of all data export destinations.
DataExportDestinationsApi PatchDestination Patch /destinations/{projectKey}/{environmentKey}/{destinationId} Perform a partial update to a data export destination.
DataExportDestinationsApi PostDestination Post /destinations/{projectKey}/{environmentKey} Create a new data export destination
EnvironmentsApi DeleteEnvironment Delete /projects/{projectKey}/environments/{environmentKey} Delete an environment in a specific project.
EnvironmentsApi GetEnvironment Get /projects/{projectKey}/environments/{environmentKey} Get an environment given a project and key.
EnvironmentsApi PatchEnvironment Patch /projects/{projectKey}/environments/{environmentKey} Modify an environment by ID. If you try to patch the environment by setting both required and requiredApprovalTags, it will result in an error. Users can specify either required approvals for all flags in an environment or those with specific tags, but not both. Only customers on an Enterprise plan can require approval for flag updates with either mechanism.
EnvironmentsApi PostEnvironment Post /projects/{projectKey}/environments Create a new environment in a specified project with a given name, key, and swatch color.
EnvironmentsApi ResetEnvironmentMobileKey Post /projects/{projectKey}/environments/{environmentKey}/mobileKey Reset an environment's mobile key. The optional expiry for the old key is deprecated for this endpoint, so the old key will always expire immediately.
EnvironmentsApi ResetEnvironmentSDKKey Post /projects/{projectKey}/environments/{environmentKey}/apiKey Reset an environment's SDK key with an optional expiry time for the old key.
FeatureFlagsApi CopyFeatureFlag Post /flags/{projectKey}/{featureFlagKey}/copy Copies the feature flag configuration from one environment to the same feature flag in another environment.
FeatureFlagsApi DeleteApprovalRequest Delete /projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests/{approvalRequestId} Delete an approval request for a feature flag config
FeatureFlagsApi DeleteFeatureFlag Delete /flags/{projectKey}/{featureFlagKey} Delete a feature flag in all environments. Be careful-- only delete feature flags that are no longer being used by your application.
FeatureFlagsApi DeleteFlagConfigScheduledChanges Delete /projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/scheduled-changes/{scheduledChangeId} Delete a scheduled change on a feature flag in an environment.
FeatureFlagsApi FlagsProjectKeyEnvironmentKeyFeatureFlagKeyDependentFlagsGet Get /flags/{projectKey}/{environmentKey}/{featureFlagKey}/dependent-flags Get dependent flags for the flag in the environment specified in path parameters
FeatureFlagsApi FlagsProjectKeyFeatureFlagKeyDependentFlagsGet Get /flags/{projectKey}/{featureFlagKey}/dependent-flags Get dependent flags across all environments for the flag specified in the path parameters
FeatureFlagsApi GetApprovalRequest Get /projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests/{approvalRequestId} Get a single approval request for a feature flag config
FeatureFlagsApi GetApprovalRequests Get /projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests Get all approval requests for a feature flag config
FeatureFlagsApi GetExpiringUserTargets Get /flags/{projectKey}/{featureFlagKey}/expiring-user-targets/{environmentKey} Get expiring user targets for feature flag
FeatureFlagsApi GetFeatureFlag Get /flags/{projectKey}/{featureFlagKey} Get a single feature flag by key.
FeatureFlagsApi GetFeatureFlagStatus Get /flag-statuses/{projectKey}/{environmentKey}/{featureFlagKey} Get the status for a particular feature flag.
FeatureFlagsApi GetFeatureFlagStatusAcrossEnvironments Get /flag-status/{projectKey}/{featureFlagKey} Get the status for a particular feature flag across environments
FeatureFlagsApi GetFeatureFlagStatuses Get /flag-statuses/{projectKey}/{environmentKey} Get a list of statuses for all feature flags. The status includes the last time the feature flag was requested, as well as the state of the flag.
FeatureFlagsApi GetFeatureFlags Get /flags/{projectKey} Get a list of all features in the given project.
FeatureFlagsApi GetFlagConfigScheduledChange Get /projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/scheduled-changes/{scheduledChangeId} Get a scheduled change on a feature flag by id.
FeatureFlagsApi GetFlagConfigScheduledChanges Get /projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/scheduled-changes Get all scheduled workflows for a feature flag by key.
FeatureFlagsApi GetFlagConfigScheduledChangesConflicts Post /projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/scheduled-changes-conflicts Lists conflicts between the given instructions and any existing scheduled changes for the feature flag. The actual HTTP verb should be REPORT, not POST.
FeatureFlagsApi PatchExpiringUserTargets Patch /flags/{projectKey}/{featureFlagKey}/expiring-user-targets/{environmentKey} Update, add, or delete expiring user targets on feature flag
FeatureFlagsApi PatchFeatureFlag Patch /flags/{projectKey}/{featureFlagKey} Perform a partial update to a feature.
FeatureFlagsApi PatchFlagConfigScheduledChange Patch /projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/scheduled-changes/{scheduledChangeId} Updates an existing scheduled-change on a feature flag in an environment.
FeatureFlagsApi PostApplyApprovalRequest Post /projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests/{approvalRequestId}/apply Apply approval request for a feature flag config
FeatureFlagsApi PostApprovalRequest Post /projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests/{approvalRequestId} Create an approval request for a feature flag config
FeatureFlagsApi PostFeatureFlag Post /flags/{projectKey} Creates a new feature flag.
FeatureFlagsApi PostFlagConfigScheduledChanges Post /projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/scheduled-changes Creates a new scheduled change for a feature flag.
FeatureFlagsApi PostReviewApprovalRequest Post /projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests/{approvalRequestId}/review Review approval request for a feature flag config
IntegrationsApi DeleteIntegrationSubscription Delete /integrations/{integrationKey}/{integrationId} Delete an integration subscription by ID.
IntegrationsApi GetIntegrationSubscription Get /integrations/{integrationKey}/{integrationId} Get a single integration subscription by ID.
IntegrationsApi GetIntegrationSubscriptions Get /integrations/{integrationKey} Get a list of all configured integrations of a given kind.
IntegrationsApi GetIntegrations Get /integrations Get a list of all configured audit log event integrations associated with this account.
IntegrationsApi PatchIntegrationSubscription Patch /integrations/{integrationKey}/{integrationId} Modify an integration subscription by ID.
IntegrationsApi PostIntegrationSubscription Post /integrations/{integrationKey} Create a new integration subscription of a given kind.
ProjectsApi DeleteProject Delete /projects/{projectKey} Delete a project by key. Caution-- deleting a project will delete all associated environments and feature flags. You cannot delete the last project in an account.
ProjectsApi GetProject Get /projects/{projectKey} Fetch a single project by key.
ProjectsApi GetProjects Get /projects Returns a list of all projects in the account.
ProjectsApi PatchProject Patch /projects/{projectKey} Modify a project by ID.
ProjectsApi PostProject Post /projects Create a new project with the given key and name.
RelayProxyConfigurationsApi DeleteRelayProxyConfig Delete /account/relay-auto-configs/{id} Delete a relay proxy configuration by ID.
RelayProxyConfigurationsApi GetRelayProxyConfig Get /account/relay-auto-configs/{id} Get a single relay proxy configuration by ID.
RelayProxyConfigurationsApi GetRelayProxyConfigs Get /account/relay-auto-configs Returns a list of relay proxy configurations in the account.
RelayProxyConfigurationsApi PatchRelayProxyConfig Patch /account/relay-auto-configs/{id} Modify a relay proxy configuration by ID.
RelayProxyConfigurationsApi PostRelayAutoConfig Post /account/relay-auto-configs Create a new relay proxy config.
RelayProxyConfigurationsApi ResetRelayProxyConfig Post /account/relay-auto-configs/{id}/reset Reset a relay proxy configuration's secret key with an optional expiry time for the old key.
RootApi GetRoot Get /
TeamMembersApi DeleteMember Delete /members/{memberId} Delete a team member by ID.
TeamMembersApi GetMe Get /members/me Get the current team member associated with the token
TeamMembersApi GetMember Get /members/{memberId} Get a single team member by ID.
TeamMembersApi GetMembers Get /members Returns a list of all members in the account.
TeamMembersApi PatchMember Patch /members/{memberId} Modify a team member by ID.
TeamMembersApi PostMembers Post /members Invite new members.
UserSegmentsApi DeleteUserSegment Delete /segments/{projectKey}/{environmentKey}/{userSegmentKey} Delete a user segment.
UserSegmentsApi GetExpiringUserTargetsOnSegment Get /segments/{projectKey}/{userSegmentKey}/expiring-user-targets/{environmentKey} Get expiring user targets for user segment
UserSegmentsApi GetUserSegment Get /segments/{projectKey}/{environmentKey}/{userSegmentKey} Get a single user segment by key.
UserSegmentsApi GetUserSegments Get /segments/{projectKey}/{environmentKey} Get a list of all user segments in the given project.
UserSegmentsApi PatchExpiringUserTargetsOnSegment Patch /segments/{projectKey}/{userSegmentKey}/expiring-user-targets/{environmentKey} Update, add, or delete expiring user targets on user segment
UserSegmentsApi PatchUserSegment Patch /segments/{projectKey}/{environmentKey}/{userSegmentKey} Perform a partial update to a user segment.
UserSegmentsApi PostUserSegment Post /segments/{projectKey}/{environmentKey} Creates a new user segment.
UserSegmentsApi UpdateBigSegmentTargets Post /segments/{projectKey}/{environmentKey}/{userSegmentKey}/users Update targets included or excluded in a big segment
UserSettingsApi GetExpiringUserTargetsForUser Get /users/{projectKey}/{userKey}/expiring-user-targets/{environmentKey} Get expiring dates on flags for user
UserSettingsApi GetUserFlagSetting Get /users/{projectKey}/{environmentKey}/{userKey}/flags/{featureFlagKey} Fetch a single flag setting for a user by key.
UserSettingsApi GetUserFlagSettings Get /users/{projectKey}/{environmentKey}/{userKey}/flags Fetch a single flag setting for a user by key.
UserSettingsApi PatchExpiringUserTargetsForFlags Patch /users/{projectKey}/{userKey}/expiring-user-targets/{environmentKey} Update, add, or delete expiring user targets for a single user on all flags
UserSettingsApi PutFlagSetting Put /users/{projectKey}/{environmentKey}/{userKey}/flags/{featureFlagKey} Specifically enable or disable a feature flag for a user based on their key.
UsersApi DeleteUser Delete /users/{projectKey}/{environmentKey}/{userKey} Delete a user by ID.
UsersApi GetSearchUsers Get /user-search/{projectKey}/{environmentKey} Search users in LaunchDarkly based on their last active date, or a search query. It should not be used to enumerate all users in LaunchDarkly-- use the List users API resource.
UsersApi GetUser Get /users/{projectKey}/{environmentKey}/{userKey} Get a user by key.
UsersApi GetUsers Get /users/{projectKey}/{environmentKey} List all users in the environment. Includes the total count of users. In each page, there will be up to 'limit' users returned (default 20). This is useful for exporting all users in the system for further analysis. Paginated collections will include a next link containing a URL with the next set of elements in the collection.
WebhooksApi DeleteWebhook Delete /webhooks/{resourceId} Delete a webhook by ID.
WebhooksApi GetWebhook Get /webhooks/{resourceId} Get a webhook by ID.
WebhooksApi GetWebhooks Get /webhooks Fetch a list of all webhooks.
WebhooksApi PatchWebhook Patch /webhooks/{resourceId} Modify a webhook by ID.
WebhooksApi PostWebhook Post /webhooks Create a webhook.

Documentation For Models

Author

support@launchdarkly.com

Sample Code

package main

import (
	"context"
	"fmt"
	"os"

	"github.com/launchdarkly/api-client-go"
)

func main() {
	apiKey := os.Getenv("LD_API_KEY")
	if apiKey == "" {
		panic("LD_API_KEY env var was empty!")
	}
	client := ldapi.NewAPIClient(ldapi.NewConfiguration())
	ctx := context.WithValue(context.Background(), ldapi.ContextAPIKey, ldapi.APIKey{
		Key: apiKey,
	})

	// Create a multi-variate feature flag
	body := ldapi.FeatureFlagBody{
		Name: "Test Flag Go",
		Key:  "test-go",
		Variations: []ldapi.Variation{
			{Value: intfPtr([]interface{}{1, 2})},
			{Value: intfPtr([]interface{}{3, 4})},
			{Value: intfPtr([]interface{}{5})}}}
	flag, _, err := client.FeatureFlagsApi.PostFeatureFlag(ctx, "openapi", body, nil)
	if err != nil {
		panic(fmt.Errorf("create failed: %s", err))
	}
	fmt.Printf("Created flag: %+v\n", flag)
	// Clean up new flag
	defer func() {
		if _, err := client.FeatureFlagsApi.DeleteFeatureFlag(ctx, "openapi", body.Key); err != nil {
			panic(fmt.Errorf("delete failed: %s", err))
		}
	}()
}

func intfPtr(i interface{}) *interface{} {
	return &i
}

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ContextOAuth2 takes a oauth2.TokenSource as authentication for the request.
	ContextOAuth2 = contextKey("token")

	// ContextBasicAuth takes BasicAuth as authentication for the request.
	ContextBasicAuth = contextKey("basic")

	// ContextAccessToken takes a string oauth2 access token as authentication for the request.
	ContextAccessToken = contextKey("accesstoken")

	// ContextAPIKey takes an APIKey as authentication for the request
	ContextAPIKey = contextKey("apikey")
)

Functions

func CacheExpires

func CacheExpires(r *http.Response) time.Time

CacheExpires helper function to determine remaining time before repeating a request.

Types

type APIClient

type APIClient struct {
	AccessTokensApi *AccessTokensApiService

	AuditLogApi *AuditLogApiService

	CustomRolesApi *CustomRolesApiService

	CustomerMetricsApi *CustomerMetricsApiService

	DataExportDestinationsApi *DataExportDestinationsApiService

	EnvironmentsApi *EnvironmentsApiService

	FeatureFlagsApi *FeatureFlagsApiService

	IntegrationsApi *IntegrationsApiService

	ProjectsApi *ProjectsApiService

	RelayProxyConfigurationsApi *RelayProxyConfigurationsApiService

	RootApi *RootApiService

	TeamMembersApi *TeamMembersApiService

	UserSegmentsApi *UserSegmentsApiService

	UserSettingsApi *UserSettingsApiService

	UsersApi *UsersApiService

	WebhooksApi *WebhooksApiService
	// contains filtered or unexported fields
}

APIClient manages communication with the LaunchDarkly REST API API v5.3.0 In most cases there should be only one, shared, APIClient.

func NewAPIClient

func NewAPIClient(cfg *Configuration) *APIClient

NewAPIClient creates a new API client. Requires a userAgent string describing your application. optionally a custom http.Client to allow for advanced features such as caching.

func (*APIClient) ChangeBasePath

func (c *APIClient) ChangeBasePath(path string)

Change base path to allow switching to mocks

type APIKey

type APIKey struct {
	Key    string
	Prefix string
}

APIKey provides API key based authentication to a request passed via context using ContextAPIKey

type APIResponse

type APIResponse struct {
	*http.Response `json:"-"`
	Message        string `json:"message,omitempty"`
	// Operation is the name of the swagger operation.
	Operation string `json:"operation,omitempty"`
	// RequestURL is the request URL. This value is always available, even if the
	// embedded *http.Response is nil.
	RequestURL string `json:"url,omitempty"`
	// Method is the HTTP method used for the request.  This value is always
	// available, even if the embedded *http.Response is nil.
	Method string `json:"method,omitempty"`
	// Payload holds the contents of the response body (which may be nil or empty).
	// This is provided here as the raw response.Body() reader will have already
	// been drained.
	Payload []byte `json:"-"`
}

func NewAPIResponse

func NewAPIResponse(r *http.Response) *APIResponse

func NewAPIResponseWithError

func NewAPIResponseWithError(errorMessage string) *APIResponse

type AccessTokensApiGetTokensOpts

type AccessTokensApiGetTokensOpts struct {
	ShowAll optional.Bool
}

type AccessTokensApiResetTokenOpts

type AccessTokensApiResetTokenOpts struct {
	Expiry optional.Int64
}

type AccessTokensApiService

type AccessTokensApiService service

func (*AccessTokensApiService) DeleteToken

func (a *AccessTokensApiService) DeleteToken(ctx context.Context, tokenId string) (*http.Response, error)

AccessTokensApiService Delete an access token by ID.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param tokenId The access token ID.

func (*AccessTokensApiService) GetToken

func (a *AccessTokensApiService) GetToken(ctx context.Context, tokenId string) (Token, *http.Response, error)

AccessTokensApiService Get a single access token by ID.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param tokenId The access token ID.

@return Token

func (*AccessTokensApiService) GetTokens

func (a *AccessTokensApiService) GetTokens(ctx context.Context, localVarOptionals *AccessTokensApiGetTokensOpts) (Tokens, *http.Response, error)

func (*AccessTokensApiService) PatchToken

func (a *AccessTokensApiService) PatchToken(ctx context.Context, tokenId string, patchDelta []PatchOperation) (Token, *http.Response, error)

AccessTokensApiService Modify an access token by ID.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param tokenId The access token ID.
  • @param patchDelta Requires a JSON Patch representation of the desired changes to the project. 'http://jsonpatch.com/'

@return Token

func (*AccessTokensApiService) PostToken

func (a *AccessTokensApiService) PostToken(ctx context.Context, tokenBody TokenBody) (Token, *http.Response, error)

AccessTokensApiService Create a new token.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param tokenBody Create a new access token.

@return Token

func (*AccessTokensApiService) ResetToken

func (a *AccessTokensApiService) ResetToken(ctx context.Context, tokenId string, localVarOptionals *AccessTokensApiResetTokenOpts) (Token, *http.Response, error)

type ApprovalRequest

type ApprovalRequest struct {
	// The unique resource id.
	Id      string `json:"_id,omitempty"`
	Version int32  `json:"_version,omitempty"`
	// A unix epoch time in milliseconds specifying the date the approval request was requested
	CreationDate int32 `json:"creationDate,omitempty"`
	// The id of the member that requested the change
	RequestorId  string                       `json:"requestorId,omitempty"`
	ReviewStatus *ApprovalRequestReviewStatus `json:"reviewStatus,omitempty"`
	// | Name      | Description | | ---------:| ----------- | | pending   | the approval request has not been applied yet | | completed | the approval request has been applied successfully | | scheduled | the approval request for a scheduled change has been applied successfully | | failed    | the approval request has been applied but the changes were not applied successfully |
	Status string `json:"status,omitempty"`
	// The id of the member that applied the approval request
	AppliedByMemberID string `json:"appliedByMemberID,omitempty"`
	// A unix epoch time in milliseconds specifying the date the approval request was applied
	AppliedDate     int32                     `json:"appliedDate,omitempty"`
	AllReviews      []ApprovalRequestReview   `json:"allReviews,omitempty"`
	NotifyMemberIds []string                  `json:"notifyMemberIds,omitempty"`
	Instructions    *SemanticPatchInstruction `json:"instructions,omitempty"`
	// Timestamp for when instructions will be executed
	ExecutionDate int64 `json:"executionDate,omitempty"`
	// ID of scheduled change to edit or delete
	OperatingOnId string `json:"operatingOnId,omitempty"`
}

type ApprovalRequestApplyConfigBody

type ApprovalRequestApplyConfigBody struct {
	// comment will be included in audit log item for change.
	Comment string `json:"comment,omitempty"`
}

type ApprovalRequestConfigBody

type ApprovalRequestConfigBody struct {
	// A name that describes the changes you would like to apply to a feature flag configuration
	Description     string                    `json:"description"`
	Instructions    *SemanticPatchInstruction `json:"instructions"`
	NotifyMemberIds []string                  `json:"notifyMemberIds"`
	// comment will be included in audit log item for change.
	Comment string `json:"comment,omitempty"`
	// Timestamp for when instructions will be executed
	ExecutionDate int64 `json:"executionDate,omitempty"`
	// ID of scheduled change to edit or delete
	OperatingOnId string `json:"operatingOnId,omitempty"`
}

type ApprovalRequestReview

type ApprovalRequestReview struct {
	// A unix epoch time in milliseconds specifying the date the approval request was reviewed
	CreationDate int32                        `json:"creationDate,omitempty"`
	Kind         *ApprovalRequestReviewStatus `json:"kind,omitempty"`
	// The unique resource id.
	MemberId string `json:"memberId,omitempty"`
	// The unique resource id.
	Id string `json:"_id,omitempty"`
}

type ApprovalRequestReviewConfigBody

type ApprovalRequestReviewConfigBody struct {
	// One of approve, decline, or comment.
	Kind string `json:"kind"`
	// comment will be included in audit log item for change.
	Comment string `json:"comment,omitempty"`
}

type ApprovalRequestReviewStatus

type ApprovalRequestReviewStatus string

ApprovalRequestReviewStatus : | Name | Description | | --------:| ----------- | | pending | the approval request has not been reviewed yet | | approved | the approval request has been approved and can now be applied | | declined | the approval request has been declined and cannot be applied |

const (
	PENDING_ApprovalRequestReviewStatus  ApprovalRequestReviewStatus = "pending"
	APPROVED_ApprovalRequestReviewStatus ApprovalRequestReviewStatus = "approved"
	DECLINED_ApprovalRequestReviewStatus ApprovalRequestReviewStatus = "declined"
)

List of ApprovalRequestReviewStatus

type ApprovalRequests

type ApprovalRequests struct {
	Links *Links            `json:"_links,omitempty"`
	Items []ApprovalRequest `json:"items,omitempty"`
}

type AuditLogApiGetAuditLogEntriesOpts

type AuditLogApiGetAuditLogEntriesOpts struct {
	Before optional.Int64
	After  optional.Int64
	Q      optional.String
	Limit  optional.Float32
	Spec   optional.String
}

type AuditLogApiService

type AuditLogApiService service

func (*AuditLogApiService) GetAuditLogEntries

func (a *AuditLogApiService) GetAuditLogEntries(ctx context.Context, localVarOptionals *AuditLogApiGetAuditLogEntriesOpts) (AuditLogEntries, *http.Response, error)

func (*AuditLogApiService) GetAuditLogEntry

func (a *AuditLogApiService) GetAuditLogEntry(ctx context.Context, resourceId string) (AuditLogEntry, *http.Response, error)

AuditLogApiService Use this endpoint to fetch a single audit log entry by its resouce ID.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param resourceId The resource ID.

@return AuditLogEntry

type AuditLogEntries

type AuditLogEntries struct {
	Links *Links          `json:"_links,omitempty"`
	Items []AuditLogEntry `json:"items,omitempty"`
}

type AuditLogEntry

type AuditLogEntry struct {
	Links *Links `json:"_links,omitempty"`
	// The unique resource id.
	Id               string               `json:"_id,omitempty"`
	Date             int64                `json:"date,omitempty"`
	Kind             string               `json:"kind,omitempty"`
	Name             string               `json:"name,omitempty"`
	Description      string               `json:"description,omitempty"`
	ShortDescription string               `json:"shortDescription,omitempty"`
	Comment          string               `json:"comment,omitempty"`
	Member           *Member              `json:"member,omitempty"`
	TitleVerb        string               `json:"titleVerb,omitempty"`
	Title            string               `json:"title,omitempty"`
	Target           *AuditLogEntryTarget `json:"target,omitempty"`
}

type AuditLogEntryTarget

type AuditLogEntryTarget struct {
	Links     *Links   `json:"_links,omitempty"`
	Name      string   `json:"name,omitempty"`
	Resources []string `json:"resources,omitempty"`
}

type BasicAuth

type BasicAuth struct {
	UserName string `json:"userName,omitempty"`
	Password string `json:"password,omitempty"`
}

BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth

type BigSegmentTargetChanges

type BigSegmentTargetChanges struct {
	// Users to add to this list of targets
	Add []string `json:"add,omitempty"`
	// Users to remove from this list of targets
	Remove []string `json:"remove,omitempty"`
}

type BigSegmentTargetsBody

type BigSegmentTargetsBody struct {
	Included *BigSegmentTargetChanges `json:"included,omitempty"`
	Excluded *BigSegmentTargetChanges `json:"excluded,omitempty"`
}

type Clause

type Clause struct {
	Id        string        `json:"_id,omitempty"`
	Attribute string        `json:"attribute,omitempty"`
	Op        string        `json:"op,omitempty"`
	Values    []interface{} `json:"values,omitempty"`
	Negate    bool          `json:"negate,omitempty"`
}

type ClientSideAvailability

type ClientSideAvailability struct {
	// When set to true, this flag will be available to SDKs using the client-side id.
	UsingEnvironmentId bool `json:"usingEnvironmentId,omitempty"`
	// When set to true, this flag will be available to SDKS using a mobile key.
	UsingMobileKey bool `json:"usingMobileKey,omitempty"`
}

type Configuration

type Configuration struct {
	BasePath      string            `json:"basePath,omitempty"`
	Host          string            `json:"host,omitempty"`
	Scheme        string            `json:"scheme,omitempty"`
	DefaultHeader map[string]string `json:"defaultHeader,omitempty"`
	UserAgent     string            `json:"userAgent,omitempty"`
	HTTPClient    *http.Client
}

func NewConfiguration

func NewConfiguration() *Configuration

func (*Configuration) AddDefaultHeader

func (c *Configuration) AddDefaultHeader(key string, value string)

type CopyActions

type CopyActions string
const (
	UPDATE_ON_CopyActions            CopyActions = "updateOn"
	UPDATE_PREREQUISITES_CopyActions CopyActions = "updatePrerequisites"
	UPDATE_TARGETS_CopyActions       CopyActions = "updateTargets"
	UPDATE_RULES_CopyActions         CopyActions = "updateRules"
	UPDATE_FALLTHROUGH_CopyActions   CopyActions = "updateFallthrough"
	UPDATE_OFF_VARIATION_CopyActions CopyActions = "updateOffVariation"
)

List of CopyActions

type CustomProperty

type CustomProperty struct {
	// The name of the property.
	Name string `json:"name"`
	// Values for this property.
	Value []string `json:"value,omitempty"`
}

A name and value describing a custom property.

type CustomPropertyValues

type CustomPropertyValues struct {
}

Values for this property.

type CustomRole

type CustomRole struct {
	Links *Links `json:"_links,omitempty"`
	// Name of the custom role.
	Name string `json:"name,omitempty"`
	// The 20-hexdigit id or the key for a custom role.
	Key string `json:"key,omitempty"`
	// Description of the custom role.
	Description string `json:"description,omitempty"`
	// The unique resource id.
	Id     string   `json:"_id,omitempty"`
	Policy []Policy `json:"policy,omitempty"`
}

type CustomRoleBody

type CustomRoleBody struct {
	// Name of the custom role.
	Name string `json:"name"`
	// Description of the custom role.
	Description string `json:"description,omitempty"`
	// The 20-hexdigit id or the key for a custom role.
	Key    string   `json:"key"`
	Policy []Policy `json:"policy"`
}

type CustomRoles

type CustomRoles struct {
	Links *Links       `json:"_links,omitempty"`
	Items []CustomRole `json:"items,omitempty"`
}

type CustomRolesApiService

type CustomRolesApiService service

func (*CustomRolesApiService) DeleteCustomRole

func (a *CustomRolesApiService) DeleteCustomRole(ctx context.Context, customRoleKey string) (*http.Response, error)

CustomRolesApiService Delete a custom role by key.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param customRoleKey The custom role key.

func (*CustomRolesApiService) GetCustomRole

func (a *CustomRolesApiService) GetCustomRole(ctx context.Context, customRoleKey string) (CustomRole, *http.Response, error)

CustomRolesApiService Get one custom role by key.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param customRoleKey The custom role key.

@return CustomRole

func (*CustomRolesApiService) GetCustomRoles

func (a *CustomRolesApiService) GetCustomRoles(ctx context.Context) (CustomRoles, *http.Response, error)

CustomRolesApiService Return a complete list of custom roles.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

@return CustomRoles

func (*CustomRolesApiService) PatchCustomRole

func (a *CustomRolesApiService) PatchCustomRole(ctx context.Context, customRoleKey string, patchDelta []PatchOperation) (CustomRole, *http.Response, error)

CustomRolesApiService Modify a custom role by key.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param customRoleKey The custom role key.
  • @param patchDelta Requires a JSON Patch representation of the desired changes to the project. 'http://jsonpatch.com/'

@return CustomRole

func (*CustomRolesApiService) PostCustomRole

func (a *CustomRolesApiService) PostCustomRole(ctx context.Context, customRoleBody CustomRoleBody) (CustomRole, *http.Response, error)

CustomRolesApiService Create a new custom role.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param customRoleBody New role or roles to create.

@return CustomRole

type CustomerMetricsApiService

type CustomerMetricsApiService service

func (*CustomerMetricsApiService) GetEvaluations

func (a *CustomerMetricsApiService) GetEvaluations(ctx context.Context, envId string, flagKey string) (StreamSdkVersion, *http.Response, error)

CustomerMetricsApiService Get events usage by event id and the feature flag key.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param envId The environment id for the flag evaluations in question.
  • @param flagKey The key of the flag we want metrics for.

@return StreamSdkVersion

func (*CustomerMetricsApiService) GetEvent

CustomerMetricsApiService Get events usage by event type.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param type_ The type of event we would like to track.

@return StreamSdkVersion

func (*CustomerMetricsApiService) GetEvents

CustomerMetricsApiService Get events usage endpoints.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

@return Events

func (*CustomerMetricsApiService) GetMAU

CustomerMetricsApiService Get monthly active user data.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

@return Mau

func (*CustomerMetricsApiService) GetMAUByCategory

CustomerMetricsApiService Get monthly active user data by category.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

@return MaUbyCategory

func (*CustomerMetricsApiService) GetStream

func (a *CustomerMetricsApiService) GetStream(ctx context.Context, source string) (Stream, *http.Response, error)

CustomerMetricsApiService Get a stream endpoint and return timeseries data.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param source The source of where the stream comes from.

@return Stream

func (*CustomerMetricsApiService) GetStreamBySDK

func (a *CustomerMetricsApiService) GetStreamBySDK(ctx context.Context, source string) (StreamBySdk, *http.Response, error)

CustomerMetricsApiService Get a stream timeseries data by source show sdk version metadata.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param source The source of where the stream comes from.

@return StreamBySdk

func (*CustomerMetricsApiService) GetStreamSDKVersion

func (a *CustomerMetricsApiService) GetStreamSDKVersion(ctx context.Context, source string) (StreamSdkVersion, *http.Response, error)

CustomerMetricsApiService Get a stream timeseries data by source and show all sdk version associated.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param source The source of where the stream comes from.

@return StreamSdkVersion

func (*CustomerMetricsApiService) GetStreams

CustomerMetricsApiService Returns a list of all streams.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

@return Streams

func (*CustomerMetricsApiService) GetUsage

CustomerMetricsApiService Returns of the usage endpoints available.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

@return Usage

type DataExportDestinationsApiService

type DataExportDestinationsApiService service

func (*DataExportDestinationsApiService) DeleteDestination

func (a *DataExportDestinationsApiService) DeleteDestination(ctx context.Context, projectKey string, environmentKey string, destinationId string) (*http.Response, error)

DataExportDestinationsApiService Get a single data export destination by ID

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectKey The project key, used to tie the flags together under one project so they can be managed together.
  • @param environmentKey The environment key, used to tie together flag configuration and users under one environment so they can be managed together.
  • @param destinationId The data export destination ID.

func (*DataExportDestinationsApiService) GetDestination

func (a *DataExportDestinationsApiService) GetDestination(ctx context.Context, projectKey string, environmentKey string, destinationId string) (Destination, *http.Response, error)

DataExportDestinationsApiService Get a single data export destination by ID

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectKey The project key, used to tie the flags together under one project so they can be managed together.
  • @param environmentKey The environment key, used to tie together flag configuration and users under one environment so they can be managed together.
  • @param destinationId The data export destination ID.

@return Destination

func (*DataExportDestinationsApiService) GetDestinations

DataExportDestinationsApiService Returns a list of all data export destinations.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

@return Destinations

func (*DataExportDestinationsApiService) PatchDestination

func (a *DataExportDestinationsApiService) PatchDestination(ctx context.Context, projectKey string, environmentKey string, destinationId string, patchOnly []PatchOperation) (Destination, *http.Response, error)

DataExportDestinationsApiService Perform a partial update to a data export destination.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectKey The project key, used to tie the flags together under one project so they can be managed together.
  • @param environmentKey The environment key, used to tie together flag configuration and users under one environment so they can be managed together.
  • @param destinationId The data export destination ID.
  • @param patchOnly Requires a JSON Patch representation of the desired changes to the project. 'http://jsonpatch.com/' Feature flag patches also support JSON Merge Patch format. 'https://tools.ietf.org/html/rfc7386' The addition of comments is also supported.

@return Destination

func (*DataExportDestinationsApiService) PostDestination

func (a *DataExportDestinationsApiService) PostDestination(ctx context.Context, projectKey string, environmentKey string, destinationBody DestinationBody) (Destination, *http.Response, error)

DataExportDestinationsApiService Create a new data export destination

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectKey The project key, used to tie the flags together under one project so they can be managed together.
  • @param environmentKey The environment key, used to tie together flag configuration and users under one environment so they can be managed together.
  • @param destinationBody Create a new data export destination.

@return Destination

type Defaults

type Defaults struct {
	// The index of the variation to be served when a flag's targeting is on (default variation).
	OnVariation int32 `json:"onVariation"`
	// The index of the variation to be served when a flag is off.
	OffVariation int32 `json:"offVariation"`
}

Default values to be used when a new environment is created.

type DependentFlag

type DependentFlag struct {
	Name  string              `json:"name,omitempty"`
	Key   string              `json:"key,omitempty"`
	Links *DependentFlagLinks `json:"_links,omitempty"`
	Site  *Site               `json:"_site,omitempty"`
}

type DependentFlagEnvironment

type DependentFlagEnvironment struct {
	Name  string                         `json:"name,omitempty"`
	Key   string                         `json:"key,omitempty"`
	Links *DependentFlagEnvironmentLinks `json:"_links,omitempty"`
	Site  *Site                          `json:"_site,omitempty"`
}
type DependentFlagEnvironmentLinks struct {
	Self     *Link `json:"self,omitempty"`
	FlagLink *Link `json:"flagLink,omitempty"`
}
type DependentFlagLinks struct {
	Self *Link `json:"self,omitempty"`
}

type DependentFlagsByEnvironment

type DependentFlagsByEnvironment struct {
	Items []DependentFlag      `json:"items,omitempty"`
	Links *DependentFlagsLinks `json:"_links,omitempty"`
	Site  *Site                `json:"_site,omitempty"`
}
type DependentFlagsLinks struct {
	Parent *Link `json:"parent,omitempty"`
	Self   *Link `json:"self,omitempty"`
}

type Destination

type Destination struct {
	Links *Links `json:"_links,omitempty"`
	// Unique destination ID.
	Id string `json:"_id,omitempty"`
	// The destination name
	Name string `json:"name,omitempty"`
	// Destination type (\"google-pubsub\", \"kinesis\", \"mparticle\", or \"segment\")
	Kind string `json:"kind,omitempty"`
	// destination-specific configuration.
	Config *interface{} `json:"config,omitempty"`
	// Whether the data export destination is on or not.
	On      bool  `json:"on,omitempty"`
	Version int32 `json:"version,omitempty"`
}

type DestinationAmazonKinesis

type DestinationAmazonKinesis struct {
	Region     string `json:"region,omitempty"`
	RoleArn    string `json:"roleArn,omitempty"`
	StreamName string `json:"streamName,omitempty"`
}

type DestinationBody

type DestinationBody struct {
	// A human-readable name for your data export destination.
	Name string `json:"name"`
	// The data export destination type. Available choices are kinesis, google-pubsub, mparticle, or segment.
	Kind string `json:"kind"`
	// destination-specific configuration.
	Config *interface{} `json:"config"`
	// Whether the data export destination is on or not.
	On bool `json:"on,omitempty"`
}

type DestinationGooglePubSub

type DestinationGooglePubSub struct {
	Project string `json:"project,omitempty"`
	Topic   string `json:"topic,omitempty"`
}

type DestinationMParticle

type DestinationMParticle struct {
	ApiKey       string `json:"apiKey,omitempty"`
	Secret       string `json:"secret,omitempty"`
	UserIdentity string `json:"userIdentity,omitempty"`
	Environment  string `json:"environment,omitempty"`
}

type DestinationSegment

type DestinationSegment struct {
	WriteKey string `json:"writeKey,omitempty"`
}

type Destinations

type Destinations struct {
	Links *Links        `json:"_links,omitempty"`
	Items []Destination `json:"items,omitempty"`
}

type Environment

type Environment struct {
	Links *Links `json:"_links,omitempty"`
	// The unique resource id.
	Id string `json:"_id,omitempty"`
	// The key for the environment.
	Key string `json:"key,omitempty"`
	// The name of the environment.
	Name string `json:"name,omitempty"`
	// The SDK key for backend LaunchDarkly SDKs.
	ApiKey string `json:"apiKey,omitempty"`
	// The SDK key for mobile LaunchDarkly SDKs.
	MobileKey string `json:"mobileKey,omitempty"`
	// The swatch color for the environment.
	Color string `json:"color,omitempty"`
	// The default TTL.
	DefaultTtl float32 `json:"defaultTtl,omitempty"`
	// Determines if this environment is in safe mode.
	SecureMode bool `json:"secureMode,omitempty"`
	// Set to true to send detailed event information for new flags.
	DefaultTrackEvents bool `json:"defaultTrackEvents,omitempty"`
	// An array of tags for this environment.
	Tags []string `json:"tags,omitempty"`
	// Determines if this environment requires comments for flag and segment changes.
	RequireComments bool `json:"requireComments,omitempty"`
	// Determines if this environment requires confirmation for flag and segment changes.
	ConfirmChanges   bool                         `json:"confirmChanges,omitempty"`
	ApprovalSettings *EnvironmentApprovalSettings `json:"approvalSettings,omitempty"`
}

type EnvironmentApprovalSettings

type EnvironmentApprovalSettings struct {
	// The approvals system used.
	ServiceKind string `json:"serviceKind,omitempty"`
	// Whether any changes to flags in this environment will require approval. You may only set required or requiredApprovalTags, not both.
	Required bool `json:"required,omitempty"`
	// Whether requesters can approve or decline their own request. They may always comment.
	CanReviewOwnRequest bool `json:"canReviewOwnRequest,omitempty"`
	// The number of approvals required before an approval request can be applied.
	MinNumApprovals int64 `json:"minNumApprovals,omitempty"`
	// Whether changes can be applied as long as minNumApprovals is met, regardless of if any reviewers have declined a request.
	CanApplyDeclinedChanges bool `json:"canApplyDeclinedChanges,omitempty"`
	// An array of tags used to specify which flags with those tags require approval. You may only set requiredApprovalTags or required, not both.
	RequiredApprovalTags []string `json:"requiredApprovalTags,omitempty"`
}

Approval settings for an environment. Only appears if the approvals feature is enabled.

type EnvironmentPost

type EnvironmentPost struct {
	// The name of the new environment.
	Name string `json:"name"`
	// A project-unique key for the new environment.
	Key string `json:"key"`
	// A color swatch (as an RGB hex value with no leading '#', e.g. C8C8C8).
	Color string `json:"color"`
	// The default TTL for the new environment.
	DefaultTtl float32 `json:"defaultTtl,omitempty"`
	// Determines whether the environment is in secure mode.
	SecureMode bool `json:"secureMode,omitempty"`
	// Set to true to send detailed event information for newly created flags.
	DefaultTrackEvents bool `json:"defaultTrackEvents,omitempty"`
	// An array of tags for this environment.
	Tags []string `json:"tags,omitempty"`
	// Determines if this environment requires comments for flag and segment changes.
	RequireComments bool `json:"requireComments,omitempty"`
	// Determines if this environment requires confirmation for flag and segment changes.
	ConfirmChanges bool `json:"confirmChanges,omitempty"`
}

type EnvironmentsApiResetEnvironmentMobileKeyOpts

type EnvironmentsApiResetEnvironmentMobileKeyOpts struct {
	Expiry optional.Int64
}

type EnvironmentsApiResetEnvironmentSDKKeyOpts

type EnvironmentsApiResetEnvironmentSDKKeyOpts struct {
	Expiry optional.Int64
}

type EnvironmentsApiService

type EnvironmentsApiService service

func (*EnvironmentsApiService) DeleteEnvironment

func (a *EnvironmentsApiService) DeleteEnvironment(ctx context.Context, projectKey string, environmentKey string) (*http.Response, error)

EnvironmentsApiService Delete an environment in a specific project.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectKey The project key, used to tie the flags together under one project so they can be managed together.
  • @param environmentKey The environment key, used to tie together flag configuration and users under one environment so they can be managed together.

func (*EnvironmentsApiService) GetEnvironment

func (a *EnvironmentsApiService) GetEnvironment(ctx context.Context, projectKey string, environmentKey string) (Environment, *http.Response, error)

EnvironmentsApiService Get an environment given a project and key.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectKey The project key, used to tie the flags together under one project so they can be managed together.
  • @param environmentKey The environment key, used to tie together flag configuration and users under one environment so they can be managed together.

@return Environment

func (*EnvironmentsApiService) PatchEnvironment

func (a *EnvironmentsApiService) PatchEnvironment(ctx context.Context, projectKey string, environmentKey string, patchDelta []PatchOperation) (Environment, *http.Response, error)

EnvironmentsApiService Modify an environment by ID. If you try to patch the environment by setting both required and requiredApprovalTags, it will result in an error. Users can specify either required approvals for all flags in an environment or those with specific tags, but not both. Only customers on an Enterprise plan can require approval for flag updates with either mechanism.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectKey The project key, used to tie the flags together under one project so they can be managed together.
  • @param environmentKey The environment key, used to tie together flag configuration and users under one environment so they can be managed together.
  • @param patchDelta Requires a JSON Patch representation of the desired changes to the project. 'http://jsonpatch.com/'

@return Environment

func (*EnvironmentsApiService) PostEnvironment

func (a *EnvironmentsApiService) PostEnvironment(ctx context.Context, projectKey string, environmentBody EnvironmentPost) (Environment, *http.Response, error)

EnvironmentsApiService Create a new environment in a specified project with a given name, key, and swatch color.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectKey The project key, used to tie the flags together under one project so they can be managed together.
  • @param environmentBody New environment.

@return Environment

func (*EnvironmentsApiService) ResetEnvironmentMobileKey

func (a *EnvironmentsApiService) ResetEnvironmentMobileKey(ctx context.Context, projectKey string, environmentKey string, localVarOptionals *EnvironmentsApiResetEnvironmentMobileKeyOpts) (Environment, *http.Response, error)

func (*EnvironmentsApiService) ResetEnvironmentSDKKey

func (a *EnvironmentsApiService) ResetEnvironmentSDKKey(ctx context.Context, projectKey string, environmentKey string, localVarOptionals *EnvironmentsApiResetEnvironmentSDKKeyOpts) (Environment, *http.Response, error)

type EvaluationUsageError

type EvaluationUsageError struct {
	Code    string `json:"code,omitempty"`
	Message string `json:"message,omitempty"`
}

type Events

type Events struct {
	Links *UsageLinks `json:"links,omitempty"`
}

type FeatureFlag

type FeatureFlag struct {
	Key string `json:"key,omitempty"`
	// Name of the feature flag.
	Name string `json:"name,omitempty"`
	// Description of the feature flag.
	Description string `json:"description,omitempty"`
	// Whether the feature flag is a boolean flag or multivariate.
	Kind string `json:"kind,omitempty"`
	// A unix epoch time in milliseconds specifying the creation time of this flag.
	CreationDate     int64 `json:"creationDate,omitempty"`
	IncludeInSnippet bool  `json:"includeInSnippet,omitempty"`
	// Whether or not this flag is temporary.
	Temporary bool `json:"temporary,omitempty"`
	// The ID of the member that should maintain this flag.
	MaintainerId string `json:"maintainerId,omitempty"`
	// An array of tags for this feature flag.
	Tags []string `json:"tags,omitempty"`
	// The variations for this feature flag.
	Variations []Variation `json:"variations,omitempty"`
	// An array goals from all environments associated with this feature flag
	GoalIds []string `json:"goalIds,omitempty"`
	Version int32    `json:"_version,omitempty"`
	// A mapping of keys to CustomProperty entries.
	CustomProperties map[string]CustomProperty    `json:"customProperties,omitempty"`
	Links            *Links                       `json:"_links,omitempty"`
	Maintainer       *Member                      `json:"_maintainer,omitempty"`
	Environments     map[string]FeatureFlagConfig `json:"environments,omitempty"`
	// A unix epoch time in milliseconds specifying the archived time of this flag.
	ArchivedDate int64 `json:"archivedDate,omitempty"`
	// Whether or not this flag is archived.
	Archived               bool                    `json:"archived,omitempty"`
	ClientSideAvailability *ClientSideAvailability `json:"clientSideAvailability,omitempty"`
	Defaults               *Defaults               `json:"defaults,omitempty"`
}

type FeatureFlagApprovalRequest

type FeatureFlagApprovalRequest struct {
	// The unique resource id.
	Id      string `json:"_id,omitempty"`
	Version int32  `json:"_version,omitempty"`
	// A unix epoch time in milliseconds specifying the date the approval request was requested
	CreationDate int32 `json:"creationDate,omitempty"`
	// The id of the member that requested the change
	RequestorId  string                                  `json:"requestorId,omitempty"`
	ReviewStatus *FeatureFlagApprovalRequestReviewStatus `json:"reviewStatus,omitempty"`
	// | Name     | Description | | --------:| ----------- | | pending  | the feature flag approval request has not been applied yet | | completed| the feature flag approval request has been applied successfully | | failed   | the feature flag approval request has been applied but the changes were not applied successfully |
	Status string `json:"status,omitempty"`
	// The id of the member that applied the approval request
	AppliedByMemberID string `json:"appliedByMemberID,omitempty"`
	// A unix epoch time in milliseconds specifying the date the approval request was applied
	AppliedDate     int32                              `json:"appliedDate,omitempty"`
	AllReviews      []FeatureFlagApprovalRequestReview `json:"allReviews,omitempty"`
	NotifyMemberIds []string                           `json:"notifyMemberIds,omitempty"`
	Instructions    *SemanticPatchInstruction          `json:"instructions,omitempty"`
}

type FeatureFlagApprovalRequestApplyConfigBody

type FeatureFlagApprovalRequestApplyConfigBody struct {
	// comment will be included in audit log item for change.
	Comment string `json:"comment,omitempty"`
}

type FeatureFlagApprovalRequestConfigBody

type FeatureFlagApprovalRequestConfigBody struct {
	// A name that describes the changes you would like to apply to a feature flag configuration
	Description     string                    `json:"description"`
	Instructions    *SemanticPatchInstruction `json:"instructions"`
	NotifyMemberIds []string                  `json:"notifyMemberIds"`
	// comment will be included in audit log item for change.
	Comment string `json:"comment,omitempty"`
}

type FeatureFlagApprovalRequestReview

type FeatureFlagApprovalRequestReview struct {
	// A unix epoch time in milliseconds specifying the date the approval request was reviewed
	CreationDate int32                                   `json:"creationDate,omitempty"`
	Kind         *FeatureFlagApprovalRequestReviewStatus `json:"kind,omitempty"`
	// The unique resource id.
	MemberId string `json:"memberId,omitempty"`
	// The unique resource id.
	Id string `json:"_id,omitempty"`
}

type FeatureFlagApprovalRequestReviewConfigBody

type FeatureFlagApprovalRequestReviewConfigBody struct {
	// One of approve, decline, or comment.
	Kind string `json:"kind"`
	// comment will be included in audit log item for change.
	Comment string `json:"comment,omitempty"`
}

type FeatureFlagApprovalRequestReviewStatus

type FeatureFlagApprovalRequestReviewStatus string

FeatureFlagApprovalRequestReviewStatus : | Name | Description | | --------:| ----------- | | pending | the feature flag approval request has not been reviewed yet | | approved | the feature flag approval request has been approved and can now be applied | | declined | the feature flag approval request has been declined and cannot be applied |

const (
	PENDING_FeatureFlagApprovalRequestReviewStatus  FeatureFlagApprovalRequestReviewStatus = "pending"
	APPROVED_FeatureFlagApprovalRequestReviewStatus FeatureFlagApprovalRequestReviewStatus = "approved"
	DECLINED_FeatureFlagApprovalRequestReviewStatus FeatureFlagApprovalRequestReviewStatus = "declined"
)

List of FeatureFlagApprovalRequestReviewStatus

type FeatureFlagApprovalRequests

type FeatureFlagApprovalRequests struct {
	Links *Links                       `json:"_links,omitempty"`
	Items []FeatureFlagApprovalRequest `json:"items,omitempty"`
}

type FeatureFlagBody

type FeatureFlagBody struct {
	// A human-friendly name for the feature flag. Remember to note if this flag is intended to be temporary or permanent.
	Name string `json:"name"`
	// A unique key that will be used to reference the flag in your code.
	Key string `json:"key"`
	// A description of the feature flag.
	Description string `json:"description,omitempty"`
	// An array of possible variations for the flag.
	Variations []Variation `json:"variations"`
	// Whether or not the flag is a temporary flag.
	Temporary bool `json:"temporary,omitempty"`
	// Tags for the feature flag.
	Tags []string `json:"tags,omitempty"`
	// Whether or not this flag should be made available to the client-side JavaScript SDK.
	IncludeInSnippet       bool                    `json:"includeInSnippet,omitempty"`
	ClientSideAvailability *ClientSideAvailability `json:"clientSideAvailability,omitempty"`
	Defaults               *Defaults               `json:"defaults,omitempty"`
}

type FeatureFlagChangeRequest

type FeatureFlagChangeRequest struct {
	// The unique resource id.
	Id      string `json:"_id,omitempty"`
	Version int32  `json:"_version,omitempty"`
	// A unix epoch time in milliseconds specifying the date the change request was requested
	CreationDate int32 `json:"creationDate,omitempty"`
	// The id of the member that requested the change
	RequestorId  string                                `json:"requestorId,omitempty"`
	ReviewStatus *FeatureFlagChangeRequestReviewStatus `json:"reviewStatus,omitempty"`
	// | Name     | Description | | --------:| ----------- | | pending  | the feature flag change request has not been applied yet | | completed| the feature flag change request has been applied successfully | | failed   | the feature flag change request has been applied but the changes were not applied successfully |
	Status string `json:"status,omitempty"`
	// The id of the member that applied the change request
	AppliedByMemberID string `json:"appliedByMemberID,omitempty"`
	// A unix epoch time in milliseconds specifying the date the change request was applied
	AppliedDate              int32                            `json:"appliedDate,omitempty"`
	CurrentReviewsByMemberId *FeatureFlagChangeRequestReview  `json:"currentReviewsByMemberId,omitempty"`
	AllReviews               []FeatureFlagChangeRequestReview `json:"allReviews,omitempty"`
	NotifyMemberIds          []string                         `json:"notifyMemberIds,omitempty"`
	Instructions             *SemanticPatchInstruction        `json:"instructions,omitempty"`
}

type FeatureFlagChangeRequestApplyConfigBody

type FeatureFlagChangeRequestApplyConfigBody struct {
	// comment will be included in audit log item for change.
	Comment string `json:"comment,omitempty"`
}

type FeatureFlagChangeRequestConfigBody

type FeatureFlagChangeRequestConfigBody struct {
	// A name that describes the changes you would like to apply to a feature flag configuration
	Description     string                    `json:"description"`
	Instructions    *SemanticPatchInstruction `json:"instructions"`
	NotifyMemberIds []string                  `json:"notifyMemberIds"`
	// comment will be included in audit log item for change.
	Comment string `json:"comment,omitempty"`
}

type FeatureFlagChangeRequestReview

type FeatureFlagChangeRequestReview struct {
	// A unix epoch time in milliseconds specifying the date the change request was reviewed
	CreationDate int32                                 `json:"creationDate,omitempty"`
	Kind         *FeatureFlagChangeRequestReviewStatus `json:"kind,omitempty"`
	// The unique resource id.
	MemberId string `json:"memberId,omitempty"`
	// The unique resource id.
	Id string `json:"_id,omitempty"`
}

type FeatureFlagChangeRequestReviewConfigBody

type FeatureFlagChangeRequestReviewConfigBody struct {
	// Either approve or decline change request
	Kind string `json:"kind"`
	// comment will be included in audit log item for change.
	Comment string `json:"comment,omitempty"`
}

type FeatureFlagChangeRequestReviewStatus

type FeatureFlagChangeRequestReviewStatus string

FeatureFlagChangeRequestReviewStatus : | Name | Description | | --------:| ----------- | | pending | the feature flag change request has not been reviewed yet | | approved | the feature flag change request has been approved and can now be applied | | declined | the feature flag change request has been declined and cannot be applied |

const (
	PENDING_FeatureFlagChangeRequestReviewStatus  FeatureFlagChangeRequestReviewStatus = "pending"
	APPROVED_FeatureFlagChangeRequestReviewStatus FeatureFlagChangeRequestReviewStatus = "approved"
	DECLINED_FeatureFlagChangeRequestReviewStatus FeatureFlagChangeRequestReviewStatus = "declined"
)

List of FeatureFlagChangeRequestReviewStatus

type FeatureFlagChangeRequests

type FeatureFlagChangeRequests struct {
	Links *Links                     `json:"_links,omitempty"`
	Items []FeatureFlagChangeRequest `json:"items,omitempty"`
}

type FeatureFlagConfig

type FeatureFlagConfig struct {
	On            bool              `json:"on,omitempty"`
	Archived      bool              `json:"archived,omitempty"`
	Salt          string            `json:"salt,omitempty"`
	Sel           string            `json:"sel,omitempty"`
	LastModified  int64             `json:"lastModified,omitempty"`
	Version       int32             `json:"version,omitempty"`
	Targets       []Target          `json:"targets,omitempty"`
	Rules         []Rule            `json:"rules,omitempty"`
	Fallthrough_  *ModelFallthrough `json:"fallthrough,omitempty"`
	OffVariation  int32             `json:"offVariation,omitempty"`
	Prerequisites []Prerequisite    `json:"prerequisites,omitempty"`
	// Set to true to send detailed event information for this flag.
	TrackEvents bool `json:"trackEvents,omitempty"`
	// Set to true to send detailed event information when targeting is enabled but no individual targeting rule is matched.
	TrackEventsFallthrough bool   `json:"trackEventsFallthrough,omitempty"`
	Site                   *Site  `json:"_site,omitempty"`
	EnvironmentName        string `json:"_environmentName,omitempty"`
}

type FeatureFlagCopyBody

type FeatureFlagCopyBody struct {
	Source *FeatureFlagCopyObject `json:"source,omitempty"`
	Target *FeatureFlagCopyObject `json:"target,omitempty"`
	// comment will be included in audit log item for change.
	Comment string `json:"comment,omitempty"`
	// Define the parts of the flag configuration that will be copied.
	IncludedActions []CopyActions `json:"includedActions,omitempty"`
	// Define the parts of the flag configuration that will not be copied.
	ExcludedActions []CopyActions `json:"excludedActions,omitempty"`
}

type FeatureFlagCopyObject

type FeatureFlagCopyObject struct {
	// The environment key to be used.
	Key string `json:"key"`
	// If the latest version of the flag matches provided version it will copy, otherwise it will return a conflict.
	CurrentVersion int32 `json:"currentVersion,omitempty"`
}

type FeatureFlagScheduledChange

type FeatureFlagScheduledChange struct {
	// A unix epoch time in milliseconds specifying the date the scheduled changes will be applied
	ExecutionDate int32                     `json:"executionDate,omitempty"`
	Version       int32                     `json:"_version,omitempty"`
	Id            string                    `json:"_id,omitempty"`
	Instructions  *SemanticPatchInstruction `json:"instructions,omitempty"`
}

type FeatureFlagScheduledChanges

type FeatureFlagScheduledChanges struct {
	Links *Links                       `json:"_links,omitempty"`
	Items []FeatureFlagScheduledChange `json:"items,omitempty"`
}

type FeatureFlagScheduledChangesConflicts

type FeatureFlagScheduledChangesConflicts struct {
	Instructions []FeatureFlagScheduledChangesConflictsInstructions `json:"instructions,omitempty"`
}

type FeatureFlagScheduledChangesConflictsInstructions

type FeatureFlagScheduledChangesConflictsInstructions struct {
	// The name of the modification you would like to perform on a resource.
	Kind      string                                `json:"kind,omitempty"`
	Conflicts []ScheduledChangesFeatureFlagConflict `json:"conflicts,omitempty"`
}

type FeatureFlagStatus

type FeatureFlagStatus struct {
	// | Name     | Description | | --------:| ----------- | | new      | the feature flag was created within the last 7 days, and has not been requested yet | | active   | the feature flag was requested by your servers or clients within the last 7 days | | inactive | the feature flag was created more than 7 days ago, and hasn't been requested by your servers or clients within the past 7 days | | launched | one variation of the feature flag has been rolled out to all your users for at least 7 days |
	Name          string                  `json:"name,omitempty"`
	LastRequested string                  `json:"lastRequested,omitempty"`
	Default_      *interface{}            `json:"default,omitempty"`
	Links         *FeatureFlagStatusLinks `json:"_links,omitempty"`
}

type FeatureFlagStatusAcrossEnvironments

type FeatureFlagStatusAcrossEnvironments struct {
	Links        *FeatureFlagStatusLinks                           `json:"_links,omitempty"`
	Key          string                                            `json:"key,omitempty"`
	Environments map[string]FeatureFlagStatusForQueriedEnvironment `json:"environments,omitempty"`
}

type FeatureFlagStatusForQueriedEnvironment

type FeatureFlagStatusForQueriedEnvironment struct {
	// | Name     | Description | | --------:| ----------- | | new      | the feature flag was created within the last 7 days, and has not been requested yet | | active   | the feature flag was requested by your servers or clients within the last 7 days | | inactive | the feature flag was created more than 7 days ago, and hasn't been requested by your servers or clients within the past 7 days | | launched | one variation of the feature flag has been rolled out to all your users for at least 7 days |
	Name          string       `json:"name,omitempty"`
	LastRequested string       `json:"lastRequested,omitempty"`
	Default_      *interface{} `json:"default,omitempty"`
}
type FeatureFlagStatusLinks struct {
	Parent *Link `json:"parent,omitempty"`
	Self   *Link `json:"self,omitempty"`
}

type FeatureFlagStatuses

type FeatureFlagStatuses struct {
	Links *FeatureFlagStatusLinks `json:"_links,omitempty"`
	Items []FeatureFlagStatus     `json:"items,omitempty"`
}

type FeatureFlags

type FeatureFlags struct {
	Links      *Links        `json:"_links,omitempty"`
	Items      []FeatureFlag `json:"items,omitempty"`
	TotalCount float32       `json:"totalCount,omitempty"`
}

type FeatureFlagsApiDeleteApprovalRequestOpts

type FeatureFlagsApiDeleteApprovalRequestOpts struct {
	ApprovalRequestConfigBody optional.Interface
}

type FeatureFlagsApiGetFeatureFlagOpts

type FeatureFlagsApiGetFeatureFlagOpts struct {
	Env optional.Interface
}

type FeatureFlagsApiGetFeatureFlagsOpts

type FeatureFlagsApiGetFeatureFlagsOpts struct {
	Env      optional.Interface
	Summary  optional.Bool
	Archived optional.Bool
	Limit    optional.Float32
	Offset   optional.Float32
	Filter   optional.String
	Sort     optional.String
	Tag      optional.String
}

type FeatureFlagsApiPostApprovalRequestOpts

type FeatureFlagsApiPostApprovalRequestOpts struct {
	ApprovalRequestConfigBody optional.Interface
}

type FeatureFlagsApiPostFeatureFlagOpts

type FeatureFlagsApiPostFeatureFlagOpts struct {
	Clone optional.String
}

type FeatureFlagsApiService

type FeatureFlagsApiService service

func (*FeatureFlagsApiService) CopyFeatureFlag

func (a *FeatureFlagsApiService) CopyFeatureFlag(ctx context.Context, projectKey string, featureFlagKey string, featureFlagCopyBody FeatureFlagCopyBody) (FeatureFlag, *http.Response, error)

FeatureFlagsApiService Copies the feature flag configuration from one environment to the same feature flag in another environment.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectKey The project key, used to tie the flags together under one project so they can be managed together.
  • @param featureFlagKey The feature flag's key. The key identifies the flag in your code.
  • @param featureFlagCopyBody Copy feature flag configurations between environments.

@return FeatureFlag

func (*FeatureFlagsApiService) DeleteApprovalRequest

func (a *FeatureFlagsApiService) DeleteApprovalRequest(ctx context.Context, projectKey string, environmentKey string, featureFlagKey string, approvalRequestId string, localVarOptionals *FeatureFlagsApiDeleteApprovalRequestOpts) (*http.Response, error)

func (*FeatureFlagsApiService) DeleteFeatureFlag

func (a *FeatureFlagsApiService) DeleteFeatureFlag(ctx context.Context, projectKey string, featureFlagKey string) (*http.Response, error)

FeatureFlagsApiService Delete a feature flag in all environments. Be careful-- only delete feature flags that are no longer being used by your application.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectKey The project key, used to tie the flags together under one project so they can be managed together.
  • @param featureFlagKey The feature flag's key. The key identifies the flag in your code.

func (*FeatureFlagsApiService) DeleteFlagConfigScheduledChanges

func (a *FeatureFlagsApiService) DeleteFlagConfigScheduledChanges(ctx context.Context, projectKey string, featureFlagKey string, environmentKey string, scheduledChangeId string) (*http.Response, error)

FeatureFlagsApiService Delete a scheduled change on a feature flag in an environment.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectKey The project key, used to tie the flags together under one project so they can be managed together.
  • @param featureFlagKey The feature flag's key. The key identifies the flag in your code.
  • @param environmentKey The environment key, used to tie together flag configuration and users under one environment so they can be managed together.
  • @param scheduledChangeId The id of the scheduled change

func (*FeatureFlagsApiService) FlagsProjectKeyEnvironmentKeyFeatureFlagKeyDependentFlagsGet

func (a *FeatureFlagsApiService) FlagsProjectKeyEnvironmentKeyFeatureFlagKeyDependentFlagsGet(ctx context.Context, projectKey string, environmentKey string, featureFlagKey string) (DependentFlagsByEnvironment, *http.Response, error)

FeatureFlagsApiService Get dependent flags for the flag in the environment specified in path parameters

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectKey The project key, used to tie the flags together under one project so they can be managed together.
  • @param environmentKey The environment key, used to tie together flag configuration and users under one environment so they can be managed together.
  • @param featureFlagKey The feature flag's key. The key identifies the flag in your code.

@return DependentFlagsByEnvironment

func (*FeatureFlagsApiService) FlagsProjectKeyFeatureFlagKeyDependentFlagsGet

func (a *FeatureFlagsApiService) FlagsProjectKeyFeatureFlagKeyDependentFlagsGet(ctx context.Context, projectKey string, featureFlagKey string) (MultiEnvironmentDependentFlags, *http.Response, error)

FeatureFlagsApiService Get dependent flags across all environments for the flag specified in the path parameters

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectKey The project key, used to tie the flags together under one project so they can be managed together.
  • @param featureFlagKey The feature flag's key. The key identifies the flag in your code.

@return MultiEnvironmentDependentFlags

func (*FeatureFlagsApiService) GetApprovalRequest

func (a *FeatureFlagsApiService) GetApprovalRequest(ctx context.Context, projectKey string, featureFlagKey string, environmentKey string, approvalRequestId string) (ApprovalRequests, *http.Response, error)

FeatureFlagsApiService Get a single approval request for a feature flag config

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectKey The project key, used to tie the flags together under one project so they can be managed together.
  • @param featureFlagKey The feature flag's key. The key identifies the flag in your code.
  • @param environmentKey The environment key, used to tie together flag configuration and users under one environment so they can be managed together.
  • @param approvalRequestId The approval request ID

@return ApprovalRequests

func (*FeatureFlagsApiService) GetApprovalRequests

func (a *FeatureFlagsApiService) GetApprovalRequests(ctx context.Context, projectKey string, featureFlagKey string, environmentKey string) (ApprovalRequests, *http.Response, error)

FeatureFlagsApiService Get all approval requests for a feature flag config

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectKey The project key, used to tie the flags together under one project so they can be managed together.
  • @param featureFlagKey The feature flag's key. The key identifies the flag in your code.
  • @param environmentKey The environment key, used to tie together flag configuration and users under one environment so they can be managed together.

@return ApprovalRequests

func (*FeatureFlagsApiService) GetExpiringUserTargets

func (a *FeatureFlagsApiService) GetExpiringUserTargets(ctx context.Context, projectKey string, environmentKey string, featureFlagKey string) (UserTargetingExpirationForFlags, *http.Response, error)

FeatureFlagsApiService Get expiring user targets for feature flag

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectKey The project key, used to tie the flags together under one project so they can be managed together.
  • @param environmentKey The environment key, used to tie together flag configuration and users under one environment so they can be managed together.
  • @param featureFlagKey The feature flag's key. The key identifies the flag in your code.

@return UserTargetingExpirationForFlags

func (*FeatureFlagsApiService) GetFeatureFlag

func (a *FeatureFlagsApiService) GetFeatureFlag(ctx context.Context, projectKey string, featureFlagKey string, localVarOptionals *FeatureFlagsApiGetFeatureFlagOpts) (FeatureFlag, *http.Response, error)

func (*FeatureFlagsApiService) GetFeatureFlagStatus

func (a *FeatureFlagsApiService) GetFeatureFlagStatus(ctx context.Context, projectKey string, environmentKey string, featureFlagKey string) (FeatureFlagStatus, *http.Response, error)

FeatureFlagsApiService Get the status for a particular feature flag.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectKey The project key, used to tie the flags together under one project so they can be managed together.
  • @param environmentKey The environment key, used to tie together flag configuration and users under one environment so they can be managed together.
  • @param featureFlagKey The feature flag's key. The key identifies the flag in your code.

@return FeatureFlagStatus

func (*FeatureFlagsApiService) GetFeatureFlagStatusAcrossEnvironments

func (a *FeatureFlagsApiService) GetFeatureFlagStatusAcrossEnvironments(ctx context.Context, projectKey string, featureFlagKey string) (FeatureFlagStatusAcrossEnvironments, *http.Response, error)

FeatureFlagsApiService Get the status for a particular feature flag across environments

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectKey The project key, used to tie the flags together under one project so they can be managed together.
  • @param featureFlagKey The feature flag's key. The key identifies the flag in your code.

@return FeatureFlagStatusAcrossEnvironments

func (*FeatureFlagsApiService) GetFeatureFlagStatuses

func (a *FeatureFlagsApiService) GetFeatureFlagStatuses(ctx context.Context, projectKey string, environmentKey string) (FeatureFlagStatuses, *http.Response, error)

FeatureFlagsApiService Get a list of statuses for all feature flags. The status includes the last time the feature flag was requested, as well as the state of the flag.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectKey The project key, used to tie the flags together under one project so they can be managed together.
  • @param environmentKey The environment key, used to tie together flag configuration and users under one environment so they can be managed together.

@return FeatureFlagStatuses

func (*FeatureFlagsApiService) GetFeatureFlags

func (a *FeatureFlagsApiService) GetFeatureFlags(ctx context.Context, projectKey string, localVarOptionals *FeatureFlagsApiGetFeatureFlagsOpts) (FeatureFlags, *http.Response, error)

func (*FeatureFlagsApiService) GetFlagConfigScheduledChange

func (a *FeatureFlagsApiService) GetFlagConfigScheduledChange(ctx context.Context, projectKey string, featureFlagKey string, environmentKey string, scheduledChangeId string) (FeatureFlagScheduledChange, *http.Response, error)

FeatureFlagsApiService Get a scheduled change on a feature flag by id.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectKey The project key, used to tie the flags together under one project so they can be managed together.
  • @param featureFlagKey The feature flag's key. The key identifies the flag in your code.
  • @param environmentKey The environment key, used to tie together flag configuration and users under one environment so they can be managed together.
  • @param scheduledChangeId The id of the scheduled change

@return FeatureFlagScheduledChange

func (*FeatureFlagsApiService) GetFlagConfigScheduledChanges

func (a *FeatureFlagsApiService) GetFlagConfigScheduledChanges(ctx context.Context, projectKey string, featureFlagKey string, environmentKey string) (FeatureFlagScheduledChanges, *http.Response, error)

FeatureFlagsApiService Get all scheduled workflows for a feature flag by key.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectKey The project key, used to tie the flags together under one project so they can be managed together.
  • @param featureFlagKey The feature flag's key. The key identifies the flag in your code.
  • @param environmentKey The environment key, used to tie together flag configuration and users under one environment so they can be managed together.

@return FeatureFlagScheduledChanges

func (*FeatureFlagsApiService) GetFlagConfigScheduledChangesConflicts

func (a *FeatureFlagsApiService) GetFlagConfigScheduledChangesConflicts(ctx context.Context, projectKey string, featureFlagKey string, environmentKey string, flagConfigScheduledChangesConflictsBody FlagConfigScheduledChangesConflictsBody) (FeatureFlagScheduledChangesConflicts, *http.Response, error)

FeatureFlagsApiService Lists conflicts between the given instructions and any existing scheduled changes for the feature flag. The actual HTTP verb should be REPORT, not POST.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectKey The project key, used to tie the flags together under one project so they can be managed together.
  • @param featureFlagKey The feature flag's key. The key identifies the flag in your code.
  • @param environmentKey The environment key, used to tie together flag configuration and users under one environment so they can be managed together.
  • @param flagConfigScheduledChangesConflictsBody Used to determine if a semantic patch will result in conflicts with scheduled changes on a feature flag.

@return FeatureFlagScheduledChangesConflicts

func (*FeatureFlagsApiService) PatchExpiringUserTargets

func (a *FeatureFlagsApiService) PatchExpiringUserTargets(ctx context.Context, projectKey string, environmentKey string, featureFlagKey string, semanticPatchWithComment interface{}) (UserTargetingExpirationForFlags, *http.Response, error)

FeatureFlagsApiService Update, add, or delete expiring user targets on feature flag

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectKey The project key, used to tie the flags together under one project so they can be managed together.
  • @param environmentKey The environment key, used to tie together flag configuration and users under one environment so they can be managed together.
  • @param featureFlagKey The feature flag's key. The key identifies the flag in your code.
  • @param semanticPatchWithComment Requires a Semantic Patch representation of the desired changes to the resource. 'https://apidocs.launchdarkly.com/reference#updates-via-semantic-patches'. The addition of comments is also supported.

@return UserTargetingExpirationForFlags

func (*FeatureFlagsApiService) PatchFeatureFlag

func (a *FeatureFlagsApiService) PatchFeatureFlag(ctx context.Context, projectKey string, featureFlagKey string, patchComment PatchComment) (FeatureFlag, *http.Response, error)

FeatureFlagsApiService Perform a partial update to a feature.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectKey The project key, used to tie the flags together under one project so they can be managed together.
  • @param featureFlagKey The feature flag's key. The key identifies the flag in your code.
  • @param patchComment Requires a JSON Patch representation of the desired changes to the project, and an optional comment. 'http://jsonpatch.com/' Feature flag patches also support JSON Merge Patch format. 'https://tools.ietf.org/html/rfc7386' The addition of comments is also supported.

@return FeatureFlag

func (*FeatureFlagsApiService) PatchFlagConfigScheduledChange

func (a *FeatureFlagsApiService) PatchFlagConfigScheduledChange(ctx context.Context, projectKey string, featureFlagKey string, flagConfigScheduledChangesPatchBody FlagConfigScheduledChangesPatchBody, environmentKey string, scheduledChangeId string) (FeatureFlagScheduledChange, *http.Response, error)

FeatureFlagsApiService Updates an existing scheduled-change on a feature flag in an environment.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectKey The project key, used to tie the flags together under one project so they can be managed together.
  • @param featureFlagKey The feature flag's key. The key identifies the flag in your code.
  • @param flagConfigScheduledChangesPatchBody Update scheduled changes on a feature flag.
  • @param environmentKey The environment key, used to tie together flag configuration and users under one environment so they can be managed together.
  • @param scheduledChangeId The id of the scheduled change

@return FeatureFlagScheduledChange

func (*FeatureFlagsApiService) PostApplyApprovalRequest

func (a *FeatureFlagsApiService) PostApplyApprovalRequest(ctx context.Context, projectKey string, featureFlagKey string, environmentKey string, approvalRequestId string, approvalRequestApplyConfigBody ApprovalRequestApplyConfigBody) (ApprovalRequests, *http.Response, error)

FeatureFlagsApiService Apply approval request for a feature flag config

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectKey The project key, used to tie the flags together under one project so they can be managed together.
  • @param featureFlagKey The feature flag's key. The key identifies the flag in your code.
  • @param environmentKey The environment key, used to tie together flag configuration and users under one environment so they can be managed together.
  • @param approvalRequestId The approval request ID
  • @param approvalRequestApplyConfigBody Apply an approval request

@return ApprovalRequests

func (*FeatureFlagsApiService) PostApprovalRequest

func (a *FeatureFlagsApiService) PostApprovalRequest(ctx context.Context, projectKey string, featureFlagKey string, environmentKey string, approvalRequestId string, localVarOptionals *FeatureFlagsApiPostApprovalRequestOpts) (ApprovalRequest, *http.Response, error)

func (*FeatureFlagsApiService) PostFeatureFlag

func (a *FeatureFlagsApiService) PostFeatureFlag(ctx context.Context, projectKey string, featureFlagBody FeatureFlagBody, localVarOptionals *FeatureFlagsApiPostFeatureFlagOpts) (FeatureFlag, *http.Response, error)

func (*FeatureFlagsApiService) PostFlagConfigScheduledChanges

func (a *FeatureFlagsApiService) PostFlagConfigScheduledChanges(ctx context.Context, projectKey string, flagConfigScheduledChangesPostBody FlagConfigScheduledChangesPostBody, featureFlagKey string, environmentKey string) (FeatureFlagScheduledChange, *http.Response, error)

FeatureFlagsApiService Creates a new scheduled change for a feature flag.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectKey The project key, used to tie the flags together under one project so they can be managed together.
  • @param flagConfigScheduledChangesPostBody Create scheduled changes on a feature flag.
  • @param featureFlagKey The feature flag's key. The key identifies the flag in your code.
  • @param environmentKey The environment key, used to tie together flag configuration and users under one environment so they can be managed together.

@return FeatureFlagScheduledChange

func (*FeatureFlagsApiService) PostReviewApprovalRequest

func (a *FeatureFlagsApiService) PostReviewApprovalRequest(ctx context.Context, projectKey string, featureFlagKey string, environmentKey string, approvalRequestId string, approvalRequestReviewConfigBody ApprovalRequestReviewConfigBody) (ApprovalRequests, *http.Response, error)

FeatureFlagsApiService Review approval request for a feature flag config

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectKey The project key, used to tie the flags together under one project so they can be managed together.
  • @param featureFlagKey The feature flag's key. The key identifies the flag in your code.
  • @param environmentKey The environment key, used to tie together flag configuration and users under one environment so they can be managed together.
  • @param approvalRequestId The approval request ID
  • @param approvalRequestReviewConfigBody Review an approval request

@return ApprovalRequests

type FlagConfigScheduledChangesConflictsBody

type FlagConfigScheduledChangesConflictsBody struct {
	// A unix epoch time in milliseconds specifying the date the scheduled changes will be applied
	ExecutionDate int32                     `json:"executionDate,omitempty"`
	Instructions  *SemanticPatchInstruction `json:"instructions,omitempty"`
}

type FlagConfigScheduledChangesPatchBody

type FlagConfigScheduledChangesPatchBody struct {
	// Used to describe the scheduled changes.
	Comment      string                    `json:"comment,omitempty"`
	Instructions *SemanticPatchInstruction `json:"instructions,omitempty"`
}

type FlagConfigScheduledChangesPostBody

type FlagConfigScheduledChangesPostBody struct {
	// Used to describe the scheduled changes.
	Comment string `json:"comment,omitempty"`
	// A unix epoch time in milliseconds specifying the date the scheduled changes will be applied
	ExecutionDate int32                     `json:"executionDate,omitempty"`
	Instructions  *SemanticPatchInstruction `json:"instructions,omitempty"`
}

type FlagListItem

type FlagListItem struct {
	Name  string `json:"name,omitempty"`
	Key   string `json:"key,omitempty"`
	Links *Links `json:"_links,omitempty"`
	Site  *Site  `json:"_site,omitempty"`
}

type GenericSwaggerError

type GenericSwaggerError struct {
	// contains filtered or unexported fields
}

GenericSwaggerError Provides access to the body, error and model on returned errors.

func (GenericSwaggerError) Body

func (e GenericSwaggerError) Body() []byte

Body returns the raw bytes of the response

func (GenericSwaggerError) Error

func (e GenericSwaggerError) Error() string

Error returns non-empty string if there was an error.

func (GenericSwaggerError) Model

func (e GenericSwaggerError) Model() interface{}

Model returns the unpacked model of the error

type HierarchicalLinks struct {
	Parent *Link `json:"parent,omitempty"`
	Self   *Link `json:"self,omitempty"`
}

type Id

type Id struct {
}

The unique resource id.

type Integration

type Integration struct {
	Links *DependentFlagLinks       `json:"_links,omitempty"`
	Items []IntegrationSubscription `json:"items,omitempty"`
}
type IntegrationLinks struct {
	Self *Link `json:"self,omitempty"`
}

type IntegrationSubscription

type IntegrationSubscription struct {
	Links *HierarchicalLinks `json:"_links,omitempty"`
	// The unique resource id.
	Id string `json:"_id,omitempty"`
	// The type of integration associated with this configuration.
	Kind string `json:"kind,omitempty"`
	// The user-defined name associated with this configuration.
	Name string `json:"name,omitempty"`
	// A key-value mapping of configuration fields.
	Config     *interface{} `json:"config,omitempty"`
	Statements []Statement  `json:"statements,omitempty"`
	// Whether or not the integration is currently active.
	On bool `json:"on,omitempty"`
	// An array of tags for this integration configuration.
	Tags   []string                       `json:"tags,omitempty"`
	Status *IntegrationSubscriptionStatus `json:"_status,omitempty"`
}

type IntegrationSubscriptionStatus

type IntegrationSubscriptionStatus struct {
	SuccessCount int32 `json:"successCount,omitempty"`
	// A unix epoch time in milliseconds specifying the last time this integration was successfully used.
	LastSuccess int64 `json:"lastSuccess,omitempty"`
	ErrorCount  int32 `json:"errorCount,omitempty"`
}

type Integrations

type Integrations struct {
	// A mapping of integration types to their respective API endpoints.
	Links *interface{}              `json:"_links,omitempty"`
	Items []IntegrationSubscription `json:"items,omitempty"`
}

type IntegrationsApiService

type IntegrationsApiService service

func (*IntegrationsApiService) DeleteIntegrationSubscription

func (a *IntegrationsApiService) DeleteIntegrationSubscription(ctx context.Context, integrationKey string, integrationId string) (*http.Response, error)

IntegrationsApiService Delete an integration subscription by ID.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param integrationKey The key used to specify the integration kind.
  • @param integrationId The integration ID.

func (*IntegrationsApiService) GetIntegrationSubscription

func (a *IntegrationsApiService) GetIntegrationSubscription(ctx context.Context, integrationKey string, integrationId string) (IntegrationSubscription, *http.Response, error)

IntegrationsApiService Get a single integration subscription by ID.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param integrationKey The key used to specify the integration kind.
  • @param integrationId The integration ID.

@return IntegrationSubscription

func (*IntegrationsApiService) GetIntegrationSubscriptions

func (a *IntegrationsApiService) GetIntegrationSubscriptions(ctx context.Context, integrationKey string) (Integration, *http.Response, error)

IntegrationsApiService Get a list of all configured integrations of a given kind.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param integrationKey The key used to specify the integration kind.

@return Integration

func (*IntegrationsApiService) GetIntegrations

func (a *IntegrationsApiService) GetIntegrations(ctx context.Context) (Integrations, *http.Response, error)

IntegrationsApiService Get a list of all configured audit log event integrations associated with this account.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

@return Integrations

func (*IntegrationsApiService) PatchIntegrationSubscription

func (a *IntegrationsApiService) PatchIntegrationSubscription(ctx context.Context, integrationKey string, integrationId string, patchDelta []PatchOperation) (IntegrationSubscription, *http.Response, error)

IntegrationsApiService Modify an integration subscription by ID.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param integrationKey The key used to specify the integration kind.
  • @param integrationId The integration ID.
  • @param patchDelta Requires a JSON Patch representation of the desired changes to the project. 'http://jsonpatch.com/'

@return IntegrationSubscription

func (*IntegrationsApiService) PostIntegrationSubscription

func (a *IntegrationsApiService) PostIntegrationSubscription(ctx context.Context, integrationKey string, subscriptionBody SubscriptionBody) (IntegrationSubscription, *http.Response, error)

IntegrationsApiService Create a new integration subscription of a given kind.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param integrationKey The key used to specify the integration kind.
  • @param subscriptionBody Create a new integration subscription.

@return IntegrationSubscription

type Link struct {
	Href  string `json:"href,omitempty"`
	Type_ string `json:"type,omitempty"`
}
type Links struct {
	Self *Link `json:"self,omitempty"`
	Next *Link `json:"next,omitempty"`
}

type MaUbyCategory

type MaUbyCategory struct {
	Links    *StreamBySdkLinks   `json:"_links,omitempty"`
	Metadata []MauMetadata       `json:"metadata,omitempty"`
	Series   []StreamUsageSeries `json:"series,omitempty"`
}

type Mau

type Mau struct {
	Links    *UsageLinks                `json:"_links,omitempty"`
	Metadata []StreamBySdkLinksMetadata `json:"metadata,omitempty"`
	Series   []StreamUsageSeries        `json:"series,omitempty"`
}

type MauMetadata

type MauMetadata struct {
}

type Member

type Member struct {
	Links *Links `json:"_links,omitempty"`
	// The unique resource id.
	Id            string   `json:"_id,omitempty"`
	Role          *Role    `json:"role,omitempty"`
	Email         string   `json:"email,omitempty"`
	FirstName     string   `json:"firstName,omitempty"`
	LastName      string   `json:"lastName,omitempty"`
	Verified      bool     `json:"_verified,omitempty"`
	PendingInvite bool     `json:"_pendingInvite,omitempty"`
	IsBeta        bool     `json:"isBeta,omitempty"`
	CustomRoles   []string `json:"customRoles,omitempty"`
	// A unix epoch time in milliseconds specifying the last time this member was active in LaunchDarkly.
	LastSeen         int64                   `json:"_lastSeen,omitempty"`
	LastSeenMetadata *MemberLastSeenMetadata `json:"_lastSeenMetadata,omitempty"`
}

type MemberLastSeenMetadata

type MemberLastSeenMetadata struct {
	// If the last time this member accessed LaunchDarkly was using the REST API, this value will be set to the ID of the personal access token used.
	TokenId string `json:"tokenId,omitempty"`
}

type Members

type Members struct {
	Links      *Links   `json:"_links,omitempty"`
	Items      []Member `json:"items,omitempty"`
	TotalCount float32  `json:"totalCount,omitempty"`
}

type MembersBody

type MembersBody struct {
	Email       string      `json:"email"`
	FirstName   string      `json:"firstName,omitempty"`
	LastName    string      `json:"lastName,omitempty"`
	Role        *Role       `json:"role,omitempty"`
	CustomRoles []string    `json:"customRoles,omitempty"`
	InlineRole  []Statement `json:"inlineRole,omitempty"`
}

type ModelFallthrough

type ModelFallthrough struct {
	Variation int32    `json:"variation,omitempty"`
	Rollout   *Rollout `json:"rollout,omitempty"`
}

type MultiEnvironmentDependentFlag

type MultiEnvironmentDependentFlag struct {
	Name         string                     `json:"name,omitempty"`
	Key          string                     `json:"key,omitempty"`
	Environments []DependentFlagEnvironment `json:"environments,omitempty"`
	Links        *DependentFlagsLinks       `json:"_links,omitempty"`
	Site         *Site                      `json:"_site,omitempty"`
}

type MultiEnvironmentDependentFlags

type MultiEnvironmentDependentFlags struct {
	Items []MultiEnvironmentDependentFlag `json:"items,omitempty"`
	Links *DependentFlagsLinks            `json:"_links,omitempty"`
	Site  *Site                           `json:"_site,omitempty"`
}

type PatchComment

type PatchComment struct {
	Comment string           `json:"comment,omitempty"`
	Patch   []PatchOperation `json:"patch,omitempty"`
}

type PatchOperation

type PatchOperation struct {
	Op    string       `json:"op"`
	Path  string       `json:"path"`
	Value *interface{} `json:"value"`
}

type Policy

type Policy struct {
	Resources []string `json:"resources,omitempty"`
	// Targeted resource will be those resources NOT in this list. The \"resources`\" field must be empty to use this field.
	NotResources []string `json:"notResources,omitempty"`
	Actions      []string `json:"actions,omitempty"`
	// Targeted actions will be those actions NOT in this list. The \"actions\" field must be empty to use this field.
	NotActions []string `json:"notActions,omitempty"`
	// Effect of the policy - allow or deny.
	Effect string `json:"effect,omitempty"`
}

type Prerequisite

type Prerequisite struct {
	Key       string `json:"key,omitempty"`
	Variation int32  `json:"variation,omitempty"`
}

type Project

type Project struct {
	Links *Links `json:"_links,omitempty"`
	// The unique resource id.
	Id                        string        `json:"_id,omitempty"`
	Key                       string        `json:"key,omitempty"`
	Name                      string        `json:"name,omitempty"`
	IncludeInSnippetByDefault bool          `json:"includeInSnippetByDefault,omitempty"`
	Environments              []Environment `json:"environments,omitempty"`
	// An array of tags for this project.
	Tags                          []string                `json:"tags,omitempty"`
	DefaultClientSideAvailability *ClientSideAvailability `json:"defaultClientSideAvailability,omitempty"`
}

type ProjectBody

type ProjectBody struct {
	Name                          string                  `json:"name"`
	Key                           string                  `json:"key"`
	IncludeInSnippetByDefault     bool                    `json:"includeInSnippetByDefault,omitempty"`
	Tags                          []string                `json:"tags,omitempty"`
	Environments                  []EnvironmentPost       `json:"environments,omitempty"`
	DefaultClientSideAvailability *ClientSideAvailability `json:"defaultClientSideAvailability,omitempty"`
}

type Projects

type Projects struct {
	Links *Links    `json:"_links,omitempty"`
	Items []Project `json:"items,omitempty"`
}

type ProjectsApiService

type ProjectsApiService service

func (*ProjectsApiService) DeleteProject

func (a *ProjectsApiService) DeleteProject(ctx context.Context, projectKey string) (*http.Response, error)

ProjectsApiService Delete a project by key. Caution-- deleting a project will delete all associated environments and feature flags. You cannot delete the last project in an account.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectKey The project key, used to tie the flags together under one project so they can be managed together.

func (*ProjectsApiService) GetProject

func (a *ProjectsApiService) GetProject(ctx context.Context, projectKey string) (Project, *http.Response, error)

ProjectsApiService Fetch a single project by key.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectKey The project key, used to tie the flags together under one project so they can be managed together.

@return Project

func (*ProjectsApiService) GetProjects

func (a *ProjectsApiService) GetProjects(ctx context.Context) (Projects, *http.Response, error)

ProjectsApiService Returns a list of all projects in the account.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

@return Projects

func (*ProjectsApiService) PatchProject

func (a *ProjectsApiService) PatchProject(ctx context.Context, projectKey string, patchDelta []PatchOperation) (Project, *http.Response, error)

ProjectsApiService Modify a project by ID.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectKey The project key, used to tie the flags together under one project so they can be managed together.
  • @param patchDelta Requires a JSON Patch representation of the desired changes to the project. 'http://jsonpatch.com/'

@return Project

func (*ProjectsApiService) PostProject

func (a *ProjectsApiService) PostProject(ctx context.Context, projectBody ProjectBody) (Project, *http.Response, error)

ProjectsApiService Create a new project with the given key and name.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectBody Project keys must be unique within an account.

@return Project

type RelayProxyConfig

type RelayProxyConfig struct {
	// The unique resource id.
	Id      string  `json:"_id"`
	Creator *Member `json:"_creator"`
	// A human-friendly name for the relay proxy configuration
	Name   string   `json:"name"`
	Policy []Policy `json:"policy"`
	// Full secret key. Only included if creating or resetting the relay proxy configuration
	FullKey string `json:"fullKey,omitempty"`
	// The last 4 digits of the unique secret key for this relay proxy configuration
	DisplayKey string `json:"displayKey"`
	// A unix epoch time in milliseconds specifying the creation time of this relay proxy configuration
	CreationDate int64 `json:"creationDate"`
	// A unix epoch time in milliseconds specifying the last time this relay proxy configuration was modified
	LastModified int64 `json:"lastModified"`
}

type RelayProxyConfigBody

type RelayProxyConfigBody struct {
	// A human-friendly name for the relay proxy configuration
	Name   string   `json:"name,omitempty"`
	Policy []Policy `json:"policy,omitempty"`
}

type RelayProxyConfigs

type RelayProxyConfigs struct {
	Items []RelayProxyConfig `json:"items,omitempty"`
}

type RelayProxyConfigurationsApiResetRelayProxyConfigOpts

type RelayProxyConfigurationsApiResetRelayProxyConfigOpts struct {
	Expiry optional.Int64
}

type RelayProxyConfigurationsApiService

type RelayProxyConfigurationsApiService service

func (*RelayProxyConfigurationsApiService) DeleteRelayProxyConfig

func (a *RelayProxyConfigurationsApiService) DeleteRelayProxyConfig(ctx context.Context, id string) (*http.Response, error)

RelayProxyConfigurationsApiService Delete a relay proxy configuration by ID.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id The relay proxy configuration ID

func (*RelayProxyConfigurationsApiService) GetRelayProxyConfig

RelayProxyConfigurationsApiService Get a single relay proxy configuration by ID.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id The relay proxy configuration ID

@return RelayProxyConfig

func (*RelayProxyConfigurationsApiService) GetRelayProxyConfigs

RelayProxyConfigurationsApiService Returns a list of relay proxy configurations in the account.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

@return RelayProxyConfigs

func (*RelayProxyConfigurationsApiService) PatchRelayProxyConfig

func (a *RelayProxyConfigurationsApiService) PatchRelayProxyConfig(ctx context.Context, id string, patchDelta []PatchOperation) (RelayProxyConfig, *http.Response, error)

RelayProxyConfigurationsApiService Modify a relay proxy configuration by ID.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id The relay proxy configuration ID
  • @param patchDelta Requires a JSON Patch representation of the desired changes to the project. 'http://jsonpatch.com/'

@return RelayProxyConfig

func (*RelayProxyConfigurationsApiService) PostRelayAutoConfig

func (a *RelayProxyConfigurationsApiService) PostRelayAutoConfig(ctx context.Context, relayProxyConfigBody RelayProxyConfigBody) (RelayProxyConfig, *http.Response, error)

RelayProxyConfigurationsApiService Create a new relay proxy config.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param relayProxyConfigBody Create a new relay proxy configuration

@return RelayProxyConfig

func (*RelayProxyConfigurationsApiService) ResetRelayProxyConfig

type Role

type Role string
const (
	WRITER_Role Role = "writer"
	READER_Role Role = "reader"
	ADMIN_Role  Role = "admin"
	OWNER_Role  Role = "owner"
)

List of Role

type Rollout

type Rollout struct {
	BucketBy   string              `json:"bucketBy,omitempty"`
	Variations []WeightedVariation `json:"variations,omitempty"`
}

type RootApiService

type RootApiService service

func (*RootApiService) GetRoot

func (a *RootApiService) GetRoot(ctx context.Context) (Links, *http.Response, error)

RootApiService You can issue a GET request to the root resource to find all of the resource categories supported by the API.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

@return Links

type Rule

type Rule struct {
	Id          string   `json:"_id,omitempty"`
	Variation   int32    `json:"variation,omitempty"`
	TrackEvents bool     `json:"trackEvents,omitempty"`
	Rollout     *Rollout `json:"rollout,omitempty"`
	Clauses     []Clause `json:"clauses,omitempty"`
	Description string   `json:"description,omitempty"`
}

type ScheduledChangesFeatureFlagConflict

type ScheduledChangesFeatureFlagConflict struct {
	// Feature flag scheduled change id this change will conflict with
	Id string `json:"_id,omitempty"`
	// Feature flag scheduled change conflict reason
	Reason string `json:"reason,omitempty"`
}

type SemanticPatchInstruction

type SemanticPatchInstruction struct {
}

type SemanticPatchInstructionInner

type SemanticPatchInstructionInner struct {
	// The name of the modification you would like to perform on a resource.
	Kind string `json:"kind,omitempty"`
}

type SemanticPatchOperation

type SemanticPatchOperation struct {
	Comment      string                    `json:"comment,omitempty"`
	Instructions *SemanticPatchInstruction `json:"instructions"`
}

type SemanticPatchOperationInstructions

type SemanticPatchOperationInstructions struct {
	// The name of the modification you would like to perform on a resource.
	Kind string `json:"kind,omitempty"`
}

type Site

type Site struct {
	Href  string `json:"href,omitempty"`
	Type_ string `json:"type,omitempty"`
}

type Statement

type Statement struct {
	Resources []string `json:"resources,omitempty"`
	// Targeted resource will be those resources NOT in this list. The \"resources`\" field must be empty to use this field.
	NotResources []string `json:"notResources,omitempty"`
	Actions      []string `json:"actions,omitempty"`
	// Targeted actions will be those actions NOT in this list. The \"actions\" field must be empty to use this field.
	NotActions []string `json:"notActions,omitempty"`
	Effect     string   `json:"effect,omitempty"`
}

type Statements

type Statements struct {
}

type Stream

type Stream struct {
	Links    *StreamUsageLinks     `json:"_links,omitempty"`
	Metadata []StreamUsageMetadata `json:"metadata,omitempty"`
	Series   []StreamUsageSeries   `json:"series,omitempty"`
}

type StreamBySdk

type StreamBySdk struct {
	Links    *StreamBySdkLinks          `json:"_links,omitempty"`
	Metadata []StreamBySdkLinksMetadata `json:"metadata,omitempty"`
	Series   []StreamUsageSeries        `json:"series,omitempty"`
}
type StreamBySdkLinks struct {
	Parent *Link `json:"parent,omitempty"`
	Self   *Link `json:"self,omitempty"`
}

type StreamBySdkLinksMetadata

type StreamBySdkLinksMetadata struct {
	Sdk     string `json:"sdk,omitempty"`
	Version string `json:"version,omitempty"`
	Source  string `json:"source,omitempty"`
}
type StreamLinks struct {
	Parent *Link `json:"parent,omitempty"`
	Self   *Link `json:"self,omitempty"`
	// Links to endpoints that are in the request path.
	Subseries []Link `json:"subseries,omitempty"`
}

type StreamSdkVersion

type StreamSdkVersion struct {
	Links       *StreamBySdkLinks      `json:"_links,omitempty"`
	SdkVersions []StreamSdkVersionData `json:"sdkVersions,omitempty"`
}

type StreamSdkVersionData

type StreamSdkVersionData struct {
	// The language of the sdk
	Sdk string `json:"sdk,omitempty"`
	// The version of the sdk
	Version string `json:"version,omitempty"`
}

type StreamUsageError

type StreamUsageError struct {
	Code    string `json:"code,omitempty"`
	Message string `json:"message,omitempty"`
}
type StreamUsageLinks struct {
	Parent *Link `json:"parent,omitempty"`
	Self   *Link `json:"self,omitempty"`
	// The following links that are in the response.
	Subseries []Link `json:"subseries,omitempty"`
}

type StreamUsageMetadata

type StreamUsageMetadata struct {
	// The language of the sdk
	Sdk string `json:"sdk,omitempty"`
	// The version of the SDK
	Version string `json:"version,omitempty"`
	Source  string `json:"source,omitempty"`
}

type StreamUsageSeries

type StreamUsageSeries struct {
	// A key corresponding to a time series data point.
	Var0 int64 `json:"0,omitempty"`
	// A unix epoch time in milliseconds specifying the creation time of this flag.
	Time int64 `json:"time,omitempty"`
}

type Streams

type Streams struct {
	Links *StreamUsageLinks `json:"_links,omitempty"`
}

type SubscriptionBody

type SubscriptionBody struct {
	// A human-readable name for your subscription configuration.
	Name       string      `json:"name"`
	Statements []Statement `json:"statements,omitempty"`
	// Integration-specific configuration fields.
	Config *interface{} `json:"config"`
	// Whether the integration subscription is active or not.
	On bool `json:"on,omitempty"`
	// Tags for the integration subscription.
	Tags []string `json:"tags,omitempty"`
}

type Target

type Target struct {
	Values    []string `json:"values,omitempty"`
	Variation int32    `json:"variation,omitempty"`
}

type TeamMembersApiGetMembersOpts

type TeamMembersApiGetMembersOpts struct {
	Limit  optional.Float32
	Offset optional.Float32
	Filter optional.String
	Sort   optional.String
}

type TeamMembersApiService

type TeamMembersApiService service

func (*TeamMembersApiService) DeleteMember

func (a *TeamMembersApiService) DeleteMember(ctx context.Context, memberId string) (*http.Response, error)

TeamMembersApiService Delete a team member by ID.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param memberId The member ID.

func (*TeamMembersApiService) GetMe

TeamMembersApiService Get the current team member associated with the token

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

@return Member

func (*TeamMembersApiService) GetMember

func (a *TeamMembersApiService) GetMember(ctx context.Context, memberId string) (Member, *http.Response, error)

TeamMembersApiService Get a single team member by ID.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param memberId The member ID.

@return Member

func (*TeamMembersApiService) GetMembers

func (a *TeamMembersApiService) GetMembers(ctx context.Context, localVarOptionals *TeamMembersApiGetMembersOpts) (Members, *http.Response, error)

func (*TeamMembersApiService) PatchMember

func (a *TeamMembersApiService) PatchMember(ctx context.Context, memberId string, patchDelta []PatchOperation) (Member, *http.Response, error)

TeamMembersApiService Modify a team member by ID.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param memberId The member ID.
  • @param patchDelta Requires a JSON Patch representation of the desired changes to the project. 'http://jsonpatch.com/'

@return Member

func (*TeamMembersApiService) PostMembers

func (a *TeamMembersApiService) PostMembers(ctx context.Context, membersBody []MembersBody) (Members, *http.Response, error)

TeamMembersApiService Invite new members.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param membersBody New members to invite.

@return Members

type Token

type Token struct {
	Links *Links `json:"_links,omitempty"`
	// The unique resource id.
	Id string `json:"_id,omitempty"`
	// The unique resource id.
	OwnerId string `json:"ownerId,omitempty"`
	// The unique resource id.
	MemberId string  `json:"memberId,omitempty"`
	Member   *Member `json:"_member,omitempty"`
	// A unix epoch time in milliseconds specifying the creation time of this access token.
	CreationDate int64 `json:"creationDate,omitempty"`
	// A unix epoch time in milliseconds specifying the last time this access token was modified.
	LastModified int64 `json:"lastModified,omitempty"`
	// A unix epoch time in milliseconds specifying the last time this access token was used to authorize access to the LaunchDarkly REST API.
	LastUsed int64 `json:"lastUsed,omitempty"`
	// The last 4 digits of the unique secret key for this access token. If creating or resetting the token, this will be the full token secret.
	Token string `json:"token,omitempty"`
	// A human-friendly name for the access token
	Name string `json:"name,omitempty"`
	// The name of a built-in role for the token
	Role string `json:"role,omitempty"`
	// A list of custom role IDs to use as access limits for the access token
	CustomRoleIds []string    `json:"customRoleIds,omitempty"`
	InlineRole    []Statement `json:"inlineRole,omitempty"`
	// Whether the token will be a service token https://docs.launchdarkly.com/home/account-security/api-access-tokens#service-tokens
	ServiceToken bool `json:"serviceToken,omitempty"`
	// The default API version for this token
	DefaultApiVersion int32 `json:"defaultApiVersion,omitempty"`
}

type TokenBody

type TokenBody struct {
	// A human-friendly name for the access token
	Name string `json:"name,omitempty"`
	// The name of a built-in role for the token
	Role string `json:"role,omitempty"`
	// A list of custom role IDs to use as access limits for the access token
	CustomRoleIds []string    `json:"customRoleIds,omitempty"`
	InlineRole    []Statement `json:"inlineRole,omitempty"`
	// Whether the token will be a service token https://docs.launchdarkly.com/home/account-security/api-access-tokens#service-tokens
	ServiceToken bool `json:"serviceToken,omitempty"`
	// The default API version for this token
	DefaultApiVersion int32 `json:"defaultApiVersion,omitempty"`
}

type Tokens

type Tokens struct {
	Links *Links  `json:"_links,omitempty"`
	Items []Token `json:"items,omitempty"`
}

type UnboundedSegmentTargetChanges

type UnboundedSegmentTargetChanges struct {
	// Users to add to this list of targets
	Add []string `json:"add,omitempty"`
	// Users to remove from this list of targets
	Remove []string `json:"remove,omitempty"`
}

type UnboundedSegmentTargetsBody

type UnboundedSegmentTargetsBody struct {
	Included *UnboundedSegmentTargetChanges `json:"included,omitempty"`
	Excluded *UnboundedSegmentTargetChanges `json:"excluded,omitempty"`
}

type Usage

type Usage struct {
	Links  *UsageLinks         `json:"_links,omitempty"`
	Series []StreamUsageSeries `json:"series,omitempty"`
}

type UsageError

type UsageError struct {
	Message string `json:"message,omitempty"`
}
type UsageLinks struct {
	Parent *Link `json:"parent,omitempty"`
	Self   *Link `json:"self,omitempty"`
	// The following links that are in the response.
	Subseries []Link `json:"subseries,omitempty"`
}

type User

type User struct {
	Key       string       `json:"key,omitempty"`
	Secondary string       `json:"secondary,omitempty"`
	Ip        string       `json:"ip,omitempty"`
	Country   string       `json:"country,omitempty"`
	Email     string       `json:"email,omitempty"`
	FirstName string       `json:"firstName,omitempty"`
	LastName  string       `json:"lastName,omitempty"`
	Avatar    string       `json:"avatar,omitempty"`
	Name      string       `json:"name,omitempty"`
	Anonymous bool         `json:"anonymous,omitempty"`
	Custom    *interface{} `json:"custom,omitempty"`
}

type UserFlagSetting

type UserFlagSetting struct {
	Links *Links `json:"_links,omitempty"`
	// The most important attribute in the response. The _value is the current setting for the user. For a boolean feature toggle, this will be true, false, or null if there is no defined fallthrough value.
	Value bool `json:"_value,omitempty"`
	// The setting attribute indicates whether you've explicitly targeted this user to receive a particular variation. For example, if you have explicitly turned off a feature toggle for a user, setting will be false. A setting of null means that you haven't assigned that user to a specific variation.
	Setting bool `json:"setting,omitempty"`
}

type UserFlagSettings

type UserFlagSettings struct {
	Links *Links                     `json:"_links,omitempty"`
	Items map[string]UserFlagSetting `json:"items,omitempty"`
}

type UserRecord

type UserRecord struct {
	LastPing      string `json:"lastPing,omitempty"`
	EnvironmentId string `json:"environmentId,omitempty"`
	// The unique resource id.
	OwnerId string `json:"ownerId,omitempty"`
	User    *User  `json:"user,omitempty"`
	Avatar  string `json:"avatar,omitempty"`
}

type UserRecordApiService

type UserRecordApiService service

func (*UserRecordApiService) GetUser

func (a *UserRecordApiService) GetUser(ctx context.Context, projectKey string, environmentKey string, userKey string) (User, *http.Response, error)

UserRecordApiService Get a user by key.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectKey The project key, used to tie the flags together under one project so they can be managed together.
  • @param environmentKey The environment key, used to tie together flag configuration and users under one environment so they can be managed together.
  • @param userKey The user's key.

@return User

type UserSegment

type UserSegment struct {
	// Unique identifier for the user segment.
	Key string `json:"key"`
	// Name of the user segment.
	Name string `json:"name"`
	// Description of the user segment.
	Description string `json:"description,omitempty"`
	// An array of tags for this user segment.
	Tags []string `json:"tags,omitempty"`
	// A unix epoch time in milliseconds specifying the creation time of this flag.
	CreationDate int64 `json:"creationDate"`
	// An array of user keys that are included in this segment.
	Included []string `json:"included,omitempty"`
	// An array of user keys that should not be included in this segment, unless they are also listed in \"included\".
	Excluded []string `json:"excluded,omitempty"`
	// An array of rules that can cause a user to be included in this segment.
	Rules []UserSegmentRule `json:"rules,omitempty"`
	// Controls whether this is considered a \"big segment\" which can support an unlimited numbers of users. Include/exclude lists sent with this payload are not used in big segments. Contact your account manager for early access to this feature.
	Unbounded bool           `json:"unbounded,omitempty"`
	Version   int32          `json:"version,omitempty"`
	Links     *Links         `json:"_links,omitempty"`
	Flags     []FlagListItem `json:"_flags,omitempty"`
}

type UserSegmentBody

type UserSegmentBody struct {
	// A human-friendly name for the user segment.
	Name string `json:"name"`
	// A unique key that will be used to reference the user segment in feature flags.
	Key string `json:"key"`
	// A description for the user segment.
	Description string `json:"description,omitempty"`
	// Controls whether this is considered a \"big segment\" which can support an unlimited numbers of users. Include/exclude lists sent with this payload are not used in big segments. Contact your account manager for early access to this feature.
	Unbounded bool `json:"unbounded,omitempty"`
	// Tags for the user segment.
	Tags []string `json:"tags,omitempty"`
}

type UserSegmentRule

type UserSegmentRule struct {
	Clauses  []Clause `json:"clauses,omitempty"`
	Weight   int32    `json:"weight,omitempty"`
	BucketBy string   `json:"bucketBy,omitempty"`
}

type UserSegments

type UserSegments struct {
	Links *Links        `json:"_links,omitempty"`
	Items []UserSegment `json:"items,omitempty"`
}

type UserSegmentsApiGetUserSegmentsOpts

type UserSegmentsApiGetUserSegmentsOpts struct {
	Tag optional.String
}

type UserSegmentsApiService

type UserSegmentsApiService service

func (*UserSegmentsApiService) DeleteUserSegment

func (a *UserSegmentsApiService) DeleteUserSegment(ctx context.Context, projectKey string, environmentKey string, userSegmentKey string) (*http.Response, error)

UserSegmentsApiService Delete a user segment.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectKey The project key, used to tie the flags together under one project so they can be managed together.
  • @param environmentKey The environment key, used to tie together flag configuration and users under one environment so they can be managed together.
  • @param userSegmentKey The user segment's key. The key identifies the user segment in your code.

func (*UserSegmentsApiService) GetExpiringUserTargetsOnSegment

func (a *UserSegmentsApiService) GetExpiringUserTargetsOnSegment(ctx context.Context, projectKey string, environmentKey string, userSegmentKey string) (UserTargetingExpirationForSegment, *http.Response, error)

UserSegmentsApiService Get expiring user targets for user segment

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectKey The project key, used to tie the flags together under one project so they can be managed together.
  • @param environmentKey The environment key, used to tie together flag configuration and users under one environment so they can be managed together.
  • @param userSegmentKey The user segment's key. The key identifies the user segment in your code.

@return UserTargetingExpirationForSegment

func (*UserSegmentsApiService) GetUserSegment

func (a *UserSegmentsApiService) GetUserSegment(ctx context.Context, projectKey string, environmentKey string, userSegmentKey string) (UserSegment, *http.Response, error)

UserSegmentsApiService Get a single user segment by key.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectKey The project key, used to tie the flags together under one project so they can be managed together.
  • @param environmentKey The environment key, used to tie together flag configuration and users under one environment so they can be managed together.
  • @param userSegmentKey The user segment's key. The key identifies the user segment in your code.

@return UserSegment

func (*UserSegmentsApiService) GetUserSegments

func (a *UserSegmentsApiService) GetUserSegments(ctx context.Context, projectKey string, environmentKey string, localVarOptionals *UserSegmentsApiGetUserSegmentsOpts) (UserSegments, *http.Response, error)

func (*UserSegmentsApiService) PatchExpiringUserTargetsOnSegment

func (a *UserSegmentsApiService) PatchExpiringUserTargetsOnSegment(ctx context.Context, projectKey string, environmentKey string, userSegmentKey string, semanticPatchWithComment interface{}) (UserTargetingExpirationForSegment, *http.Response, error)

UserSegmentsApiService Update, add, or delete expiring user targets on user segment

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectKey The project key, used to tie the flags together under one project so they can be managed together.
  • @param environmentKey The environment key, used to tie together flag configuration and users under one environment so they can be managed together.
  • @param userSegmentKey The user segment's key. The key identifies the user segment in your code.
  • @param semanticPatchWithComment Requires a Semantic Patch representation of the desired changes to the resource. 'https://apidocs.launchdarkly.com/reference#updates-via-semantic-patches'. The addition of comments is also supported.

@return UserTargetingExpirationForSegment

func (*UserSegmentsApiService) PatchUserSegment

func (a *UserSegmentsApiService) PatchUserSegment(ctx context.Context, projectKey string, environmentKey string, userSegmentKey string, patchOnly []PatchOperation) (UserSegment, *http.Response, error)

UserSegmentsApiService Perform a partial update to a user segment.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectKey The project key, used to tie the flags together under one project so they can be managed together.
  • @param environmentKey The environment key, used to tie together flag configuration and users under one environment so they can be managed together.
  • @param userSegmentKey The user segment's key. The key identifies the user segment in your code.
  • @param patchOnly Requires a JSON Patch representation of the desired changes to the project. 'http://jsonpatch.com/' Feature flag patches also support JSON Merge Patch format. 'https://tools.ietf.org/html/rfc7386' The addition of comments is also supported.

@return UserSegment

func (*UserSegmentsApiService) PostUserSegment

func (a *UserSegmentsApiService) PostUserSegment(ctx context.Context, projectKey string, environmentKey string, userSegmentBody UserSegmentBody) (UserSegment, *http.Response, error)

UserSegmentsApiService Creates a new user segment.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectKey The project key, used to tie the flags together under one project so they can be managed together.
  • @param environmentKey The environment key, used to tie together flag configuration and users under one environment so they can be managed together.
  • @param userSegmentBody Create a new user segment.

@return UserSegment

func (*UserSegmentsApiService) UpdateBigSegmentTargets

func (a *UserSegmentsApiService) UpdateBigSegmentTargets(ctx context.Context, projectKey string, environmentKey string, userSegmentKey string, bigSegmentTargetsBody BigSegmentTargetsBody) (*http.Response, error)

UserSegmentsApiService Update targets included or excluded in a big segment

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectKey The project key, used to tie the flags together under one project so they can be managed together.
  • @param environmentKey The environment key, used to tie together flag configuration and users under one environment so they can be managed together.
  • @param userSegmentKey The user segment's key. The key identifies the user segment in your code.
  • @param bigSegmentTargetsBody Add or remove user targets to the included or excluded lists on a big segment. Contact your account manager for early access to this feature.

type UserSettingsApiService

type UserSettingsApiService service

func (*UserSettingsApiService) GetExpiringUserTargetsForUser

func (a *UserSettingsApiService) GetExpiringUserTargetsForUser(ctx context.Context, projectKey string, environmentKey string, userKey string) (UserTargetingExpirationOnFlagsForUser, *http.Response, error)

UserSettingsApiService Get expiring dates on flags for user

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectKey The project key, used to tie the flags together under one project so they can be managed together.
  • @param environmentKey The environment key, used to tie together flag configuration and users under one environment so they can be managed together.
  • @param userKey The user's key.

@return UserTargetingExpirationOnFlagsForUser

func (*UserSettingsApiService) GetUserFlagSetting

func (a *UserSettingsApiService) GetUserFlagSetting(ctx context.Context, projectKey string, environmentKey string, userKey string, featureFlagKey string) (UserFlagSetting, *http.Response, error)

UserSettingsApiService Fetch a single flag setting for a user by key.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectKey The project key, used to tie the flags together under one project so they can be managed together.
  • @param environmentKey The environment key, used to tie together flag configuration and users under one environment so they can be managed together.
  • @param userKey The user's key.
  • @param featureFlagKey The feature flag's key. The key identifies the flag in your code.

@return UserFlagSetting

func (*UserSettingsApiService) GetUserFlagSettings

func (a *UserSettingsApiService) GetUserFlagSettings(ctx context.Context, projectKey string, environmentKey string, userKey string) (UserFlagSettings, *http.Response, error)

UserSettingsApiService Fetch a single flag setting for a user by key.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectKey The project key, used to tie the flags together under one project so they can be managed together.
  • @param environmentKey The environment key, used to tie together flag configuration and users under one environment so they can be managed together.
  • @param userKey The user's key.

@return UserFlagSettings

func (*UserSettingsApiService) PatchExpiringUserTargetsForFlags

func (a *UserSettingsApiService) PatchExpiringUserTargetsForFlags(ctx context.Context, projectKey string, environmentKey string, userKey string, semanticPatchWithComment interface{}) (UserTargetingExpirationOnFlagsForUser, *http.Response, error)

UserSettingsApiService Update, add, or delete expiring user targets for a single user on all flags

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectKey The project key, used to tie the flags together under one project so they can be managed together.
  • @param environmentKey The environment key, used to tie together flag configuration and users under one environment so they can be managed together.
  • @param userKey The user's key.
  • @param semanticPatchWithComment Requires a Semantic Patch representation of the desired changes to the resource. 'https://apidocs.launchdarkly.com/reference#updates-via-semantic-patches'. The addition of comments is also supported.

@return UserTargetingExpirationOnFlagsForUser

func (*UserSettingsApiService) PutFlagSetting

func (a *UserSettingsApiService) PutFlagSetting(ctx context.Context, projectKey string, environmentKey string, userKey string, featureFlagKey string, userSettingsBody UserSettingsBody) (*http.Response, error)

UserSettingsApiService Specifically enable or disable a feature flag for a user based on their key.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectKey The project key, used to tie the flags together under one project so they can be managed together.
  • @param environmentKey The environment key, used to tie together flag configuration and users under one environment so they can be managed together.
  • @param userKey The user's key.
  • @param featureFlagKey The feature flag's key. The key identifies the flag in your code.
  • @param userSettingsBody

type UserSettingsBody

type UserSettingsBody struct {
	// The variation value to set for the user. Must match the variation type of the flag.
	Setting bool `json:"setting,omitempty"`
}

type UserTargetingExpirationForFlag

type UserTargetingExpirationForFlag struct {
	// Unix epoch time in milliseconds specifying the expiration date
	ExpirationDate int64 `json:"expirationDate,omitempty"`
	// the ID of the variation that the user is targeted on a flag
	VariationId string `json:"variationId,omitempty"`
	// Unique identifier for the user
	UserKey    string                                    `json:"userKey,omitempty"`
	Id         string                                    `json:"_id,omitempty"`
	ResourceId *UserTargetingExpirationResourceIdForFlag `json:"_resourceId,omitempty"`
	Links      *Links                                    `json:"_links,omitempty"`
	Version    int32                                     `json:"_version,omitempty"`
}

type UserTargetingExpirationForFlags

type UserTargetingExpirationForFlags struct {
	Links *Links                           `json:"_links,omitempty"`
	Items []UserTargetingExpirationForFlag `json:"items,omitempty"`
}

type UserTargetingExpirationForSegment

type UserTargetingExpirationForSegment struct {
	// Unix epoch time in milliseconds specifying the expiration date
	ExpirationDate int64 `json:"expirationDate,omitempty"`
	// either the included or excluded variation that the user is targeted on a segment
	TargetType string `json:"targetType,omitempty"`
	// Unique identifier for the user
	UserKey    string                                    `json:"userKey,omitempty"`
	Id         string                                    `json:"_id,omitempty"`
	ResourceId *UserTargetingExpirationResourceIdForFlag `json:"_resourceId,omitempty"`
	Links      *Links                                    `json:"_links,omitempty"`
	Version    int32                                     `json:"_version,omitempty"`
}

type UserTargetingExpirationOnFlagsForUser

type UserTargetingExpirationOnFlagsForUser struct {
	Links *Links                           `json:"_links,omitempty"`
	Items []UserTargetingExpirationForFlag `json:"items,omitempty"`
}

type UserTargetingExpirationResourceIdForFlag

type UserTargetingExpirationResourceIdForFlag struct {
	Kind           string `json:"kind,omitempty"`
	ProjectKey     string `json:"projectKey,omitempty"`
	EnvironmentKey string `json:"environmentKey,omitempty"`
	FlagKey        string `json:"flagKey,omitempty"`
	Key            string `json:"key,omitempty"`
}

type Users

type Users struct {
	Links      *Links       `json:"_links,omitempty"`
	TotalCount float32      `json:"totalCount,omitempty"`
	Items      []UserRecord `json:"items,omitempty"`
}

type UsersApiGetSearchUsersOpts

type UsersApiGetSearchUsersOpts struct {
	Q      optional.String
	Limit  optional.Int32
	Offset optional.Int32
	After  optional.Int64
}

type UsersApiGetUsersOpts

type UsersApiGetUsersOpts struct {
	Limit    optional.Int32
	H        optional.String
	ScrollId optional.String
}

type UsersApiService

type UsersApiService service

func (*UsersApiService) DeleteUser

func (a *UsersApiService) DeleteUser(ctx context.Context, projectKey string, environmentKey string, userKey string) (*http.Response, error)

UsersApiService Delete a user by ID.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectKey The project key, used to tie the flags together under one project so they can be managed together.
  • @param environmentKey The environment key, used to tie together flag configuration and users under one environment so they can be managed together.
  • @param userKey The user's key.

func (*UsersApiService) GetSearchUsers

func (a *UsersApiService) GetSearchUsers(ctx context.Context, projectKey string, environmentKey string, localVarOptionals *UsersApiGetSearchUsersOpts) (Users, *http.Response, error)

func (*UsersApiService) GetUser

func (a *UsersApiService) GetUser(ctx context.Context, projectKey string, environmentKey string, userKey string) (UserRecord, *http.Response, error)

UsersApiService Get a user by key.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectKey The project key, used to tie the flags together under one project so they can be managed together.
  • @param environmentKey The environment key, used to tie together flag configuration and users under one environment so they can be managed together.
  • @param userKey The user's key.

@return UserRecord

func (*UsersApiService) GetUsers

func (a *UsersApiService) GetUsers(ctx context.Context, projectKey string, environmentKey string, localVarOptionals *UsersApiGetUsersOpts) (Users, *http.Response, error)

type Variation

type Variation struct {
	Id          string       `json:"_id,omitempty"`
	Name        string       `json:"name,omitempty"`
	Description string       `json:"description,omitempty"`
	Value       *interface{} `json:"value"`
}

type Webhook

type Webhook struct {
	Links *Links `json:"_links,omitempty"`
	// The unique resource id.
	Id string `json:"_id,omitempty"`
	// The URL of the remote webhook.
	Url string `json:"url,omitempty"`
	// If defined, the webhooks post request will include a X-LD-Signature header whose value will contain an HMAC SHA256 hex digest of the webhook payload, using the secret as the key.
	Secret string `json:"secret,omitempty"`
	// Whether this webhook is enabled or not.
	On bool `json:"on,omitempty"`
	// The name of the webhook.
	Name       string      `json:"name,omitempty"`
	Statements []Statement `json:"statements,omitempty"`
	// Tags assigned to this webhook.
	Tags []string `json:"tags,omitempty"`
}

type WebhookBody

type WebhookBody struct {
	// The URL of the remote webhook.
	Url string `json:"url"`
	// If sign is true, and the secret attribute is omitted, LaunchDarkly will automatically generate a secret for you.
	Secret string `json:"secret,omitempty"`
	// If sign is false, the webhook will not include a signature header, and the secret can be omitted.
	Sign bool `json:"sign"`
	// Whether this webhook is enabled or not.
	On bool `json:"on"`
	// The name of the webhook.
	Name       string      `json:"name,omitempty"`
	Statements []Statement `json:"statements,omitempty"`
	// Tags for the webhook.
	Tags []string `json:"tags,omitempty"`
}

type Webhooks

type Webhooks struct {
	Links *Links    `json:"_links,omitempty"`
	Items []Webhook `json:"items,omitempty"`
}

type WebhooksApiService

type WebhooksApiService service

func (*WebhooksApiService) DeleteWebhook

func (a *WebhooksApiService) DeleteWebhook(ctx context.Context, resourceId string) (*http.Response, error)

WebhooksApiService Delete a webhook by ID.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param resourceId The resource ID.

func (*WebhooksApiService) GetWebhook

func (a *WebhooksApiService) GetWebhook(ctx context.Context, resourceId string) (Webhook, *http.Response, error)

WebhooksApiService Get a webhook by ID.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param resourceId The resource ID.

@return Webhook

func (*WebhooksApiService) GetWebhooks

func (a *WebhooksApiService) GetWebhooks(ctx context.Context) (Webhooks, *http.Response, error)

WebhooksApiService Fetch a list of all webhooks.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

@return Webhooks

func (*WebhooksApiService) PatchWebhook

func (a *WebhooksApiService) PatchWebhook(ctx context.Context, resourceId string, patchDelta []PatchOperation) (Webhook, *http.Response, error)

WebhooksApiService Modify a webhook by ID.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param resourceId The resource ID.
  • @param patchDelta Requires a JSON Patch representation of the desired changes to the project. 'http://jsonpatch.com/'

@return Webhook

func (*WebhooksApiService) PostWebhook

func (a *WebhooksApiService) PostWebhook(ctx context.Context, webhookBody WebhookBody) (Webhook, *http.Response, error)

WebhooksApiService Create a webhook.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param webhookBody New webhook.

@return Webhook

type WeightedVariation

type WeightedVariation struct {
	Variation int32 `json:"variation,omitempty"`
	Weight    int32 `json:"weight,omitempty"`
}

Source Files

Jump to

Keyboard shortcuts

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