Versions in this module Expand all Collapse all v1 v1.2.2 Jul 25, 2026 Changes in this version + var ContextAPIKey = contextKey("apikey") + var ContextAccessToken = contextKey("accesstoken") + var ContextBasicAuth = contextKey("basic") + var ContextOAuth2 = contextKey("token") + func CacheExpires(r *http.Response) time.Time + type APIClient struct + ConstraintApi *ConstraintApiService + DatarApi *DatarApiService + DistributionApi *DistributionApiService + EvaluationApi *EvaluationApiService + ExportApi *ExportApiService + ExposureApi *ExposureApiService + FlagApi *FlagApiService + HealthApi *HealthApiService + SegmentApi *SegmentApiService + TagApi *TagApiService + VariantApi *VariantApiService + func NewAPIClient(cfg *Configuration) *APIClient + func (c *APIClient) ChangeBasePath(path string) + type APIKey struct + Key string + Prefix string + type APIResponse struct + Message string + Method string + Operation string + Payload []byte + RequestURL string + func NewAPIResponse(r *http.Response) *APIResponse + func NewAPIResponseWithError(errorMessage string) *APIResponse + type BasicAuth struct + Password string + UserName string + type Configuration struct + BasePath string + DefaultHeader map[string]string + HTTPClient *http.Client + Host string + Scheme string + UserAgent string + func NewConfiguration() *Configuration + func (c *Configuration) AddDefaultHeader(key string, value string) + type Constraint struct + Id int64 + Operator string + Property string + Value string + type ConstraintApiService service + func (a *ConstraintApiService) CreateConstraint(ctx context.Context, flagID int64, segmentID int64, ...) (Constraint, *http.Response, error) + func (a *ConstraintApiService) DeleteConstraint(ctx context.Context, flagID int64, segmentID int64, constraintID int64) (*http.Response, error) + func (a *ConstraintApiService) FindConstraints(ctx context.Context, flagID int64, segmentID int64) ([]Constraint, *http.Response, error) + func (a *ConstraintApiService) PutConstraint(ctx context.Context, flagID int64, segmentID int64, constraintID int64, ...) (Constraint, *http.Response, error) + type CreateConstraintRequest struct + Operator string + Property string + Value string + type CreateFlagRequest struct + Description string + Key string + Template string + type CreateSegmentRequest struct + Description string + RolloutPercent int64 + type CreateTagRequest struct + Value string + type CreateVariantRequest struct + Attachment *interface{} + Key string + type DatarApiService service + func (a *DatarApiService) GetDatarFlagSummary(ctx context.Context, flagID int64, localVarOptionals *GetDatarFlagSummaryOpts) (DatarFlagSummaryResponse, *http.Response, error) + func (a *DatarApiService) GetDatarSummary(ctx context.Context, localVarOptionals *GetDatarSummaryOpts) (DatarSummaryResponse, *http.Response, error) + type DatarDayEntry struct + Count int64 + Date string + type DatarFlagSummaryResponse struct + FlagID int64 + TrafficByDay []DatarDayEntry + TrafficBySegment []DatarSegmentEntry + TrafficByVariant []DatarVariantEntry + type DatarSegmentEntry struct + Count int64 + SegmentID int64 + type DatarSummaryFlag struct + Description string + Enabled bool + FlagID int64 + FlagKey string + LastEvaluatedAt time.Time + TotalEvalCount int64 + type DatarSummaryResponse struct + Flags []DatarSummaryFlag + type DatarVariantEntry struct + Count int64 + VariantID int64 + type Distribution struct + Id int64 + Percent int64 + VariantID int64 + VariantKey string + type DistributionApiService service + func (a *DistributionApiService) FindDistributions(ctx context.Context, flagID int64, segmentID int64) ([]Distribution, *http.Response, error) + func (a *DistributionApiService) PutDistributions(ctx context.Context, flagID int64, segmentID int64, ...) ([]Distribution, *http.Response, error) + type DuplicateFlagOpts struct + Body optional.Interface + type DuplicateFlagRequest struct + Description string + Key string + type EvalContext struct + EnableDebug bool + EntityContext *interface{} + EntityID string + EntityType string + FlagID int64 + FlagKey string + FlagTags []string + FlagTagsOperator string + type EvalDebugLog struct + Msg string + SegmentDebugLogs []SegmentDebugLog + type EvalResult struct + DataRecordsEnabled bool + EvalContext *EvalContext + EvalDebugLog *EvalDebugLog + FlagID int64 + FlagKey string + FlagSnapshotID int64 + FlagTags []string + RecordSource string + SegmentID int64 + Timestamp string + VariantAttachment *interface{} + VariantID int64 + VariantKey string + type EvaluationApiService service + func (a *EvaluationApiService) GetEvaluation(ctx context.Context, json string) (EvalResult, *http.Response, error) + func (a *EvaluationApiService) GetEvaluationBatch(ctx context.Context, json string) (EvaluationBatchResponse, *http.Response, error) + func (a *EvaluationApiService) PostEvaluation(ctx context.Context, body EvalContext) (EvalResult, *http.Response, error) + func (a *EvaluationApiService) PostEvaluationBatch(ctx context.Context, body EvaluationBatchRequest) (EvaluationBatchResponse, *http.Response, error) + type EvaluationBatchRequest struct + EnableDebug bool + Entities []EvaluationEntity + FlagIDs []int64 + FlagKeys []string + FlagTags []string + FlagTagsOperator string + type EvaluationBatchResponse struct + EvaluationResults []EvalResult + type EvaluationEntity struct + EntityContext *interface{} + EntityID string + EntityType string + type ExportApiService service + func (a *ExportApiService) GetExportEvalCacheJSON(ctx context.Context, localVarOptionals *GetExportEvalCacheJSONOpts) (interface{}, *http.Response, error) + func (a *ExportApiService) GetExportSqlite(ctx context.Context, localVarOptionals *GetExportSqliteOpts) (*os.File, *http.Response, error) + type Exposure struct + EntityContext *interface{} + EntityID string + EntityType string + FlagID int64 + FlagKey string + FlagSnapshotID int64 + Timestamp time.Time + VariantID int64 + VariantKey string + type ExposureApiService service + func (a *ExposureApiService) PostExposures(ctx context.Context, body ExposuresRequest) (ExposuresResponse, *http.Response, error) + type ExposureRowError struct + Index int64 + Message string + type ExposuresRequest struct + Exposures []Exposure + type ExposuresResponse struct + Errors []ExposureRowError + LoggedCount int64 + Message string + type FindAllTagsOpts struct + Limit optional.Int64 + Offset optional.Int64 + ValueLike optional.String + type FindFlagsOpts struct + Deleted optional.Bool + Description optional.String + DescriptionLike optional.String + Enabled optional.Bool + Key optional.String + Limit optional.Int64 + Offset optional.Int64 + Preload optional.Bool + Tags optional.String + type Flag struct + CreatedBy string + DataRecordsEnabled bool + Description string + Enabled bool + EntityType string + Id int64 + Key string + Notes string + Segments []Segment + Tags []Tag + UpdatedAt time.Time + UpdatedBy string + Variants []Variant + type FlagApiService service + func (a *FlagApiService) CreateFlag(ctx context.Context, body CreateFlagRequest) (Flag, *http.Response, error) + func (a *FlagApiService) DeleteFlag(ctx context.Context, flagID int64) (*http.Response, error) + func (a *FlagApiService) DuplicateFlag(ctx context.Context, flagID int64, localVarOptionals *DuplicateFlagOpts) (Flag, *http.Response, error) + func (a *FlagApiService) FindFlags(ctx context.Context, localVarOptionals *FindFlagsOpts) ([]Flag, *http.Response, error) + func (a *FlagApiService) GetFlag(ctx context.Context, flagID int64) (Flag, *http.Response, error) + func (a *FlagApiService) GetFlagEntityTypes(ctx context.Context) ([]string, *http.Response, error) + func (a *FlagApiService) GetFlagSnapshotMaxID(ctx context.Context) (FlagSnapshotMaxId, *http.Response, error) + func (a *FlagApiService) GetFlagSnapshots(ctx context.Context, flagID int64, localVarOptionals *GetFlagSnapshotsOpts) ([]FlagSnapshot, *http.Response, error) + func (a *FlagApiService) PutFlag(ctx context.Context, flagID int64, body PutFlagRequest) (Flag, *http.Response, error) + func (a *FlagApiService) RestoreFlag(ctx context.Context, flagID int64) (Flag, *http.Response, error) + func (a *FlagApiService) SetFlagEnabled(ctx context.Context, flagID int64, body SetFlagEnabledRequest) (Flag, *http.Response, error) + type FlagSnapshot struct + Flag *Flag + Id int64 + UpdatedAt string + UpdatedBy string + type FlagSnapshotMaxId struct + MaxID int64 + type GenericSwaggerError struct + func (e GenericSwaggerError) Body() []byte + func (e GenericSwaggerError) Error() string + func (e GenericSwaggerError) Model() interface{} + type GetDatarFlagSummaryOpts struct + From optional.Time + To optional.Time + type GetDatarSummaryOpts struct + From optional.Time + Limit optional.Int32 + Offset optional.Int32 + To optional.Time + type GetExportEvalCacheJSONOpts struct + Enabled optional.Bool + Ids optional.Interface + Keys optional.Interface + Tags optional.Interface + TagsOperator optional.String + type GetExportSqliteOpts struct + ExcludeSnapshots optional.Bool + type GetFlagSnapshotsOpts struct + Limit optional.Int64 + Offset optional.Int64 + Sort optional.String + type Health struct + Status string + type HealthApiService service + func (a *HealthApiService) GetHealth(ctx context.Context) (Health, *http.Response, error) + type ModelError struct + Message string + type PutDistributionsRequest struct + Distributions []Distribution + type PutFlagRequest struct + DataRecordsEnabled bool + Description string + Enabled bool + EntityType string + Key string + Notes string + type PutSegmentReorderRequest struct + SegmentIDs []int64 + type PutSegmentRequest struct + Description string + RolloutPercent int64 + type PutVariantRequest struct + Attachment *interface{} + Key string + type Segment struct + Constraints []Constraint + Description string + Distributions []Distribution + Id int64 + Rank int64 + RolloutPercent int64 + type SegmentApiService service + func (a *SegmentApiService) CreateSegment(ctx context.Context, flagID int64, body CreateSegmentRequest) (Segment, *http.Response, error) + func (a *SegmentApiService) DeleteSegment(ctx context.Context, flagID int64, segmentID int64) (*http.Response, error) + func (a *SegmentApiService) FindSegments(ctx context.Context, flagID int64) ([]Segment, *http.Response, error) + func (a *SegmentApiService) PutSegment(ctx context.Context, flagID int64, segmentID int64, body PutSegmentRequest) (Segment, *http.Response, error) + func (a *SegmentApiService) PutSegmentsReorder(ctx context.Context, flagID int64, body PutSegmentReorderRequest) (*http.Response, error) + type SegmentDebugLog struct + Msg string + SegmentID int64 + type SetFlagEnabledRequest struct + Enabled bool + type Tag struct + Id int64 + Value string + type TagApiService service + func (a *TagApiService) CreateTag(ctx context.Context, flagID int64, body CreateTagRequest) (Tag, *http.Response, error) + func (a *TagApiService) DeleteTag(ctx context.Context, flagID int64, tagID int64) (*http.Response, error) + func (a *TagApiService) FindAllTags(ctx context.Context, localVarOptionals *FindAllTagsOpts) ([]Tag, *http.Response, error) + func (a *TagApiService) FindTags(ctx context.Context, flagID int64) ([]Tag, *http.Response, error) + type Variant struct + Attachment *interface{} + Id int64 + Key string + type VariantApiService service + func (a *VariantApiService) CreateVariant(ctx context.Context, flagID int64, body CreateVariantRequest) (Variant, *http.Response, error) + func (a *VariantApiService) DeleteVariant(ctx context.Context, flagID int64, variantID int64) (*http.Response, error) + func (a *VariantApiService) FindVariants(ctx context.Context, flagID int64) ([]Variant, *http.Response, error) + func (a *VariantApiService) PutVariant(ctx context.Context, flagID int64, variantID int64, body PutVariantRequest) (Variant, *http.Response, error)