Documentation
¶
Overview ¶
Package api provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen version v1.8.1 DO NOT EDIT.
Index ¶
- Constants
- func Handler(si ServerInterface) http.Handler
- func HandlerFromMux(si ServerInterface, r chi.Router) http.Handler
- func HandlerFromMuxWithBaseURL(si ServerInterface, r chi.Router, baseURL string) http.Handler
- func HandlerWithOptions(si ServerInterface, options ChiServerOptions) http.Handler
- type BadRequest
- type ChiServerOptions
- type CreateExperimentJSONRequestBody
- type CreateExperimentRequestBody
- type CreateExperimentSuccess
- type CreateProjectSettingsJSONRequestBody
- type CreateProjectSettingsRequestBody
- type CreateProjectSettingsSuccess
- type CreateSegmenterJSONRequestBody
- type CreateSegmenterRequestBody
- type CreateSegmenterSuccess
- type DeleteSegmenterSuccess
- type GetExperimentHistorySuccess
- type GetExperimentSuccess
- type GetProjectExperimentVariablesSuccess
- type GetProjectSettingsSuccess
- type GetSegmenterSuccess
- type InternalServerError
- type ListExperimentHistoryParams
- type ListExperimentHistorySuccess
- type ListExperimentsParams
- type ListExperimentsSuccess
- type ListProjectsSuccess
- type ListSegmentersParams
- type ListSegmentersSuccess
- type MiddlewareFunc
- type NotFound
- type ServerInterface
- type ServerInterfaceWrapper
- func (siw *ServerInterfaceWrapper) CreateExperiment(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) CreateProjectSettings(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) CreateSegmenter(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) DeleteSegmenter(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) DisableExperiment(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) EnableExperiment(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetExperiment(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetExperimentHistory(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetProjectExperimentVariables(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetProjectSettings(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetSegmenter(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListExperimentHistory(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListExperiments(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListProjects(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListSegmenters(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) UpdateExperiment(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) UpdateProjectSettings(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) UpdateSegmenter(w http.ResponseWriter, r *http.Request)
- type UpdateExperimentJSONRequestBody
- type UpdateExperimentRequestBody
- type UpdateExperimentSuccess
- type UpdateProjectSettingsJSONRequestBody
- type UpdateProjectSettingsRequestBody
- type UpdateProjectSettingsSuccess
- type UpdateSegmenterJSONRequestBody
- type UpdateSegmenterRequestBody
- type UpdateSegmenterSuccess
Constants ¶
const (
BearerAuthScopes = "bearerAuth.Scopes"
)
Variables ¶
This section is empty.
Functions ¶
func Handler ¶
func Handler(si ServerInterface) http.Handler
Handler creates http.Handler with routing matching OpenAPI spec.
func HandlerFromMux ¶
func HandlerFromMux(si ServerInterface, r chi.Router) http.Handler
HandlerFromMux creates http.Handler with routing matching OpenAPI spec based on the provided mux.
func HandlerFromMuxWithBaseURL ¶
func HandlerFromMuxWithBaseURL(si ServerInterface, r chi.Router, baseURL string) http.Handler
func HandlerWithOptions ¶
func HandlerWithOptions(si ServerInterface, options ChiServerOptions) http.Handler
HandlerWithOptions creates http.Handler with additional options
Types ¶
type ChiServerOptions ¶
type ChiServerOptions struct {
BaseURL string
BaseRouter chi.Router
Middlewares []MiddlewareFunc
}
type CreateExperimentJSONRequestBody ¶
type CreateExperimentJSONRequestBody CreateExperimentRequestBody
CreateExperimentJSONRequestBody defines body for CreateExperiment for application/json ContentType.
type CreateExperimentRequestBody ¶
type CreateExperimentRequestBody struct {
Description *string `json:"description"`
EndTime time.Time `json:"end_time"`
Interval *int32 `json:"interval"`
Name string `json:"name"`
Segment externalRef0.ExperimentSegment `json:"segment"`
StartTime time.Time `json:"start_time"`
Status externalRef0.ExperimentStatus `json:"status"`
Tier *externalRef0.ExperimentTier `json:"tier,omitempty"`
Treatments []externalRef0.ExperimentTreatment `json:"treatments"`
Type externalRef0.ExperimentType `json:"type"`
UpdatedBy *string `json:"updated_by,omitempty"`
}
CreateExperimentRequestBody defines model for CreateExperimentRequestBody.
type CreateExperimentSuccess ¶
type CreateExperimentSuccess struct {
Data externalRef0.Experiment `json:"data"`
}
CreateExperimentSuccess defines model for CreateExperimentSuccess.
type CreateProjectSettingsJSONRequestBody ¶
type CreateProjectSettingsJSONRequestBody CreateProjectSettingsRequestBody
CreateProjectSettingsJSONRequestBody defines body for CreateProjectSettings for application/json ContentType.
type CreateProjectSettingsRequestBody ¶
type CreateProjectSettingsRequestBody struct {
EnableS2idClustering *bool `json:"enable_s2id_clustering,omitempty"`
RandomizationKey string `json:"randomization_key"`
Segmenters externalRef0.ProjectSegmenters `json:"segmenters"`
// Object containing information to define a valid treatment schema
TreatmentSchema *externalRef0.TreatmentSchema `json:"treatment_schema,omitempty"`
ValidationUrl *string `json:"validation_url,omitempty"`
}
CreateProjectSettingsRequestBody defines model for CreateProjectSettingsRequestBody.
type CreateProjectSettingsSuccess ¶
type CreateProjectSettingsSuccess struct {
Data externalRef0.ProjectSettings `json:"data"`
}
CreateProjectSettingsSuccess defines model for CreateProjectSettingsSuccess.
type CreateSegmenterJSONRequestBody ¶
type CreateSegmenterJSONRequestBody CreateSegmenterRequestBody
CreateSegmenterJSONRequestBody defines body for CreateSegmenter for application/json ContentType.
type CreateSegmenterRequestBody ¶
type CreateSegmenterRequestBody struct {
Constraints *[]externalRef0.Constraint `json:"constraints,omitempty"`
Description *string `json:"description,omitempty"`
MultiValued bool `json:"multi_valued"`
Name string `json:"name"`
Options *externalRef0.SegmenterOptions `json:"options,omitempty"`
Required bool `json:"required"`
Type externalRef0.SegmenterType `json:"type"`
}
CreateSegmenterRequestBody defines model for CreateSegmenterRequestBody.
type CreateSegmenterSuccess ¶
type CreateSegmenterSuccess struct {
Data externalRef0.Segmenter `json:"data"`
}
CreateSegmenterSuccess defines model for CreateSegmenterSuccess.
type DeleteSegmenterSuccess ¶
type DeleteSegmenterSuccess struct {
Name *string `json:"name,omitempty"`
}
DeleteSegmenterSuccess defines model for DeleteSegmenterSuccess.
type GetExperimentHistorySuccess ¶
type GetExperimentHistorySuccess struct {
Data externalRef0.ExperimentHistory `json:"data"`
}
GetExperimentHistorySuccess defines model for GetExperimentHistorySuccess.
type GetExperimentSuccess ¶
type GetExperimentSuccess struct {
Data externalRef0.Experiment `json:"data"`
}
GetExperimentSuccess defines model for GetExperimentSuccess.
type GetProjectExperimentVariablesSuccess ¶
type GetProjectExperimentVariablesSuccess struct {
Data []string `json:"data"`
}
GetProjectExperimentVariablesSuccess defines model for GetProjectExperimentVariablesSuccess.
type GetProjectSettingsSuccess ¶
type GetProjectSettingsSuccess struct {
Data externalRef0.ProjectSettings `json:"data"`
}
GetProjectSettingsSuccess defines model for GetProjectSettingsSuccess.
type GetSegmenterSuccess ¶
type GetSegmenterSuccess struct {
Data externalRef0.Segmenter `json:"data"`
}
GetSegmenterSuccess defines model for GetSegmenterSuccess.
type InternalServerError ¶
type InternalServerError externalRef0.Error
InternalServerError defines model for InternalServerError.
type ListExperimentHistoryParams ¶
type ListExperimentHistoryParams struct {
// Result page number. It defaults to 1.
Page *int32 `json:"page,omitempty"`
// Number of items on each page. It defaults to 10.
PageSize *int32 `json:"page_size,omitempty"`
}
ListExperimentHistoryParams defines parameters for ListExperimentHistory.
type ListExperimentHistorySuccess ¶
type ListExperimentHistorySuccess struct {
Data []externalRef0.ExperimentHistory `json:"data"`
Paging *externalRef0.Paging `json:"paging,omitempty"`
}
ListExperimentHistorySuccess defines model for ListExperimentHistorySuccess.
type ListExperimentsParams ¶
type ListExperimentsParams struct {
Status *externalRef0.ExperimentStatus `json:"status,omitempty"`
// status_friendly is a combination of the status field, in conjunction with the duration,
// that produces a user-friendly classification of the experiment statuses. When this parameter
// is supplied, the status, start_time and end_time filters can also be set. However, the final
// result would be an intersection of the application of each of these filters.
StatusFriendly *[]externalRef0.ExperimentStatusFriendly `json:"status_friendly,omitempty"`
// Used together with the start_time, to filter experiments that are at least partially running in the input range.
EndTime *time.Time `json:"end_time,omitempty"`
Tier *externalRef0.ExperimentTier `json:"tier,omitempty"`
Type *externalRef0.ExperimentType `json:"type,omitempty"`
Name *string `json:"name,omitempty"`
UpdatedBy *string `json:"updated_by,omitempty"`
// Search experiment name and description for a partial match of the search text
Search *string `json:"search,omitempty"`
// Result page number. It defaults to 1.
Page *int32 `json:"page,omitempty"`
// Number of items on each page. It defaults to 10.
PageSize *int32 `json:"page_size,omitempty"`
// Used together with the end_time, to filter experiments that are at least partially running in the input range.
StartTime *time.Time `json:"start_time,omitempty"`
Segment *map[string]interface{} `json:"segment,omitempty"`
// controls whether or not weak segmenter matches (experiments where the segmenter is optional) should be returned
IncludeWeakMatch *bool `json:"include_weak_match,omitempty"`
// A selector to restrict the list of returned objects by their fields. If unset, all the fields will be returned.
// Paginated responses will be returned if both or either of `page` and `page_size` parameters are provided.
Fields *[]externalRef0.ExperimentField `json:"fields,omitempty"`
}
ListExperimentsParams defines parameters for ListExperiments.
type ListExperimentsSuccess ¶
type ListExperimentsSuccess struct {
Data []externalRef0.Experiment `json:"data"`
Paging *externalRef0.Paging `json:"paging,omitempty"`
}
ListExperimentsSuccess defines model for ListExperimentsSuccess.
type ListProjectsSuccess ¶
type ListProjectsSuccess struct {
Data []externalRef0.Project `json:"data"`
}
ListProjectsSuccess defines model for ListProjectsSuccess.
type ListSegmentersParams ¶
type ListSegmentersParams struct {
Scope *externalRef0.SegmenterScope `json:"scope,omitempty"`
Status *externalRef0.SegmenterStatus `json:"status,omitempty"`
// Search treatment name for a partial match of the search text
Search *string `json:"search,omitempty"`
}
ListSegmentersParams defines parameters for ListSegmenters.
type ListSegmentersSuccess ¶
type ListSegmentersSuccess struct {
Data []externalRef0.Segmenter `json:"data"`
}
ListSegmentersSuccess defines model for ListSegmentersSuccess.
type MiddlewareFunc ¶
type MiddlewareFunc func(http.HandlerFunc) http.HandlerFunc
type ServerInterface ¶
type ServerInterface interface {
// List info of all projects set up for Experimentation
// (GET /projects)
ListProjects(w http.ResponseWriter, r *http.Request)
// Get all parameters required for generating treatments for the given project
// (GET /projects/{project_id}/experiment-variables)
GetProjectExperimentVariables(w http.ResponseWriter, r *http.Request, projectId int64)
// Get experiments for a project w.r.t. query params
// (GET /projects/{project_id}/experiments)
ListExperiments(w http.ResponseWriter, r *http.Request, projectId int64, params ListExperimentsParams)
// Create a new experiment for a project
// (POST /projects/{project_id}/experiments)
CreateExperiment(w http.ResponseWriter, r *http.Request, projectId int64)
// Get details of an experiment with the given experiment_id and project_id
// (GET /projects/{project_id}/experiments/{experiment_id})
GetExperiment(w http.ResponseWriter, r *http.Request, projectId int64, experimentId int64)
// Update an experiment with the given experiment_id and project_id
// (PUT /projects/{project_id}/experiments/{experiment_id})
UpdateExperiment(w http.ResponseWriter, r *http.Request, projectId int64, experimentId int64)
// Disable an experiment with the given experiment_id and project_id
// (PUT /projects/{project_id}/experiments/{experiment_id}/disable)
DisableExperiment(w http.ResponseWriter, r *http.Request, projectId int64, experimentId int64)
// Enable an experiment with the given experiment_id and project_id
// (PUT /projects/{project_id}/experiments/{experiment_id}/enable)
EnableExperiment(w http.ResponseWriter, r *http.Request, projectId int64, experimentId int64)
// List an experiment's historical versions
// (GET /projects/{project_id}/experiments/{experiment_id}/history)
ListExperimentHistory(w http.ResponseWriter, r *http.Request, projectId int64, experimentId int64, params ListExperimentHistoryParams)
// List an experiment's historical versions
// (GET /projects/{project_id}/experiments/{experiment_id}/history/{version})
GetExperimentHistory(w http.ResponseWriter, r *http.Request, projectId int64, experimentId int64, version int64)
// Get all segmenter configurations required for generating experiments for the given project
// (GET /projects/{project_id}/segmenters)
ListSegmenters(w http.ResponseWriter, r *http.Request, projectId int64, params ListSegmentersParams)
// Create a new project-specific segmenter
// (POST /projects/{project_id}/segmenters)
CreateSegmenter(w http.ResponseWriter, r *http.Request, projectId int64)
// Delete a project-specific segmenter
// (DELETE /projects/{project_id}/segmenters/{name})
DeleteSegmenter(w http.ResponseWriter, r *http.Request, projectId int64, name string)
// Get the global/project-specific segmenter by name
// (GET /projects/{project_id}/segmenters/{name})
GetSegmenter(w http.ResponseWriter, r *http.Request, projectId int64, name string)
// Update an existing project-specific segmenter
// (PUT /projects/{project_id}/segmenters/{name})
UpdateSegmenter(w http.ResponseWriter, r *http.Request, projectId int64, name string)
// Get the settings for the given project
// (GET /projects/{project_id}/settings)
GetProjectSettings(w http.ResponseWriter, r *http.Request, projectId int64)
// Set up new project for Experimentation
// (POST /projects/{project_id}/settings)
CreateProjectSettings(w http.ResponseWriter, r *http.Request, projectId int64)
// Update the settings for the given project
// (PUT /projects/{project_id}/settings)
UpdateProjectSettings(w http.ResponseWriter, r *http.Request, projectId int64)
}
ServerInterface represents all server handlers.
type ServerInterfaceWrapper ¶
type ServerInterfaceWrapper struct {
Handler ServerInterface
HandlerMiddlewares []MiddlewareFunc
}
ServerInterfaceWrapper converts contexts to parameters.
func (*ServerInterfaceWrapper) CreateExperiment ¶
func (siw *ServerInterfaceWrapper) CreateExperiment(w http.ResponseWriter, r *http.Request)
CreateExperiment operation middleware
func (*ServerInterfaceWrapper) CreateProjectSettings ¶
func (siw *ServerInterfaceWrapper) CreateProjectSettings(w http.ResponseWriter, r *http.Request)
CreateProjectSettings operation middleware
func (*ServerInterfaceWrapper) CreateSegmenter ¶
func (siw *ServerInterfaceWrapper) CreateSegmenter(w http.ResponseWriter, r *http.Request)
CreateSegmenter operation middleware
func (*ServerInterfaceWrapper) DeleteSegmenter ¶
func (siw *ServerInterfaceWrapper) DeleteSegmenter(w http.ResponseWriter, r *http.Request)
DeleteSegmenter operation middleware
func (*ServerInterfaceWrapper) DisableExperiment ¶
func (siw *ServerInterfaceWrapper) DisableExperiment(w http.ResponseWriter, r *http.Request)
DisableExperiment operation middleware
func (*ServerInterfaceWrapper) EnableExperiment ¶
func (siw *ServerInterfaceWrapper) EnableExperiment(w http.ResponseWriter, r *http.Request)
EnableExperiment operation middleware
func (*ServerInterfaceWrapper) GetExperiment ¶
func (siw *ServerInterfaceWrapper) GetExperiment(w http.ResponseWriter, r *http.Request)
GetExperiment operation middleware
func (*ServerInterfaceWrapper) GetExperimentHistory ¶
func (siw *ServerInterfaceWrapper) GetExperimentHistory(w http.ResponseWriter, r *http.Request)
GetExperimentHistory operation middleware
func (*ServerInterfaceWrapper) GetProjectExperimentVariables ¶
func (siw *ServerInterfaceWrapper) GetProjectExperimentVariables(w http.ResponseWriter, r *http.Request)
GetProjectExperimentVariables operation middleware
func (*ServerInterfaceWrapper) GetProjectSettings ¶
func (siw *ServerInterfaceWrapper) GetProjectSettings(w http.ResponseWriter, r *http.Request)
GetProjectSettings operation middleware
func (*ServerInterfaceWrapper) GetSegmenter ¶
func (siw *ServerInterfaceWrapper) GetSegmenter(w http.ResponseWriter, r *http.Request)
GetSegmenter operation middleware
func (*ServerInterfaceWrapper) ListExperimentHistory ¶
func (siw *ServerInterfaceWrapper) ListExperimentHistory(w http.ResponseWriter, r *http.Request)
ListExperimentHistory operation middleware
func (*ServerInterfaceWrapper) ListExperiments ¶
func (siw *ServerInterfaceWrapper) ListExperiments(w http.ResponseWriter, r *http.Request)
ListExperiments operation middleware
func (*ServerInterfaceWrapper) ListProjects ¶
func (siw *ServerInterfaceWrapper) ListProjects(w http.ResponseWriter, r *http.Request)
ListProjects operation middleware
func (*ServerInterfaceWrapper) ListSegmenters ¶
func (siw *ServerInterfaceWrapper) ListSegmenters(w http.ResponseWriter, r *http.Request)
ListSegmenters operation middleware
func (*ServerInterfaceWrapper) UpdateExperiment ¶
func (siw *ServerInterfaceWrapper) UpdateExperiment(w http.ResponseWriter, r *http.Request)
UpdateExperiment operation middleware
func (*ServerInterfaceWrapper) UpdateProjectSettings ¶
func (siw *ServerInterfaceWrapper) UpdateProjectSettings(w http.ResponseWriter, r *http.Request)
UpdateProjectSettings operation middleware
func (*ServerInterfaceWrapper) UpdateSegmenter ¶
func (siw *ServerInterfaceWrapper) UpdateSegmenter(w http.ResponseWriter, r *http.Request)
UpdateSegmenter operation middleware
type UpdateExperimentJSONRequestBody ¶
type UpdateExperimentJSONRequestBody UpdateExperimentRequestBody
UpdateExperimentJSONRequestBody defines body for UpdateExperiment for application/json ContentType.
type UpdateExperimentRequestBody ¶
type UpdateExperimentRequestBody struct {
Description *string `json:"description"`
EndTime time.Time `json:"end_time"`
Interval *int32 `json:"interval"`
Segment externalRef0.ExperimentSegment `json:"segment"`
StartTime time.Time `json:"start_time"`
Status externalRef0.ExperimentStatus `json:"status"`
Tier *externalRef0.ExperimentTier `json:"tier,omitempty"`
Treatments []externalRef0.ExperimentTreatment `json:"treatments"`
Type externalRef0.ExperimentType `json:"type"`
UpdatedBy *string `json:"updated_by,omitempty"`
}
UpdateExperimentRequestBody defines model for UpdateExperimentRequestBody.
type UpdateExperimentSuccess ¶
type UpdateExperimentSuccess struct {
Data externalRef0.Experiment `json:"data"`
}
UpdateExperimentSuccess defines model for UpdateExperimentSuccess.
type UpdateProjectSettingsJSONRequestBody ¶
type UpdateProjectSettingsJSONRequestBody UpdateProjectSettingsRequestBody
UpdateProjectSettingsJSONRequestBody defines body for UpdateProjectSettings for application/json ContentType.
type UpdateProjectSettingsRequestBody ¶
type UpdateProjectSettingsRequestBody struct {
EnableS2idClustering *bool `json:"enable_s2id_clustering,omitempty"`
RandomizationKey string `json:"randomization_key"`
Segmenters externalRef0.ProjectSegmenters `json:"segmenters"`
// Object containing information to define a valid treatment schema
TreatmentSchema *externalRef0.TreatmentSchema `json:"treatment_schema,omitempty"`
ValidationUrl *string `json:"validation_url,omitempty"`
}
UpdateProjectSettingsRequestBody defines model for UpdateProjectSettingsRequestBody.
type UpdateProjectSettingsSuccess ¶
type UpdateProjectSettingsSuccess struct {
Data externalRef0.ProjectSettings `json:"data"`
}
UpdateProjectSettingsSuccess defines model for UpdateProjectSettingsSuccess.
type UpdateSegmenterJSONRequestBody ¶
type UpdateSegmenterJSONRequestBody UpdateSegmenterRequestBody
UpdateSegmenterJSONRequestBody defines body for UpdateSegmenter for application/json ContentType.
type UpdateSegmenterRequestBody ¶
type UpdateSegmenterRequestBody struct {
Constraints *[]externalRef0.Constraint `json:"constraints,omitempty"`
Description *string `json:"description,omitempty"`
MultiValued bool `json:"multi_valued"`
Options *externalRef0.SegmenterOptions `json:"options,omitempty"`
Required bool `json:"required"`
}
UpdateSegmenterRequestBody defines model for UpdateSegmenterRequestBody.
type UpdateSegmenterSuccess ¶
type UpdateSegmenterSuccess struct {
Data externalRef0.Segmenter `json:"data"`
}
UpdateSegmenterSuccess defines model for UpdateSegmenterSuccess.