Documentation
¶
Overview ¶
Package client is the supported entry point for the Report Portal API client.
Construct clients and scopes only through this package (for example Client.Project and ProjectScope.Launches). Subpackages such as launch and item exist so scope and option types can be named in function signatures and documentation; they are not a separate public API surface. Do not call domain New*Scope constructors from application code—wire scopes through Client and ProjectScope instead.
Index ¶
- Constants
- Variables
- type APIError
- type ActivityEventsScope
- type ActivityScope
- type BatchLogEntry
- type BugTrackingScope
- type Client
- func (c *Client) ActivityEvents() *ActivityEventsScope
- func (c *Client) Files() *FileStorageScope
- func (c *Client) Groups() *GroupsScope
- func (c *Client) InstanceBugTracking() *InstanceBugTrackingScope
- func (c *Client) Integrations() *IntegrationsScope
- func (c *Client) Onboarding() *OnboardingScope
- func (c *Client) Plugins() *PluginScope
- func (c *Client) Project(name string) *ProjectScope
- func (c *Client) Projects() *ProjectsScope
- func (c *Client) Settings() *SettingsScope
- func (c *Client) Users() *UsersScope
- type DashboardScope
- type DemoDataScope
- type EventSortOrder
- type ExportProjectsOption
- type FileContent
- type FileStorageScope
- type GetAttributeKeysForProjectOption
- type GetLogLocationsOption
- type GetLogPageNumberOption
- type GetMyPhotoOption
- type GetNestedLogsOption
- type GetProjectInfoOption
- type GetUserPhotoOption
- type GetWidgetByCodeOption
- type GetWidgetDataOption
- type GroupsScope
- type HistoryOption
- type InstanceBugTrackingScope
- type IntegrationsScope
- type LaunchScope
- type ListActivitiesOption
- type ListAssignableUsersOption
- type ListClustersOption
- type ListDashboardsOption
- type ListFiltersOption
- type ListGroupProjectsOption
- type ListGroupUsersOption
- type ListGroupsOption
- type ListLaunchesOption
- type ListLogsOption
- type ListProjectGroupsOption
- type ListProjectUsersOption
- type ListProjectsOption
- type ListTestItemsOption
- type ListTestItemsV2Option
- type ListUsersOption
- type LogScope
- type LogTypesScope
- type OnboardingScope
- type Option
- type PluginScope
- type ProjectFilesScope
- type ProjectGroupsScope
- type ProjectIntegrationsScope
- type ProjectScope
- func (p *ProjectScope) Activities() *ActivityScope
- func (p *ProjectScope) BugTracking() *BugTrackingScope
- func (p *ProjectScope) Dashboards() *DashboardScope
- func (p *ProjectScope) DemoData() *DemoDataScope
- func (p *ProjectScope) DownloadFile(ctx context.Context, dataID int64) (*FileContent, error)
- func (p *ProjectScope) Filters() *UserFilterScope
- func (p *ProjectScope) GetUserPhoto(ctx context.Context, login string, options ...GetUserPhotoOption) (*FileContent, error)
- func (p *ProjectScope) Groups() *ProjectGroupsScope
- func (p *ProjectScope) Integrations() *ProjectIntegrationsScope
- func (p *ProjectScope) Items() *TestItemScope
- func (p *ProjectScope) Launches() *LaunchScope
- func (p *ProjectScope) LogTypes() *LogTypesScope
- func (p *ProjectScope) Logs() *LogScope
- func (p *ProjectScope) Settings() *ProjectSettingsScope
- func (p *ProjectScope) Widgets() *WidgetScope
- type ProjectSettingsScope
- type ProjectsScope
- type SearchActivityEventsOption
- type SearchLogLocationsOption
- type SearchTestItemsOption
- type SearchUsernamesOption
- type SearchUsersOption
- type SettingsScope
- type StatisticsOption
- type TestItemScope
- type UnexpectedStatusError
- type UserFilterScope
- type UsersScope
- type WidgetScope
Constants ¶
const ( EventOrderAsc = activity.EventOrderAsc EventOrderDesc = activity.EventOrderDesc )
Variables ¶
var ( IsNotFound = core.IsNotFound IsForbidden = core.IsForbidden IsBadRequest = core.IsBadRequest IsConflict = core.IsConflict IsServerError = core.IsServerError HasStatusCode = core.HasStatusCode HasErrorCode = core.HasErrorCode BodyOf = core.BodyOf WithActivityPageNumber = activity.WithActivityPageNumber WithActivityPageSize = activity.WithActivityPageSize WithActivitySort = activity.WithActivitySort WithAssignableUserPageNumber = projects.WithAssignableUserPageNumber WithAssignableUserPageSize = projects.WithAssignableUserPageSize WithAssignableUserSort = projects.WithAssignableUserSort WithClusterPageNumber = launch.WithClusterPageNumber WithClusterPageSize = launch.WithClusterPageSize WithClusterSort = launch.WithClusterSort WithDashboardPageNumber = dashboard.WithDashboardPageNumber WithDashboardPageSize = dashboard.WithDashboardPageSize WithDashboardSort = dashboard.WithDashboardSort WithEventLimit = activity.WithEventLimit WithEventOffset = activity.WithEventOffset WithEventOrder = activity.WithEventOrder WithEventSort = activity.WithEventSort WithExportFilterLastRun = projects.WithExportFilterLastRun WithExportFilterName = projects.WithExportFilterName WithExportFilterType = projects.WithExportFilterType WithExportView = projects.WithExportView WithFilterPageNumber = filter.WithFilterPageNumber WithFilterPageSize = filter.WithFilterPageSize WithFilterSort = filter.WithFilterSort WithGroupOffset = groups.WithGroupOffset WithGroupOrder = groups.WithGroupOrder WithGroupPageSize = groups.WithGroupPageSize WithGroupProjectOffset = groups.WithGroupProjectOffset WithGroupProjectPageSize = groups.WithGroupProjectPageSize WithGroupSort = groups.WithGroupSort WithGroupUserOffset = groups.WithGroupUserOffset WithGroupUserPageSize = groups.WithGroupUserPageSize WithHistoryDepth = item.WithHistoryDepth WithHistoryFilterID = item.WithHistoryFilterID WithHistoryItemName = item.WithHistoryItemName WithHistoryItemStatus = item.WithHistoryItemStatus WithHistoryLatest = item.WithHistoryLatest WithHistoryLaunchID = item.WithHistoryLaunchID WithHistoryLaunchesLimit = item.WithHistoryLaunchesLimit WithHistoryPageNumber = item.WithHistoryPageNumber WithHistoryPageSize = item.WithHistoryPageSize WithHistoryType = item.WithHistoryType WithItemHasChildren = item.WithItemHasChildren WithItemLaunchID = item.WithItemLaunchID WithItemName = item.WithItemName WithItemPageNumber = item.WithItemPageNumber WithItemPageSize = item.WithItemPageSize WithItemParentID = item.WithItemParentID WithItemPath = item.WithItemPath WithItemSort = item.WithItemSort WithItemStatus = item.WithItemStatus WithItemType = item.WithItemType WithItemV2LaunchID = item.WithItemV2LaunchID WithItemV2Name = item.WithItemV2Name WithItemV2PageNumber = item.WithItemV2PageNumber WithItemV2PageSize = item.WithItemV2PageSize WithItemV2ParentID = item.WithItemV2ParentID WithItemV2Sort = item.WithItemV2Sort WithItemV2Status = item.WithItemV2Status WithLaunchAttribute = launch.WithLaunchAttribute WithLaunchAttributeKey = launch.WithLaunchAttributeKey WithLaunchDescription = launch.WithLaunchDescription WithLaunchHasRetries = launch.WithLaunchHasRetries WithLaunchMode = launch.WithLaunchMode WithLaunchName = launch.WithLaunchName WithLaunchNumber = launch.WithLaunchNumber WithLaunchPageNumber = launch.WithLaunchPageNumber WithLaunchPageSize = launch.WithLaunchPageSize WithLaunchSort = launch.WithLaunchSort WithLaunchStatus = launch.WithLaunchStatus WithLaunchUser = launch.WithLaunchUser WithLaunchUserID = launch.WithLaunchUserID WithLogItemID = log.WithLogItemID WithLogLaunchID = log.WithLogLaunchID WithLogLevel = log.WithLogLevel WithLogLocationsPageNumber = log.WithLogLocationsPageNumber WithLogLocationsPageSize = log.WithLogLocationsPageSize WithLogPageItemID = log.WithLogPageItemID WithLogPageNumber = log.WithLogPageNumber WithLogPageNumberPageSize = log.WithLogPageNumberPageSize WithLogPageNumberSort = log.WithLogPageNumberSort WithLogPageSize = log.WithLogPageSize WithLogSort = log.WithLogSort WithNestedLogsPageNumber = log.WithNestedLogsPageNumber WithNestedLogsPageSize = log.WithNestedLogsPageSize WithPhotoThumbnail = files.WithPhotoThumbnail WithProjectGroupPageOffset = groups.WithProjectGroupPageOffset WithProjectGroupPageSize = groups.WithProjectGroupPageSize WithProjectInfoInterval = projects.WithProjectInfoInterval WithProjectKeysLatest = item.WithProjectKeysLatest WithProjectKeysLaunchesLimit = item.WithProjectKeysLaunchesLimit WithProjectName = projects.WithProjectName WithProjectPageNumber = projects.WithProjectPageNumber WithProjectPageSize = projects.WithProjectPageSize WithProjectSort = projects.WithProjectSort WithProjectType = projects.WithProjectType WithSearchItemAttribute = item.WithSearchItemAttribute WithSearchItemName = item.WithSearchItemName WithSearchItemPageNumber = item.WithSearchItemPageNumber WithSearchItemPageSize = item.WithSearchItemPageSize WithSearchItemSort = item.WithSearchItemSort WithSearchItemStatus = item.WithSearchItemStatus WithSearchLogLocationsPageNumber = log.WithSearchLogLocationsPageNumber WithSearchLogLocationsPageSize = log.WithSearchLogLocationsPageSize WithSearchUsernamesPageNumber = projects.WithSearchUsernamesPageNumber WithSearchUsernamesPageSize = projects.WithSearchUsernamesPageSize WithSearchUsernamesSort = projects.WithSearchUsernamesSort WithSearchUsersPageNumber = users.WithSearchUsersPageNumber WithSearchUsersPageSize = users.WithSearchUsersPageSize WithSearchUsersSort = users.WithSearchUsersSort WithStatisticsHasChildren = item.WithStatisticsHasChildren WithStatisticsLaunchID = item.WithStatisticsLaunchID WithStatisticsName = item.WithStatisticsName WithStatisticsParentID = item.WithStatisticsParentID WithStatisticsStatus = item.WithStatisticsStatus WithStatisticsType = item.WithStatisticsType WithUserPageNumber = projects.WithUserPageNumber WithUserPageSize = projects.WithUserPageSize WithUserPhotoThumbnail = files.WithUserPhotoThumbnail WithUserSort = projects.WithUserSort WithUsersActive = users.WithUsersActive WithUsersEmail = users.WithUsersEmail WithUsersPageNumber = users.WithUsersPageNumber WithUsersPageSize = users.WithUsersPageSize WithUsersRole = users.WithUsersRole WithUsersSort = users.WithUsersSort WithUsersType = users.WithUsersType WithWidgetAttributes = widget.WithWidgetAttributes WithWidgetInterval = projects.WithWidgetInterval NewEventSearchCriteria = activity.NewEventSearchCriteria EventFilterByUser = activity.EventFilterByUser EventFilterByObjectType = activity.EventFilterByObjectType EventFilterByEventName = activity.EventFilterByEventName EventFilterByProjectName = activity.EventFilterByProjectName ParseErrorBody = core.ParseErrorBody )
Functions ¶
This section is empty.
Types ¶
type ActivityEventsScope ¶
type ActivityEventsScope = activity.ActivityEventsScope
type ActivityScope ¶
type ActivityScope = activity.ActivityScope
type BatchLogEntry ¶
type BatchLogEntry = log.BatchLogEntry
type BugTrackingScope ¶
type BugTrackingScope = bts.BugTrackingScope
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a high-level wrapper around the generated Report Portal API client.
func New ¶
New creates a new Client for the given Report Portal instance. It is tolerant of many baseURLs and will accept with or without a scheme and ensures it ends in /api. The bearerToken must be non-empty and is sent as an Authorization header on every request.
func (*Client) ActivityEvents ¶
func (c *Client) ActivityEvents() *ActivityEventsScope
ActivityEvents returns an ActivityEventsScope for instance-level activity event queries.
func (*Client) Files ¶
func (c *Client) Files() *FileStorageScope
Files returns a FileStorageScope for instance-level file storage operations.
func (*Client) Groups ¶
func (c *Client) Groups() *GroupsScope
Groups returns a GroupsScope for instance-level group operations.
func (*Client) InstanceBugTracking ¶
func (c *Client) InstanceBugTracking() *InstanceBugTrackingScope
InstanceBugTracking returns an InstanceBugTrackingScope for instance-level BTS operations.
func (*Client) Integrations ¶
func (c *Client) Integrations() *IntegrationsScope
Integrations returns an IntegrationsScope for instance-level global integration operations.
func (*Client) Onboarding ¶
func (c *Client) Onboarding() *OnboardingScope
Onboarding returns an OnboardingScope for first-run onboarding operations.
func (*Client) Plugins ¶
func (c *Client) Plugins() *PluginScope
Plugins returns a PluginScope for instance-level plugin operations.
func (*Client) Project ¶
func (c *Client) Project(name string) *ProjectScope
Project returns a ProjectScope for the named project. It never returns nil.
func (*Client) Projects ¶
func (c *Client) Projects() *ProjectsScope
Projects returns a ProjectsScope for instance-level project operations.
func (*Client) Settings ¶
func (c *Client) Settings() *SettingsScope
Settings returns a SettingsScope for server-level settings operations.
func (*Client) Users ¶
func (c *Client) Users() *UsersScope
Users returns a UsersScope for instance-level user operations.
type DashboardScope ¶
type DashboardScope = dashboard.DashboardScope
type DemoDataScope ¶
type DemoDataScope = demodata.DemoDataScope
type EventSortOrder ¶
type EventSortOrder = activity.EventSortOrder
type ExportProjectsOption ¶
type ExportProjectsOption = projects.ExportProjectsOption
type FileContent ¶
type FileContent = files.FileContent
type FileStorageScope ¶
type FileStorageScope = files.FileStorageScope
type GetAttributeKeysForProjectOption ¶
type GetAttributeKeysForProjectOption = item.GetAttributeKeysForProjectOption
type GetLogLocationsOption ¶
type GetLogLocationsOption = log.GetLogLocationsOption
type GetLogPageNumberOption ¶
type GetLogPageNumberOption = log.GetLogPageNumberOption
type GetMyPhotoOption ¶
type GetMyPhotoOption = files.GetMyPhotoOption
type GetNestedLogsOption ¶
type GetNestedLogsOption = log.GetNestedLogsOption
type GetProjectInfoOption ¶
type GetProjectInfoOption = projects.GetProjectInfoOption
type GetUserPhotoOption ¶
type GetUserPhotoOption = files.GetUserPhotoOption
type GetWidgetByCodeOption ¶
type GetWidgetByCodeOption = projects.GetWidgetByCodeOption
type GetWidgetDataOption ¶
type GetWidgetDataOption = widget.GetWidgetDataOption
type GroupsScope ¶
type GroupsScope = groups.GroupsScope
type HistoryOption ¶
type HistoryOption = item.HistoryOption
type InstanceBugTrackingScope ¶
type InstanceBugTrackingScope = bts.InstanceBugTrackingScope
type IntegrationsScope ¶
type IntegrationsScope = integrations.IntegrationsScope
type LaunchScope ¶
type LaunchScope = launch.LaunchScope
type ListActivitiesOption ¶
type ListActivitiesOption = activity.ListActivitiesOption
type ListAssignableUsersOption ¶
type ListAssignableUsersOption = projects.ListAssignableUsersOption
type ListClustersOption ¶
type ListClustersOption = launch.ListClustersOption
type ListDashboardsOption ¶
type ListDashboardsOption = dashboard.ListDashboardsOption
type ListFiltersOption ¶
type ListFiltersOption = filter.ListFiltersOption
type ListGroupProjectsOption ¶
type ListGroupProjectsOption = groups.ListGroupProjectsOption
type ListGroupUsersOption ¶
type ListGroupUsersOption = groups.ListGroupUsersOption
type ListGroupsOption ¶
type ListGroupsOption = groups.ListGroupsOption
type ListLaunchesOption ¶
type ListLaunchesOption = launch.ListLaunchesOption
type ListLogsOption ¶
type ListLogsOption = log.ListLogsOption
type ListProjectGroupsOption ¶
type ListProjectGroupsOption = groups.ListProjectGroupsOption
type ListProjectUsersOption ¶
type ListProjectUsersOption = projects.ListProjectUsersOption
type ListProjectsOption ¶
type ListProjectsOption = projects.ListProjectsOption
type ListTestItemsOption ¶
type ListTestItemsOption = item.ListTestItemsOption
type ListTestItemsV2Option ¶
type ListTestItemsV2Option = item.ListTestItemsV2Option
type ListUsersOption ¶
type ListUsersOption = users.ListUsersOption
type LogTypesScope ¶
type LogTypesScope = logtypes.LogTypesScope
type OnboardingScope ¶
type OnboardingScope = onboarding.OnboardingScope
type Option ¶
type Option func(*config) error
Option configures the Client during construction.
func WithHTTPClient ¶
WithHTTPClient overrides the default HTTP client used for requests.
func WithLogger ¶
WithLogger configures the logger used by the client for structured diagnostic output. If not set, the client defaults to discarding all log output.
type PluginScope ¶
type PluginScope = plugin.PluginScope
type ProjectFilesScope ¶
type ProjectFilesScope = files.ProjectFilesScope
type ProjectGroupsScope ¶
type ProjectGroupsScope = groups.ProjectGroupsScope
type ProjectIntegrationsScope ¶
type ProjectIntegrationsScope = integrations.ProjectIntegrationsScope
type ProjectScope ¶
type ProjectScope struct {
// contains filtered or unexported fields
}
ProjectScope provides access to resources within a specific Report Portal project.
func (*ProjectScope) Activities ¶
func (p *ProjectScope) Activities() *ActivityScope
Activities returns an ActivityScope for querying activity logs in this project.
func (*ProjectScope) BugTracking ¶
func (p *ProjectScope) BugTracking() *BugTrackingScope
BugTracking returns a BugTrackingScope for BTS operations in this project.
func (*ProjectScope) Dashboards ¶
func (p *ProjectScope) Dashboards() *DashboardScope
Dashboards returns a DashboardScope for managing dashboards in this project.
func (*ProjectScope) DemoData ¶
func (p *ProjectScope) DemoData() *DemoDataScope
DemoData returns a DemoDataScope for generating demo data in this project.
func (*ProjectScope) DownloadFile ¶
func (p *ProjectScope) DownloadFile( ctx context.Context, dataID int64, ) (*FileContent, error)
DownloadFile downloads a file attachment by its numeric data store ID.
func (*ProjectScope) Filters ¶
func (p *ProjectScope) Filters() *UserFilterScope
Filters returns a UserFilterScope for managing user filters in this project.
func (*ProjectScope) GetUserPhoto ¶
func (p *ProjectScope) GetUserPhoto( ctx context.Context, login string, options ...GetUserPhotoOption, ) (*FileContent, error)
GetUserPhoto retrieves a user's profile photo by login within this project.
func (*ProjectScope) Groups ¶
func (p *ProjectScope) Groups() *ProjectGroupsScope
Groups returns a ProjectGroupsScope for managing group-project associations in this project.
func (*ProjectScope) Integrations ¶
func (p *ProjectScope) Integrations() *ProjectIntegrationsScope
Integrations returns a ProjectIntegrationsScope for managing integrations in this project.
func (*ProjectScope) Items ¶
func (p *ProjectScope) Items() *TestItemScope
Items returns a TestItemScope for querying test items in this project.
func (*ProjectScope) Launches ¶
func (p *ProjectScope) Launches() *LaunchScope
Launches returns a LaunchScope for querying launches in this project.
func (*ProjectScope) LogTypes ¶
func (p *ProjectScope) LogTypes() *LogTypesScope
LogTypes returns a LogTypesScope for managing log types in this project.
func (*ProjectScope) Logs ¶
func (p *ProjectScope) Logs() *LogScope
Logs returns a LogScope for querying log entries in this project.
func (*ProjectScope) Settings ¶
func (p *ProjectScope) Settings() *ProjectSettingsScope
Settings returns a ProjectSettingsScope for reading configuration of this project.
func (*ProjectScope) Widgets ¶
func (p *ProjectScope) Widgets() *WidgetScope
Widgets returns a WidgetScope for managing widgets in this project.
type ProjectSettingsScope ¶
type ProjectSettingsScope = settings.ProjectSettingsScope
type ProjectsScope ¶
type ProjectsScope = projects.ProjectsScope
type SearchActivityEventsOption ¶
type SearchActivityEventsOption = activity.SearchActivityEventsOption
type SearchLogLocationsOption ¶
type SearchLogLocationsOption = log.SearchLogLocationsOption
type SearchTestItemsOption ¶
type SearchTestItemsOption = item.SearchTestItemsOption
type SearchUsernamesOption ¶
type SearchUsernamesOption = projects.SearchUsernamesOption
type SearchUsersOption ¶
type SearchUsersOption = users.SearchUsersOption
type SettingsScope ¶
type SettingsScope = settings.SettingsScope
type StatisticsOption ¶
type StatisticsOption = item.StatisticsOption
type TestItemScope ¶
type TestItemScope = item.TestItemScope
type UnexpectedStatusError ¶
type UnexpectedStatusError = core.UnexpectedStatusError
type UserFilterScope ¶
type UserFilterScope = filter.UserFilterScope
type UsersScope ¶
type UsersScope = users.UsersScope
type WidgetScope ¶
type WidgetScope = widget.WidgetScope
Directories
¶
| Path | Synopsis |
|---|---|
|
internal
|
|
|
clienttest
Package clienttest provides helpers for unit tests of pkg/client and its subpackages.
|
Package clienttest provides helpers for unit tests of pkg/client and its subpackages. |