Documentation ¶
Index ¶
- Variables
- type AddWidgetRequest
- type Client
- func (c *Client) AddWidgetIntoDashboard(projectName string, dashboardId *int, widget *Widget) error
- func (c *Client) CreateAuthLdapSettings(config *LdapIntegrationParameters) (*LdapSettings, error)
- func (c *Client) CreateDashboard(d CreateDashboardRequest) (*int, error)
- func (c *Client) CreateFilterByProject(projectName string, filter *Filter) (*CreateFilterByProjectResponse, error)
- func (c *Client) CreateProject(projectName *string) (*CreateProjectResponse, error)
- func (c *Client) CreateWidgetByProject(projectName *string, widgetParameters *WidgetInputPayload) (*WidgetCreationResponseModel, error)
- func (c *Client) DeleteDashboardById(projectName *string, dashboardId *int) error
- func (c *Client) DeleteFilterByProjectAndId(projectName string, filterId int) error
- func (c *Client) DeleteIntegration(id *int) error
- func (c *Client) DeleteProject(projectId *int) error
- func (c *Client) GetAllProjects() (*GetAllProjectsResponse, error)
- func (c *Client) GetDashboardById(projectName string, dashboardId *int) (*GetDashboardByIdResponse, error)
- func (c *Client) GetFilterByProjectAndId(projectName string, filterId int) (*Filter, error)
- func (c *Client) GetFiltersByProject(projectName string, filter *FilterQuery, pagination *PaginationQuery) (*GetFiltersByProjectResponse, error)
- func (c *Client) GetProjectByName(projectName *string) (*GetProjectByNameResponse, error)
- func (c *Client) ReadFullWidgetDataByProjectName(projectName *string, widgetId *string) (*FullWidgetModel, error)
- func (c *Client) ReadLdapAuthSettings() (*LdapSettings, error)
- func (c *Client) UpdateAuthLdapSettings(config *LdapIntegrationParameters) (*LdapSettings, error)
- func (c *Client) UpdateDashboard(updateDashboardRequest *UpdateDashboardRequest) error
- func (c *Client) UpdateFilterByProjectAndId(projectName string, filter Filter) error
- func (c *Client) UpdateWidgetByProject(projectName *string, widgetId *string, widgetParameters *WidgetInputPayload) error
- type Condition
- type CreateDashboardRequest
- type CreateDashboardResponse
- type CreateFilterByProjectResponse
- type CreateProjectRequest
- type CreateProjectResponse
- type Filter
- type FilterQuery
- type FullWidgetModel
- type GetAllProjectsResponse
- type GetDashboardByIdResponse
- type GetFiltersByProjectResponse
- type GetProjectByNameResponse
- type HttpClient
- type LaunchPerUser
- type LdapIntegrationParameters
- type LdapIntegrationPayload
- type LdapSettings
- type Order
- type PaginationQuery
- type PaginationResponse
- type Project
- type ReportPortalClientConfig
- type UpdateDashboardRequest
- type Widget
- type WidgetContentParameters
- type WidgetCreationResponseModel
- type WidgetInputPayload
Constants ¶
This section is empty.
Variables ¶
View Source
var PasswordEncryptionTypes = []string{"PLAIN", "SHA", "LDAP_SHA", "MD4", "MD5"}
View Source
var WidgetCriteria = map[string]string{
"Total": "statistics$executions$total",
"Passed": "statistics$executions$passed",
"Failed": "statistics$executions$failed",
"Skipped": "statistics$executions$skipped",
"Product Bug": "statistics$defects$product_bug$pb001",
"Automation Bug": "statistics$defects$automation_bug$ab001",
"System Issue": "statistics$defects$system_issue$si001",
"No Defect": "statistics$defects$no_defect$nd001",
"To Investigate": "statistics$defects$to_investigate$ti001",
"Product Bug Total": "statistics$defects$product_bug$total",
"Automation Bug Total": "statistics$defects$automation_bug$total",
"System Issue Total": "statistics$defects$system_issue$total",
"No Defect Total": "statistics$defects$no_defect$total",
"To Investigate Total": "statistics$defects$to_investigate$total",
"Start time": "startTime",
"End Time": "endTime",
"Name": "name",
"Number": "number",
"Status": "status",
}
View Source
var WidgetModes = map[string]string{
"Launch": "launch",
"timeline": "day",
}
View Source
var WidgetTypes = map[string]string{
"oldLineChart": "oldLineChart",
"Launch statistics chart": "statisticTrend",
"Launch duration chart": "launchesDurationChart",
"Failed cases trend chart": "bugTrend",
"Overall statistics": "overallStatistics",
"Most failed test-cases table (TOP-20)": "topTestCases",
"Flaky test cases table (TOP-20)": "flakyTestCases",
}
View Source
var WidgetVisualizationOptions = map[string]string{
"Area": "area-spline",
"Bars": "bars",
}
Functions ¶
This section is empty.
Types ¶
type AddWidgetRequest ¶
type AddWidgetRequest struct {
AddWidget Widget `json:"addWidget"`
}
type Client ¶
type Client struct { HostUrl string HTTPClient HttpClient Token string }
func NewClient ¶
func NewClient(config *ReportPortalClientConfig, httpClient HttpClient) (*Client, error)
func (*Client) AddWidgetIntoDashboard ¶
func (*Client) CreateAuthLdapSettings ¶
func (c *Client) CreateAuthLdapSettings(config *LdapIntegrationParameters) (*LdapSettings, error)
func (*Client) CreateDashboard ¶
func (c *Client) CreateDashboard(d CreateDashboardRequest) (*int, error)
func (*Client) CreateFilterByProject ¶
func (c *Client) CreateFilterByProject(projectName string, filter *Filter) (*CreateFilterByProjectResponse, error)
func (*Client) CreateProject ¶
func (c *Client) CreateProject(projectName *string) (*CreateProjectResponse, error)
func (*Client) CreateWidgetByProject ¶
func (c *Client) CreateWidgetByProject(projectName *string, widgetParameters *WidgetInputPayload) (*WidgetCreationResponseModel, error)
func (*Client) DeleteDashboardById ¶
func (*Client) DeleteFilterByProjectAndId ¶
func (*Client) DeleteIntegration ¶
func (*Client) DeleteProject ¶
func (*Client) GetAllProjects ¶
func (c *Client) GetAllProjects() (*GetAllProjectsResponse, error)
func (*Client) GetDashboardById ¶
func (c *Client) GetDashboardById(projectName string, dashboardId *int) (*GetDashboardByIdResponse, error)
func (*Client) GetFilterByProjectAndId ¶
func (*Client) GetFiltersByProject ¶
func (c *Client) GetFiltersByProject(projectName string, filter *FilterQuery, pagination *PaginationQuery) (*GetFiltersByProjectResponse, error)
func (*Client) GetProjectByName ¶
func (c *Client) GetProjectByName(projectName *string) (*GetProjectByNameResponse, error)
func (*Client) ReadFullWidgetDataByProjectName ¶
func (c *Client) ReadFullWidgetDataByProjectName(projectName *string, widgetId *string) (*FullWidgetModel, error)
func (*Client) ReadLdapAuthSettings ¶
func (c *Client) ReadLdapAuthSettings() (*LdapSettings, error)
func (*Client) UpdateAuthLdapSettings ¶
func (c *Client) UpdateAuthLdapSettings(config *LdapIntegrationParameters) (*LdapSettings, error)
func (*Client) UpdateDashboard ¶
func (c *Client) UpdateDashboard(updateDashboardRequest *UpdateDashboardRequest) error
func (*Client) UpdateFilterByProjectAndId ¶
func (*Client) UpdateWidgetByProject ¶
func (c *Client) UpdateWidgetByProject(projectName *string, widgetId *string, widgetParameters *WidgetInputPayload) error
type CreateDashboardRequest ¶
type CreateDashboardResponse ¶
type CreateDashboardResponse struct {
Id int `json:"id"`
}
type CreateFilterByProjectResponse ¶
type CreateFilterByProjectResponse struct {
Id int `json:"id"`
}
type CreateProjectRequest ¶
type CreateProjectResponse ¶
type CreateProjectResponse struct {
Id int `json:"id"`
}
type FilterQuery ¶
type FullWidgetModel ¶
type FullWidgetModel struct { AppliedFilters []Filter `json:"appliedFilters"` // TODO: Content may be never be used in TF, but could be useful for a generic RP client //Content struct{} `json:"content"` ContentParameters WidgetContentParameters `json:"contentParameters"` Description string `json:"description"` Id int `json:"id"` Name string `json:"name"` Owner string `json:"owner"` WidgetType string `json:"widgetType"` }
type GetAllProjectsResponse ¶
type GetAllProjectsResponse struct {
Content []Project `json:"content"`
}
type GetFiltersByProjectResponse ¶
type GetFiltersByProjectResponse struct { Content []Filter `json:"content"` Page PaginationResponse `json:"page"` }
type GetProjectByNameResponse ¶
type GetProjectByNameResponse struct { Project LaunchesPerUser []LaunchPerUser `json:"launchesPerUser"` LaunchesPerWeek string `json:"launchesPerWeek"` LaunchesQuantity int `json:"launchesQuantity"` Organization string `json:"organization"` UniqueTickets int `json:"uniqueTickets"` UsersQuantity int `json:"usersQuantity"` }
type LaunchPerUser ¶
type LdapIntegrationParameters ¶
type LdapIntegrationParameters struct { Enabled bool `json:"-"` PasswordEncoderType string `json:"passwordEncoderType"` Url string `json:"url"` BaseDn string `json:"baseDn"` Email string `json:"email"` UserDnPattern string `json:"userDnPattern"` UserSearchFilter string `json:"userSearchFilter"` GroupSearchBase string `json:"groupSearchBase"` GroupSearchFilter string `json:"groupSearchFilter"` PasswordAttribute string `json:"passwordAttribute"` FullName string `json:"fullName"` Photo string `json:"photo"` ManagerDn string `json:"managerDn"` ManagerPassword string `json:"managerPassword"` }
type LdapIntegrationPayload ¶
type LdapIntegrationPayload struct { Enabled bool `json:"enabled"` IntegrationParameters *LdapIntegrationParameters `json:"integrationParameters"` Name string `json:"name"` }
type LdapSettings ¶
type LdapSettings struct { Id *int `json:"id"` LdapAttributes struct { Enabled *bool `json:"enabled"` Url *string `json:"url"` BaseDn *string `json:"baseDn"` SynchronizationAttributes struct { Email *string `json:"email"` FullName *string `json:"fullName"` Photo *string `json:"photo"` } `json:"synchronizationAttributes"` } `json:"ldapAttributes"` UserDnPattern *string `json:"userDnPattern"` UserSearchFilter *string `json:"userSearchFilter"` GroupSearchBase *string `json:"groupSearchBase"` GroupSearchFilter *string `json:"groupSearchFilter"` PasswordEncoderType *string `json:"passwordEncoderType"` PasswordAttribute *string `json:"passwordAttribute"` ManagerDn *string `json:"managerDn"` ManagerPassword *string `json:"managerPassword"` }
func (*LdapSettings) String ¶
func (l *LdapSettings) String()
type PaginationQuery ¶
type PaginationResponse ¶
type ReportPortalClientConfig ¶
type ReportPortalClientConfig struct {
Username, Password, Host string
}
type UpdateDashboardRequest ¶
type UpdateDashboardRequest struct { DashboardId int `json:"-"` UpdateWidgets []Widget `json:"updateWidgets"` CreateDashboardRequest }
type Widget ¶
type Widget struct { WidgetId int `json:"widgetId"` WidgetName string `json:"widgetName"` WidgetPosition struct { PositionX int `json:"positionX"` PositionY int `json:"positionY"` } `json:"widgetPosition"` WidgetSize struct { Height int `json:"height"` Width int `json:"width"` } `json:"widgetSize"` WidgetType string `json:"widgetType"` }
type WidgetContentParameters ¶
type WidgetCreationResponseModel ¶
type WidgetCreationResponseModel struct {
Id int `json:"id"`
}
type WidgetInputPayload ¶
type WidgetInputPayload struct { ContentParameters WidgetContentParameters `json:"contentParameters"` Description string `json:"description"` FilterIds []interface{} `json:"filterIds"` Name string `json:"name"` WidgetType string `json:"widgetType"` }
Click to show internal directories.
Click to hide internal directories.