client

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2026 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HttpPost   = "POST"
	HttpPut    = "PUT"
	HttpDelete = "DELETE"
)

Variables

View Source
var (
	ErrBadRequest = fmt.Errorf("bad request")
	ErrNotFound   = fmt.Errorf("not found")
	ErrInternal   = fmt.Errorf("internal error")
)

Functions

func AddHarnessAccountToHeaders

func AddHarnessAccountToHeaders(ctx context.Context, scope dto.Scope, headers map[string]string)

func ExtractTicketingToolValue

func ExtractTicketingToolValue(ctx context.Context, resp dto.CCMTicketToolSettingsResponse) (string, error)

Types

type ACLService

type ACLService struct {
	Client *Client
}

func (*ACLService) CreateRole

func (cRole *ACLService) CreateRole(ctx context.Context, scope dto.Scope, opts *dto.Role) (*dto.AccessControlOutput[dto.CreateRoleOutputData], error)

func (*ACLService) CreateRoleAssignment

func (*ACLService) DeleteRole

func (dRole *ACLService) DeleteRole(ctx context.Context, scope dto.Scope, roleIdentifier string) (*dto.AccessControlOutput[dto.RoleInfoOutputData], error)

func (*ACLService) DeleteRoleAssignment

func (dRoleAssignment *ACLService) DeleteRoleAssignment(ctx context.Context, scope dto.Scope, roleAssignmentIdentifier string) (*dto.AccessControlOutput[dto.RoleAssignmentsOutputDataContent], error)

func (*ACLService) GetRoleInfo

func (u *ACLService) GetRoleInfo(ctx context.Context, scope dto.Scope, roleID string) (*dto.AccessControlOutput[dto.RoleInfoOutputData], error)

func (*ACLService) ListAvailablePermissions

func (p *ACLService) ListAvailablePermissions(ctx context.Context, scope dto.Scope, page int, size int) (*dto.AccessControlOutput[[]dto.PermissionsOutputData], error)

func (*ACLService) ListAvailableRoles

func (r *ACLService) ListAvailableRoles(ctx context.Context, scope dto.Scope, page int, size int) (*dto.AccessControlOutput[dto.RolesOutputData], error)

func (*ACLService) ListRoleAssignmentsTool

func (ra *ACLService) ListRoleAssignmentsTool(ctx context.Context, scope dto.Scope, page int, size int, opts *dto.RoleAssignmentRequestBody, resourceGroupNames []string, roleNames []string, principalTypes string, principalScopeLevelFilter string, principalFilter []dto.RoleAssignmentPrincipalFilter) (*dto.AccessControlOutput[dto.RoleAssignmentsOutputData], error)

type AIInsightsService

type AIInsightsService struct {
	Client  *Client
	BaseURL string
	Secret  string
}

AIInsightsService handles communication with the SEI AI Insights API (sei-panorama-api)

func NewAIInsightsService

func NewAIInsightsService(client *Client, baseURL, secret string) *AIInsightsService

NewAIInsightsService creates a new AIInsightsService with the given client and baseURL

func (*AIInsightsService) GetAIAdoptions

func (s *AIInsightsService) GetAIAdoptions(ctx context.Context, params map[string]interface{}) (interface{}, error)

GetAIAdoptions retrieves adoption metrics for AI coding assistants POST /v2/insights/coding-assistant/adoptions

func (*AIInsightsService) GetAIAdoptionsBreakdown

func (s *AIInsightsService) GetAIAdoptionsBreakdown(ctx context.Context, params map[string]interface{}) (interface{}, error)

GetAIAdoptionsBreakdown retrieves adoption breakdown by child teams POST /v2/insights/coding-assistant/adoptions/breakdown

func (*AIInsightsService) GetAIAdoptionsSummary

func (s *AIInsightsService) GetAIAdoptionsSummary(ctx context.Context, params map[string]interface{}) (interface{}, error)

GetAIAdoptionsSummary retrieves adoption summary with period comparison POST /v2/insights/coding-assistant/adoptions/summary

func (*AIInsightsService) GetAIPRVelocitySummary

func (s *AIInsightsService) GetAIPRVelocitySummary(ctx context.Context, params map[string]interface{}) (interface{}, error)

GetAIPRVelocitySummary retrieves PR velocity comparison (AI-assisted vs non-AI-assisted) POST /v2/insights/coding-assistant/pr-velocity/summary

func (*AIInsightsService) GetAIRawMetrics

func (s *AIInsightsService) GetAIRawMetrics(ctx context.Context, params map[string]interface{}) (interface{}, error)

GetAIRawMetrics retrieves paginated raw metrics for AI coding assistants POST /v2/insights/coding-assistant/raw_metrics

func (*AIInsightsService) GetAIRawMetricsV2

func (s *AIInsightsService) GetAIRawMetricsV2(ctx context.Context, params map[string]interface{}) (interface{}, error)

GetAIRawMetricsV2 retrieves paginated raw metrics (v2) with enhanced filtering POST /v2/insights/coding-assistant/raw_metrics/v2

func (*AIInsightsService) GetAIReworkSummary

func (s *AIInsightsService) GetAIReworkSummary(ctx context.Context, params map[string]interface{}) (interface{}, error)

GetAIReworkSummary retrieves rework comparison (AI-assisted vs non-AI-assisted) POST /v2/insights/coding-assistant/rework/summary

func (*AIInsightsService) GetAITopLanguages

func (s *AIInsightsService) GetAITopLanguages(ctx context.Context, params map[string]interface{}) (interface{}, error)

GetAITopLanguages retrieves top programming languages used with AI assistants POST /v2/insights/coding-assistant/usage/top_languages

func (*AIInsightsService) GetAIUsageBreakdown

func (s *AIInsightsService) GetAIUsageBreakdown(ctx context.Context, params map[string]interface{}) (interface{}, error)

GetAIUsageBreakdown retrieves team breakdown metrics for AI coding assistants POST /v2/insights/coding-assistant/usage/breakdown

func (*AIInsightsService) GetAIUsageMetrics

func (s *AIInsightsService) GetAIUsageMetrics(ctx context.Context, params map[string]interface{}) (interface{}, error)

GetAIUsageMetrics retrieves feature metrics for AI coding assistants POST /v2/insights/coding-assistant/usage/metrics

func (*AIInsightsService) GetAIUsageSummary

func (s *AIInsightsService) GetAIUsageSummary(ctx context.Context, params map[string]interface{}) (interface{}, error)

GetAIUsageSummary retrieves summary statistics for AI coding assistants POST /v2/insights/coding-assistant/usage/summary

type AuditService

type AuditService struct {
	Client *Client
}

func (*AuditService) GetAuditYaml

func (a *AuditService) GetAuditYaml(ctx context.Context, scope dto.Scope, auditID string) (*dto.AuditYamlResponse, error)

ListUserAuditTrail fetches the audit trail. GetAuditYaml fetches the YAML diff for a specific audit event

func (*AuditService) ListUserAuditTrail

func (a *AuditService) ListUserAuditTrail(ctx context.Context, scope dto.Scope, userIDList string, actionsList string, page int, size int, startTime int64, endTime int64, opts *dto.ListAuditEventsFilter) (*dto.AuditOutput[dto.AuditListItem], error)

type ChaosService

type ChaosService struct {
	Client *Client
}

func (*ChaosService) CreateExperimentFromTemplateRequest

func (c *ChaosService) CreateExperimentFromTemplateRequest(ctx context.Context, scope dto.Scope, templateID, hubIdentity string, request dto.CreateExperimentFromTemplateRequest) (*dto.ExperimentCreationResponse, error)

func (*ChaosService) GetExperiment

func (c *ChaosService) GetExperiment(ctx context.Context, scope dto.Scope, experimentID string) (*dto.GetExperimentResponse, error)

func (*ChaosService) GetExperimentRun

func (c *ChaosService) GetExperimentRun(ctx context.Context, scope dto.Scope, experimentID, experimentRunID string) (*dto.ChaosExecutionResponse, error)

func (*ChaosService) GetProbe

func (c *ChaosService) GetProbe(ctx context.Context, scope dto.Scope, probeID string) (*dto.GetProbeResponse, error)

func (*ChaosService) ListExperimentTemplates

func (c *ChaosService) ListExperimentTemplates(ctx context.Context, scope dto.Scope, pagination *dto.PaginationOptions, hubIdentity string, infrastructureType string) (*dto.ListExperimentTemplateResponse, error)

func (*ChaosService) ListExperimentVariables

func (c *ChaosService) ListExperimentVariables(ctx context.Context, scope dto.Scope, experimentID string) (*dto.ListExperimentVariables, error)

func (*ChaosService) ListExperiments

func (c *ChaosService) ListExperiments(ctx context.Context, scope dto.Scope, pagination *dto.PaginationOptions) (*dto.ListExperimentResponse, error)

func (*ChaosService) ListLinuxInfrastructures

func (c *ChaosService) ListLinuxInfrastructures(ctx context.Context, scope dto.Scope, statusFilter string) (*dto.ListLinuxInfraResponse, error)

ListLinuxInfrastructures lists available Linux infrastructure (load runners). statusFilter controls the status filter: non-empty values filter by that status, empty string omits the filter.

func (*ChaosService) ListProbes

func (c *ChaosService) ListProbes(ctx context.Context, scope dto.Scope, pagination *dto.PaginationOptions) (*dto.ListProbeResponse, error)

func (*ChaosService) RunExperiment

func (c *ChaosService) RunExperiment(ctx context.Context, scope dto.Scope, experimentID string, request *dto.ExperimentRunRequest) (*dto.RunChaosExperimentResponse, error)

type Client

type Client struct {

	// Base URL for API requests. Defaults to the public Harness API, but can be
	// set to a domain endpoint to use with custom Harness installations
	BaseURL *url.URL

	// AuthProvider used for authentication
	AuthProvider auth.Provider

	// UserAgent is the User-Agent header string sent with requests
	UserAgent string
	// contains filtered or unexported fields
}

func NewWithAuthProvider

func NewWithAuthProvider(uri string, authProvider auth.Provider, version string, timeout ...time.Duration) (*Client, error)

NewWithAuthProvider creates a new client with the specified base URL, auth provider, and optional version If version is an empty string, "unknown" will be used in the User-Agent header

func (*Client) Delete

func (c *Client) Delete(
	ctx context.Context,
	path string,
	params map[string]string,
	body interface{},
	out interface{},
	b ...backoff.BackOff,
) error

Delete is a simple helper that builds up the request URL, adding the path and parameters. The response from the request is unmarshalled into the out parameter.

func (*Client) DeleteRaw

func (c *Client) DeleteRaw(
	ctx context.Context,
	path string,
	params map[string]string,
	body io.Reader,
	headers map[string]string,
	out interface{},
	b ...backoff.BackOff,
) error

DeleteRaw is a simple helper that builds up the request URL, adding the path and parameters. The response from the request is unmarshalled into the out parameter.

func (*Client) Do

func (c *Client) Do(r *http.Request) (*http.Response, error)

Do is a wrapper of http.Client.Do that injects the auth header in the request.

func (*Client) Get

func (c *Client) Get(
	ctx context.Context,
	path string,
	params map[string]string,
	headers map[string]string,
	response interface{},
) error

Get is a simple helper that builds up the request URL, adding the path and parameters. The response from the request is unmarshalled into the data parameter.

func (*Client) GetStream

func (c *Client) GetStream(
	ctx context.Context,
	path string,
	params map[string]string,
	b ...backoff.BackOff,
) (*http.Response, error)

GetStream is similar to Get but returns the raw http.Response for streaming This is useful for endpoints that return streaming responses (e.g., Server-Sent Events, newline-delimited JSON)

func (*Client) GetWithoutSplittingParamValuesOnComma

func (c *Client) GetWithoutSplittingParamValuesOnComma(
	ctx context.Context,
	path string,
	params map[string]string,
	headers map[string]string,
	response interface{},
) error

func (*Client) HTTPClient

func (c *Client) HTTPClient() *http.Client

HTTPClient returns the underlying *http.Client used by this Client. This is useful when you need to make HTTP requests that don't require auth header injection but should share the same transport/TLS configuration.

func (*Client) Post

func (c *Client) Post(
	ctx context.Context,
	path string,
	params map[string]string,
	body interface{},
	headers map[string]string,
	out interface{},
	b ...backoff.BackOff,
) error

Post is a simple helper that builds up the request URL, adding the path and parameters. The response from the request is unmarshalled into the out parameter.

func (*Client) PostRaw

func (c *Client) PostRaw(
	ctx context.Context,
	path string,
	params map[string]string,
	body io.Reader,
	headers map[string]string,
	out interface{},
	b ...backoff.BackOff,
) error

PostRaw is a simple helper that builds up the request URL, adding the path and parameters. The response from the request is unmarshalled into the out parameter.

func (*Client) PostRawStream

func (c *Client) PostRawStream(
	ctx context.Context,
	path string,
	params map[string]string,
	body io.Reader,
	headers map[string]string,
	b ...backoff.BackOff,
) (*http.Response, error)

PostRawStream is similar to PostRaw but returns the raw http.Response for streaming

func (*Client) PostStream

func (c *Client) PostStream(
	ctx context.Context,
	path string,
	params map[string]string,
	body interface{},
	b ...backoff.BackOff,
) (*http.Response, error)

PostStream is similar to Post but returns the raw http.Response for streaming

func (*Client) Put

func (c *Client) Put(
	ctx context.Context,
	path string,
	params map[string]string,
	body interface{},
	out interface{},
	b ...backoff.BackOff,
) error

func (*Client) PutRaw

func (c *Client) PutRaw(
	ctx context.Context,
	path string,
	params map[string]string,
	body io.Reader,
	headers map[string]string,
	out interface{},
	b ...backoff.BackOff,
) error

func (*Client) RequestRaw

func (c *Client) RequestRaw(
	ctx context.Context,
	path string,
	params map[string]string,
	body io.Reader,
	headers map[string]string,
	method string,
	out any,
	b ...backoff.BackOff,
) error

RequestRaw is a simple helper that builds up the request URL, adding the path and parameters. The response from the request is unmarshalled into the out parameter.

type CloudCostManagementService

type CloudCostManagementService struct {
	Client      *Client
	NgManClient *Client
}

func (*CloudCostManagementService) CreateJiraTicket

func (r *CloudCostManagementService) CreateJiraTicket(
	ctx context.Context,
	accountId string,
	ticketDetails dto.CCMTicketDetails,
) (*map[string]any, error)

func (*CloudCostManagementService) CreateOrUpdatePerspective

func (r *CloudCostManagementService) CreateOrUpdatePerspective(ctx context.Context, scope dto.Scope, opts *dto.CCMCreatePerspectiveOptions, update bool) (*dto.CCMCreatePerspectiveResponse, error)

func (*CloudCostManagementService) CreateServiceNowTicket

func (r *CloudCostManagementService) CreateServiceNowTicket(
	ctx context.Context,
	accountId string,
	ticketDetails dto.CCMTicketDetails,
) (*map[string]any, error)

func (*CloudCostManagementService) DeletePerspective

func (r *CloudCostManagementService) DeletePerspective(ctx context.Context, scope dto.Scope, accountId string, perspectiveId string) (*dto.CCMBaseResponse, error)

func (*CloudCostManagementService) GetAnomaliesForPerspective

func (r *CloudCostManagementService) GetAnomaliesForPerspective(
	ctx context.Context,
	accountId string,
	perspectiveId string,
	options map[string]any,
) (*map[string]any, error)

func (*CloudCostManagementService) GetAnomaliesSummary

func (r *CloudCostManagementService) GetAnomaliesSummary(ctx context.Context, accountId string, options map[string]any) (*map[string]any, error)

func (*CloudCostManagementService) GetAzureVmRecommendationDetail

func (r *CloudCostManagementService) GetAzureVmRecommendationDetail(ctx context.Context, options dto.CCMRecommendationDetailOptions) (*map[string]any, error)

func (*CloudCostManagementService) GetCcmMetadata

func (r *CloudCostManagementService) GetCcmMetadata(ctx context.Context, scope dto.Scope, accountId string) (*dto.CCMMetadataResponse, error)

func (*CloudCostManagementService) GetCommitmentMasterAccounts

func (r *CloudCostManagementService) GetCommitmentMasterAccounts(ctx context.Context, scope dto.Scope) (*dto.CCMMasterAccountsListResponse, error)

func (*CloudCostManagementService) GetCommitmentSavings

func (*CloudCostManagementService) GetCommitmentSpends

func (*CloudCostManagementService) GetCommitmentUtilisation

func (*CloudCostManagementService) GetComputeCoverage

func (*CloudCostManagementService) GetCostCategory

func (*CloudCostManagementService) GetEc2RecommendationDetail

func (r *CloudCostManagementService) GetEc2RecommendationDetail(ctx context.Context, options dto.CCMRecommendationDetailOptions) (*map[string]any, error)

func (*CloudCostManagementService) GetEcsServiceRecommendationDetail

func (r *CloudCostManagementService) GetEcsServiceRecommendationDetail(ctx context.Context, options dto.CCMRecommendationDetailOptions) (*map[string]any, error)

func (*CloudCostManagementService) GetEstimatedSavings

func (r *CloudCostManagementService) GetEstimatedSavings(ctx context.Context, scope dto.Scope, targetCoverage float64, opts *dto.CCMCommitmentOptions) (*dto.CommitmentEstimatedSavingsResponse, error)

func (*CloudCostManagementService) GetLastCostPerspective

func (*CloudCostManagementService) GetLastTwelveMonthsCostPerspective

func (*CloudCostManagementService) GetNodePoolRecommendationDetail

func (r *CloudCostManagementService) GetNodePoolRecommendationDetail(ctx context.Context, options dto.CCMRecommendationDetailOptions) (*map[string]any, error)

func (*CloudCostManagementService) GetOverview

func (c *CloudCostManagementService) GetOverview(ctx context.Context, accID string, startTime int64, endTime int64, groupBy string) (*dto.CEView, error)

func (*CloudCostManagementService) GetPerspective

func (*CloudCostManagementService) GetRecommendationsStats

func (r *CloudCostManagementService) GetRecommendationsStats(ctx context.Context, accountId string, options map[string]any) (*map[string]any, error)

func (*CloudCostManagementService) GetWorkloadRecommendationDetail

func (r *CloudCostManagementService) GetWorkloadRecommendationDetail(ctx context.Context, options dto.CCMRecommendationDetailOptions) (*map[string]any, error)

func (*CloudCostManagementService) ListAllAnomalies

func (r *CloudCostManagementService) ListAllAnomalies(ctx context.Context, accountId string, options map[string]any) (*map[string]any, error)

func (*CloudCostManagementService) ListAnomalies

func (r *CloudCostManagementService) ListAnomalies(ctx context.Context, accountId string, options map[string]any) (*map[string]any, error)

func (*CloudCostManagementService) ListCostCategories

func (*CloudCostManagementService) ListCostCategoriesDetail

func (*CloudCostManagementService) ListFilterFieldAnomalies

func (r *CloudCostManagementService) ListFilterFieldAnomalies(ctx context.Context, accountId string, options []string) (*map[string]any, error)

func (*CloudCostManagementService) ListIgnoredAnomalies

func (r *CloudCostManagementService) ListIgnoredAnomalies(ctx context.Context, accountId string, options map[string]any) (*map[string]any, error)

func (*CloudCostManagementService) ListJiraIssueTypes

func (*CloudCostManagementService) ListJiraProjects

func (r *CloudCostManagementService) ListJiraProjects(
	ctx context.Context,
	accountId string,
	connector string,
) (*map[string]any, error)

func (*CloudCostManagementService) ListLabelsV2Keys

ListLabelsV2Keys fetches the list of valid label keys for labelsV2

func (*CloudCostManagementService) ListPerspectivesDetail

func (*CloudCostManagementService) ListRecommendations

func (r *CloudCostManagementService) ListRecommendations(ctx context.Context, accountId string, options map[string]any) (*map[string]any, error)

func (*CloudCostManagementService) ListRecommendationsByResourceType

func (r *CloudCostManagementService) ListRecommendationsByResourceType(ctx context.Context, accountId string, options map[string]any) (*map[string]any, error)

func (*CloudCostManagementService) OverrideRecommendationSavings

func (r *CloudCostManagementService) OverrideRecommendationSavings(
	ctx context.Context,
	accountId string,
	recommendationId string,
	savings float64,
) (*map[string]any, error)

func (*CloudCostManagementService) PerspectiveBudget

func (*CloudCostManagementService) PerspectiveFilterValues

func (*CloudCostManagementService) PerspectiveGrid

func (*CloudCostManagementService) PerspectiveRecommendations

func (*CloudCostManagementService) PerspectiveSummaryWithBudget

func (*CloudCostManagementService) PerspectiveTimeSeries

func (*CloudCostManagementService) ReportAnomalyFeedback

func (r *CloudCostManagementService) ReportAnomalyFeedback(
	ctx context.Context,
	accountId string,
	anomalyId string,
	feedback string,
) (*map[string]any, error)

func (*CloudCostManagementService) UpdateRecommendationState

func (r *CloudCostManagementService) UpdateRecommendationState(
	ctx context.Context,
	accountId string,
	recommendationId string,
	state string,
) (*map[string]any, error)

type ConnectorService

type ConnectorService struct {
	Client *Client
}

func (*ConnectorService) GetConnector

func (c *ConnectorService) GetConnector(ctx context.Context, scope dto.Scope, connectorIdentifier string) (*pkgDTO.ConnectorDetail, error)

GetConnector retrieves a connector by its identifier https://apidocs.harness.io/tag/Connectors#operation/getConnector

func (*ConnectorService) ListConnectorCatalogue

func (c *ConnectorService) ListConnectorCatalogue(ctx context.Context, scope dto.Scope) ([]pkgDTO.ConnectorCatalogueItem, error)

ListConnectorCatalogue fetches the connector catalogue. API Documentation: https://apidocs.harness.io/tag/Connectors#operation/getConnectorCatalogue

func (*ConnectorService) ListConnectors

func (c *ConnectorService) ListConnectors(ctx context.Context, scope dto.Scope, connectorNames, connectorIdentifiers, types, categories, connectivityStatuses, connectorConnectivityModes []string, description string, inheritingCredentialsFromDelegate *bool, tags map[string]string) (*pkgDTO.ConnectorListData, error)

ListConnectors retrieves a list of connectors with filtering options https://apidocs.harness.io/tag/Connectors#operation/getConnectorListV2

type DashboardService

type DashboardService struct {
	Client *Client
}

DashboardService handles all dashboard-related API interactions

func (*DashboardService) GetDashboardData

func (d *DashboardService) GetDashboardData(ctx context.Context, scope dto.Scope, dashboardID string, reportingTimeframe int) (*dto.DashboardData, error)

GetDashboardData fetches data for a specific dashboard

func (*DashboardService) ListDashboards

func (d *DashboardService) ListDashboards(ctx context.Context, scope dto.Scope, page int, pageSize int, folderID string, tags string) (*dto.DashboardListResponse, error)

ListDashboards fetches all dashboards from Harness

type DelegateClient

type DelegateClient struct {
	Client *Client
}

func (*DelegateClient) ListDelegates

func (d *DelegateClient) ListDelegates(ctx context.Context, scope dto.Scope, filter *dto.DelegateListFilter, opts *dto.DelegateListOptions) ([]dto.Delegate, error)

ListDelegates retrieves a list of delegates based on the provided filter and scope. Parameters: - ctx: Context for the request - scope: The scope (account/org/project) for the delegates - filter: Filter options for listing delegates - opts: Additional options like 'all' to include underlying orgs/projects Returns: - []Delegate: List of delegates matching the filter - error: Any error that occurred during the request

type DelegateTokenClient

type DelegateTokenClient struct {
	Client *Client
}

func (*DelegateTokenClient) CreateDelegateToken

func (d *DelegateTokenClient) CreateDelegateToken(ctx context.Context, scope dto.Scope, tokenName string, revokeAfter *int64) (dto.DelegateToken, error)

CreateDelegateToken creates a new delegate token with the specified parameters. Parameters: - ctx: Context for the request - scope: The scope (account/org/project) for the token - tokenName: Name of the delegate token - revokeAfter: Optional epoch time in milliseconds after which the token will be revoked Returns: - *DelegateToken: The created delegate token - error: Any error that occurred during the request

func (*DelegateTokenClient) DeleteDelegateToken

func (d *DelegateTokenClient) DeleteDelegateToken(ctx context.Context, scope dto.Scope, tokenName string) error

DeleteDelegateToken deletes a revoked delegate token with the specified name. Parameters: - ctx: Context for the request - scope: The scope (account/org/project) for the token - tokenName: Name of the delegate token to delete Returns: - error: Any error that occurred during the request

func (*DelegateTokenClient) GetDelegateByToken

func (d *DelegateTokenClient) GetDelegateByToken(ctx context.Context, scope dto.Scope, tokenName string) ([]dto.DelegateGroupDetail, error)

GetDelegateByToken gets all delegates using a given delegate token name. Parameters: - ctx: Context for the request - scope: The scope (account/org/project) for the token - tokenName: Name of the delegate token to get delegates for Returns: - []DelegateGroupDetail: List of delegate groups using the token - error: Any error that occurred during the request

func (*DelegateTokenClient) GetDelegateToken

func (d *DelegateTokenClient) GetDelegateToken(ctx context.Context, scope dto.Scope, name string, status string) ([]dto.DelegateToken, error)

GetDelegateToken retrieves a specific delegate token by name. Parameters: - ctx: Context for the request - scope: The scope (account/org/project) for the token - name: Name of the delegate token to retrieve - status: Optional status filter (ACTIVE/REVOKED) Returns: - *DelegateToken: The delegate token if found - error: Any error that occurred during the request

func (*DelegateTokenClient) ListDelegateTokens

func (d *DelegateTokenClient) ListDelegateTokens(ctx context.Context, scope dto.Scope, opts *dto.DelegateTokenOptions) ([]dto.DelegateToken, error)

ListDelegateTokens retrieves a list of delegate tokens based on the provided options and scope. The API uses 0-based pagination. If opts is nil, default pagination values will be used. Returns: - []DelegateToken: List of delegate tokens for the current page - error: Any error that occurred during the request

func (*DelegateTokenClient) RevokeDelegateToken

func (d *DelegateTokenClient) RevokeDelegateToken(ctx context.Context, scope dto.Scope, tokenName string) (dto.DelegateToken, error)

RevokeDelegateToken revokes a delegate token with the specified name. Parameters: - ctx: Context for the request - scope: The scope (account/org/project) for the token - tokenName: Name of the delegate token to revoke Returns: - DelegateToken: The revoked delegate token - error: Any error that occurred during the request

type EnvironmentClient

type EnvironmentClient struct {
	Client *Client
}

func (*EnvironmentClient) Get

func (e *EnvironmentClient) Get(ctx context.Context, scope dto.Scope, environmentIdentifier string) (*dto.Environment, error)

Get retrieves an environment by its identifier https://apidocs.harness.io/tag/Environments#operation/getEnvironmentV2

func (*EnvironmentClient) List

List retrieves a list of environments based on the provided options https://apidocs.harness.io/tag/Environments#operation/getEnvironmentList

func (*EnvironmentClient) MoveConfigs

func (e *EnvironmentClient) MoveConfigs(ctx context.Context, scope dto.Scope, request *dto.MoveEnvironmentConfigsRequest) (bool, error)

MoveConfigs moves environment YAML from inline to remote https://apidocs.harness.io/tag/Environments#operation/moveEnvironmentConfig Note: REMOTE_TO_INLINE operations are not supported for environments

type FMEService

type FMEService struct {
	Client *Client
}

FMEService provides access to Split.io FME APIs

func (*FMEService) GetFeatureFlagDefinition

func (f *FMEService) GetFeatureFlagDefinition(ctx context.Context, wsID, flagName, environmentIDOrName string) (*dto.FMEFeatureFlagDefinitionResponse, error)

GetFeatureFlagDefinition retrieves a specific feature flag definition GET https://api.split.io/internal/api/v2/splits/ws/{wsId}/{feature_flag_name}/environments/{environment_id_or_name}

func (*FMEService) ListEnvironments

func (f *FMEService) ListEnvironments(ctx context.Context, wsID string) (*dto.FMEEnvironmentsResponse, error)

ListEnvironments retrieves all environments for a specific workspace GET https://api.split.io/internal/api/v2/environments/ws/{wsId}

func (*FMEService) ListFeatureFlags

func (f *FMEService) ListFeatureFlags(ctx context.Context, wsID string) (*dto.FMEFeatureFlagsResponse, error)

ListFeatureFlags retrieves all feature flags for a specific workspace GET https://api.split.io/internal/api/v2/splits/ws/{wsId}

func (*FMEService) ListWorkspaces

func (f *FMEService) ListWorkspaces(ctx context.Context) (*dto.FMEWorkspacesResponse, error)

ListWorkspaces retrieves all FME workspaces GET https://api.split.io/internal/api/v2/workspaces

type GitOpsService

type GitOpsService struct {
	Client *Client
}

func (*GitOpsService) GetAgent

func (g *GitOpsService) GetAgent(
	ctx context.Context,
	scope dto.Scope,
	agentIdentifier string,
) (*generated.V1Agent, error)

func (*GitOpsService) GetApplication

func (g *GitOpsService) GetApplication(
	ctx context.Context,
	scope dto.Scope,
	agentIdentifier string,
	applicationName string,
	refresh string,
) (*generated.Servicev1Application, error)

func (*GitOpsService) GetApplicationResourceTree

func (g *GitOpsService) GetApplicationResourceTree(
	ctx context.Context,
	scope dto.Scope,
	agentIdentifier string,
	applicationName string,
) (*generated.ApplicationsApplicationTree, error)

func (*GitOpsService) GetApplicationSet

func (g *GitOpsService) GetApplicationSet(
	ctx context.Context,
	scope dto.Scope,
	agentIdentifier string,
	identifier string,
) (*generated.Servicev1ApplicationSet, error)

func (*GitOpsService) GetCluster

func (g *GitOpsService) GetCluster(
	ctx context.Context,
	scope dto.Scope,
	agentIdentifier string,
	identifier string,
) (*generated.Servicev1Cluster, error)

func (*GitOpsService) GetDashboardOverview

func (g *GitOpsService) GetDashboardOverview(
	ctx context.Context,
	scope dto.Scope,
	agentIdentifier string,
) (*generated.V1DashboardOverview, error)

func (*GitOpsService) GetManagedResources

func (g *GitOpsService) GetManagedResources(
	ctx context.Context,
	scope dto.Scope,
	agentIdentifier string,
	applicationName string,
) (*generated.ApplicationsManagedResourcesResponse, error)

func (*GitOpsService) GetPodLogs

func (g *GitOpsService) GetPodLogs(
	ctx context.Context,
	scope dto.Scope,
	agentIdentifier string,
	applicationName string,
	podName string,
	namespace string,
	container string,
	tailLines int,
) (*generated.ApplicationsLogEntriesBatch, error)

func (*GitOpsService) GetRepoCredentials

func (g *GitOpsService) GetRepoCredentials(
	ctx context.Context,
	scope dto.Scope,
	agentIdentifier string,
	identifier string,
) (*generated.Servicev1RepositoryCredentials, error)

func (*GitOpsService) GetRepository

func (g *GitOpsService) GetRepository(
	ctx context.Context,
	scope dto.Scope,
	agentIdentifier string,
	identifier string,
) (*generated.Servicev1Repository, error)

func (*GitOpsService) ListAgents

func (g *GitOpsService) ListAgents(
	ctx context.Context,
	scope dto.Scope,
	agentType string,
	searchTerm string,
	page, pageSize int,
	includeAllScopes bool,
) (*generated.V1AgentList, error)

func (*GitOpsService) ListApplicationEvents

func (g *GitOpsService) ListApplicationEvents(
	ctx context.Context,
	scope dto.Scope,
	agentIdentifier string,
	applicationName string,
	resourceName string,
	resourceNamespace string,
	resourceUID string,
) (*generated.ApplicationsEventList, error)

func (*GitOpsService) ListApplicationSets

func (g *GitOpsService) ListApplicationSets(
	ctx context.Context,
	scope dto.Scope,
	agentIdentifier string,
	searchTerm string,
	page, pageSize int,
) (*generated.Servicev1ApplicationSetList, error)

func (*GitOpsService) ListApplications

func (g *GitOpsService) ListApplications(
	ctx context.Context,
	scope dto.Scope,
	agentIdentifier string,
	clusterIdentifier string,
	repoIdentifier string,
	searchTerm string,
	page, pageSize int,
) (*generated.Servicev1Applicationlist, error)

func (*GitOpsService) ListClusters

func (g *GitOpsService) ListClusters(
	ctx context.Context,
	scope dto.Scope,
	agentIdentifier string,
	searchTerm string,
	page, pageSize int,
) (*generated.V1Clusterlist, error)

func (*GitOpsService) ListRepoCredentials

func (g *GitOpsService) ListRepoCredentials(
	ctx context.Context,
	scope dto.Scope,
	agentIdentifier string,
	searchTerm string,
	page, pageSize int,
) (*generated.Servicev1RepositoryCredentialsList, error)

func (*GitOpsService) ListRepositories

func (g *GitOpsService) ListRepositories(
	ctx context.Context,
	scope dto.Scope,
	agentIdentifier string,
	searchTerm string,
	page, pageSize int,
) (*generated.V1Repositorylist, error)

func (*GitOpsService) ListResourceActions

func (g *GitOpsService) ListResourceActions(
	ctx context.Context,
	scope dto.Scope,
	agentIdentifier string,
	applicationName string,
	resourceName string,
	namespace string,
	kind string,
	group string,
	version string,
) (*generated.ApplicationsResourceActionsListResponse, error)

type IDPService

type IDPService struct {
	Client                *Client
	NgManagerAuthProvider auth.Provider
}

func (*IDPService) ExecuteWorkflow

func (i *IDPService) ExecuteWorkflow(ctx context.Context, scope dto.Scope, identifier string, inputSet map[string]interface{}) (*dto.ExecuteWorkflowResponse, error)

func (*IDPService) GetCheck

func (i *IDPService) GetCheck(ctx context.Context, scope dto.Scope, checkIdentifier string, isCustom bool) (*dto.CheckDetailsResponse, error)

func (*IDPService) GetCheckStats

func (i *IDPService) GetCheckStats(ctx context.Context, scope dto.Scope, checkIdentifier string, isCustom bool) (*dto.CheckStatsResponseWithHumanReadableTime, error)

func (*IDPService) GetEntity

func (i *IDPService) GetEntity(ctx context.Context, scope dto.Scope, kind string, identifier string) (*dto.EntityResponse, error)

func (*IDPService) GetScorecard

func (i *IDPService) GetScorecard(ctx context.Context, scope dto.Scope, identifier string) (*dto.ScorecardDetailsResponse, error)

func (*IDPService) GetScorecardScores

func (i *IDPService) GetScorecardScores(ctx context.Context, scope dto.Scope, identifier string) (*dto.ScorecardScoreResponse, error)

func (*IDPService) GetScorecardStats

func (i *IDPService) GetScorecardStats(ctx context.Context, scope dto.Scope, scorecardIdentifier string) (*dto.ScorecardStatsResponseWithHumanReadableTime, error)

func (*IDPService) GetScorecardSummary

func (i *IDPService) GetScorecardSummary(ctx context.Context, scope dto.Scope, identifier string) (*dto.ScorecardSummaryResponse, error)

func (*IDPService) ListChecks

func (i *IDPService) ListChecks(ctx context.Context, scope dto.Scope, getChecksParams *dto.GetChecksParams) (*dto.CheckResponseList, error)

func (*IDPService) ListEntities

func (i *IDPService) ListEntities(ctx context.Context, scope dto.Scope, scopeLevel string, getEntitiesParams *dto.GetEntitiesParams) (*[]dto.EntityResponse, error)

func (*IDPService) ListScorecards

func (i *IDPService) ListScorecards(ctx context.Context, scope dto.Scope) (*[]dto.ScorecardResponse, error)

func (*IDPService) SearchTechDocs

func (i *IDPService) SearchTechDocs(ctx context.Context, scope dto.Scope, query string) (*dto.SearchTechDocsResponse, error)

type InfrastructureClient

type InfrastructureClient struct {
	Client *Client
}

func (*InfrastructureClient) List

List retrieves a list of infrastructures based on the provided options https://apidocs.harness.io/tag/Infrastructures#operation/getInfrastructureList

func (*InfrastructureClient) MoveConfigs

MoveConfigs moves infrastructure YAML from inline to remote or vice versa https://apidocs.harness.io/tag/Infrastructures#operation/moveConfig

type LoadTestService

type LoadTestService struct {
	Client *Client
}

LoadTestService provides methods to interact with the Load Test API

func (*LoadTestService) CreateSampleLoadTest

func (l *LoadTestService) CreateSampleLoadTest(ctx context.Context, scope dto.Scope, request *dto.CreateSampleLoadTestRequest) (*dto.LoadTest, error)

CreateSampleLoadTest creates a new sample load test

func (*LoadTestService) DeleteLoadTest

func (l *LoadTestService) DeleteLoadTest(ctx context.Context, scope dto.Scope, loadTestID string) (*dto.DeleteLoadTestResponse, error)

DeleteLoadTest deletes a load test

func (*LoadTestService) GetLoadTest

func (l *LoadTestService) GetLoadTest(ctx context.Context, scope dto.Scope, loadTestID string) (*dto.LoadTest, error)

GetLoadTest retrieves details of a specific load test

func (*LoadTestService) ListLoadTests

func (l *LoadTestService) ListLoadTests(ctx context.Context, scope dto.Scope, pagination *dto.PaginationOptions) (*dto.ListLoadTestResponse, error)

ListLoadTests lists all load tests in the project

func (*LoadTestService) RunLoadTest

func (l *LoadTestService) RunLoadTest(ctx context.Context, scope dto.Scope, loadTestID string, request *dto.RunLoadTestRequest) (*dto.LoadTestRunResponse, error)

RunLoadTest starts a new run for a load test

func (*LoadTestService) StopLoadTest

func (l *LoadTestService) StopLoadTest(ctx context.Context, scope dto.Scope, runID string) (*dto.StopLoadTestResponse, error)

StopLoadTest stops a running load test run

type LogService

type LogService struct {
	LogServiceClient *Client
	PipelineClient   *Client
}

LogService handles operations related to pipeline logs

func (*LogService) GetDownloadLogsURL

func (l *LogService) GetDownloadLogsURL(ctx context.Context, scope dto.Scope, planExecutionID string, logKey string, headers map[string]string) (string, error)

GetDownloadLogsURL fetches a download URL for pipeline execution logs If logKey is not empty, it will use that log key to fetch logs instead of building one from execution details

type PipelineExecutionResult

type PipelineExecutionResult struct {
	Execution dto.PipelineExecution `json:"execution,omitempty"`
	LogKeys   dto.FinalLogKeys      `json:"logKeys,omitempty"`
}

PipelineExecutionResult contains the pipeline execution details and log keys

type PipelineService

type PipelineService struct {
	Client *Client
}

func (*PipelineService) FetchExecutionURL

func (p *PipelineService) FetchExecutionURL(
	ctx context.Context,
	scope dto.Scope,
	pipelineID, planExecutionID string,
) (string, error)

func (*PipelineService) Get

func (p *PipelineService) Get(ctx context.Context, scope dto.Scope, pipelineID string) (
	*dto.Entity[dto.PipelineData],
	error,
)

func (*PipelineService) GetExecutionWithLogKeys

func (p *PipelineService) GetExecutionWithLogKeys(
	ctx context.Context,
	scope dto.Scope,
	planExecutionID string,
	stageNodeID string,
	childStageNodeID string,
) (*dto.Entity[PipelineExecutionResult], error)

GetExecutionWithLogKeys retrieves details of a specific pipeline execution along with log keys

func (*PipelineService) GetInputSet

func (p *PipelineService) GetInputSet(
	ctx context.Context,
	scope dto.Scope,
	pipelineIdentifier, inputSetIdentifier string,
) (*dto.InputSetResponse, error)

func (*PipelineService) GetPipelineSummary

func (p *PipelineService) GetPipelineSummary(
	ctx context.Context,
	scope dto.Scope,
	pipelineIdentifier string,
	getMetadataOnly bool,
) (*dto.Entity[dto.PipelineSummary], error)

GetPipelineSummary gets a summary of a pipeline

func (*PipelineService) List

func (*PipelineService) ListExecutions

func (*PipelineService) ListInputSets

func (p *PipelineService) ListInputSets(
	ctx context.Context,
	scope dto.Scope,
	opts *dto.InputSetListOptions,
) (*dto.InputSetListResponse, error)

func (*PipelineService) ListTriggers

func (p *PipelineService) ListTriggers(
	ctx context.Context,
	scope dto.Scope,
	opts *dto.TriggerListOptions,
) (*dto.ListOutput[dto.TriggerListItem], error)

type PrincipalService

type PrincipalService struct {
	Client *Client
}

func (*PrincipalService) CreateServiceAccount

func (cServiceAccount *PrincipalService) CreateServiceAccount(ctx context.Context, scope dto.Scope, opts *dto.CreateServiceAccountRequestBody) (*dto.AccessControlOutput[dto.ServiceAccountInfo], error)

func (*PrincipalService) CreateUserGroup

func (*PrincipalService) DeleteServiceAccount

func (dServiceAccount *PrincipalService) DeleteServiceAccount(ctx context.Context, scope dto.Scope, serviceAccountIdentifier string) (*dto.AccessControlOutput[bool], error)

func (*PrincipalService) DeleteUserGroup

func (dUserGroup *PrincipalService) DeleteUserGroup(ctx context.Context, scope dto.Scope, userGroupIdentifier string) (*dto.AccessControlOutput[dto.UserGroupInfoDataId], error)

func (*PrincipalService) GetAllUsers

func (u *PrincipalService) GetAllUsers(ctx context.Context, scope dto.Scope, searchTerm string, page int, size int, opts *dto.UsersRequestBody) (*dto.AccessControlOutput[dto.UsersOutput], error)

func (*PrincipalService) GetCurrentUser

func (currentUserInfo *PrincipalService) GetCurrentUser(ctx context.Context, scope dto.Scope) (*dto.AccessControlOutput[dto.CurrentUserData], error)

func (*PrincipalService) GetServiceAccount

func (sAccount *PrincipalService) GetServiceAccount(ctx context.Context, scope dto.Scope, serviceAccountID string) (*dto.AccessControlOutput[dto.ServiceAccountData], error)

func (*PrincipalService) GetUserGroupInfo

func (uGroupInfo *PrincipalService) GetUserGroupInfo(ctx context.Context, scope dto.Scope, userGroupID string) (*dto.AccessControlOutput[dto.UserGroupInfoData], error)

func (*PrincipalService) GetUserInfo

func (uInfo *PrincipalService) GetUserInfo(ctx context.Context, scope dto.Scope, userID string, page int, size int) (*dto.AccessControlOutput[dto.UserInfoData], error)

func (*PrincipalService) InviteUsers

func (iUser *PrincipalService) InviteUsers(ctx context.Context, scope dto.Scope, emails []string, userGroups []string, roleBindings []dto.RoleBinding, opts *dto.InviteUserRequestBody) (*dto.AccessControlOutput[dto.InviteUserOutputData], error)

type PullRequestService

type PullRequestService struct {
	Client *Client
}

func (*PullRequestService) Create

func (p *PullRequestService) Create(ctx context.Context, scope dto.Scope, repoID string, createPR *dto.CreatePullRequest) (*dto.PullRequest, error)

Create creates a new pull request in the specified repository

func (*PullRequestService) Get

func (p *PullRequestService) Get(ctx context.Context, scope dto.Scope, repoID string, prNumber int) (*dto.PullRequest, error)

func (*PullRequestService) GetActivities

func (p *PullRequestService) GetActivities(ctx context.Context, scope dto.Scope, repoID string, prNumber int, opts *dto.PullRequestActivityOptions) (dto.PullRequestActivitiesResponse, error)

GetActivities retrieves the activities (including comments) for a specific pull request

func (*PullRequestService) GetChecks

func (p *PullRequestService) GetChecks(ctx context.Context, scope dto.Scope, repoID string, prNumber int) (*dto.PullRequestChecksResponse, error)

GetChecks retrieves the status checks for a specific pull request

func (*PullRequestService) List

func (p *PullRequestService) List(ctx context.Context, scope dto.Scope, repoID string, opts *dto.PullRequestOptions) ([]*dto.PullRequest, error)

type RepositoryService

type RepositoryService struct {
	Client *Client
}

func (*RepositoryService) Get

func (r *RepositoryService) Get(ctx context.Context, scope dto.Scope, repoIdentifier string) (*dto.Repository, error)

func (*RepositoryService) List

type ResourceGroupService

type ResourceGroupService struct {
	Client *Client
}

func (*ResourceGroupService) CreateResourceGroup

func (*ResourceGroupService) DeleteResourceGroup

func (dResourceGroup *ResourceGroupService) DeleteResourceGroup(ctx context.Context, scope dto.Scope, resourceGroupIdentifier string) (*dto.AccessControlOutput[bool], error)

type SEIService

type SEIService struct {
	Client  *Client
	BaseURL string
	Secret  string
}

SEIService handles communication with the SEI API

func NewSEIService

func NewSEIService(client *Client, baseURL, secret string) *SEIService

NewSEIService creates a new SEIService with the given client and baseURL

func (*SEIService) GetBAAllProfiles

func (s *SEIService) GetBAAllProfiles(ctx context.Context, params map[string]interface{}) (interface{}, error)

GetBAAllProfiles gets all BA profiles Makes a GET request to /v2/insights/ba/profiles

func (*SEIService) GetBADrilldownData

func (s *SEIService) GetBADrilldownData(ctx context.Context, params map[string]interface{}) (interface{}, error)

GetBADrilldownData gets BA drilldown data Makes a POST request to /v2/insights/ba/drilldown

func (*SEIService) GetBAInsightMetrics

func (s *SEIService) GetBAInsightMetrics(ctx context.Context, params map[string]interface{}) (interface{}, error)

GetBAInsightMetrics gets BA insight metrics Makes a POST request to /v2/insights/ba/feature_metrics

func (*SEIService) GetBAInsightSummary

func (s *SEIService) GetBAInsightSummary(ctx context.Context, params map[string]interface{}) (interface{}, error)

GetBAInsightSummary gets BA insight summary Makes a POST request to /v2/insights/ba/feature_summary

func (*SEIService) GetChangeFailureRate

func (s *SEIService) GetChangeFailureRate(ctx context.Context, params map[string]interface{}) (interface{}, error)

GetChangeFailureRate gets change failure rate metrics Makes a POST request to /v2/insights/efficiency/changeFailureRate with JSON body and query parameters

func (*SEIService) GetChangeFailureRateDrilldown

func (s *SEIService) GetChangeFailureRateDrilldown(ctx context.Context, params map[string]interface{}) (interface{}, error)

GetChangeFailureRateDrilldown gets change failure rate drilldown data Makes a POST request to /v2/insights/efficiency/changeFailureRate/drilldown with JSON body and query parameters

func (*SEIService) GetDeploymentFrequency

func (s *SEIService) GetDeploymentFrequency(ctx context.Context, params map[string]interface{}) (interface{}, error)

GetDeploymentFrequency gets deployment frequency metrics Makes a POST request to /v2/insights/efficiency/deploymentFrequency with JSON body and query parameters

func (*SEIService) GetDeploymentFrequencyDrilldown

func (s *SEIService) GetDeploymentFrequencyDrilldown(ctx context.Context, params map[string]interface{}) (interface{}, error)

GetDeploymentFrequencyDrilldown gets deployment frequency drilldown data Makes a POST request to /v2/insights/efficiency/deploymentFrequency/drilldown with JSON body and query parameters

func (*SEIService) GetEfficiencyLeadTime

func (s *SEIService) GetEfficiencyLeadTime(ctx context.Context, params map[string]interface{}) (interface{}, error)

GetEfficiencyLeadTime gets lead time Makes a POST request to /v2/insights/efficiency/leadtime with JSON body and query parameters

func (*SEIService) GetMttr

func (s *SEIService) GetMttr(ctx context.Context, params map[string]interface{}) (interface{}, error)

GetMttr gets Mean Time to Restore metrics Makes a POST request to /v2/insights/efficiency/mttr with JSON body and query parameters

func (*SEIService) GetOrgTreeBusinessAlignmentProfile

func (s *SEIService) GetOrgTreeBusinessAlignmentProfile(ctx context.Context, params map[string]interface{}) (interface{}, error)

GetOrgTreeBusinessAlignmentProfile gets business alignment profile reference ID for an organization tree Makes a GET request to /v2/org-trees/{orgTreeId}/businessAlignmentProfile

func (*SEIService) GetOrgTreeById

func (s *SEIService) GetOrgTreeById(ctx context.Context, params map[string]interface{}) (interface{}, error)

GetOrgTreeById gets a specific organization tree by ID Makes a GET request to /v2/org-trees/{id}

func (*SEIService) GetOrgTreeEfficiencyProfile

func (s *SEIService) GetOrgTreeEfficiencyProfile(ctx context.Context, params map[string]interface{}) (interface{}, error)

GetOrgTreeEfficiencyProfile gets efficiency profile reference ID for an organization tree Makes a GET request to /v2/org-trees/{orgTreeId}/efficiency_profile

func (*SEIService) GetOrgTreeIntegrations

func (s *SEIService) GetOrgTreeIntegrations(ctx context.Context, params map[string]interface{}) (interface{}, error)

GetOrgTreeIntegrations gets integrations associated with an organization tree Makes a GET request to /v2/org-trees/{orgTreeId}/integrations

func (*SEIService) GetOrgTreeProductivityProfile

func (s *SEIService) GetOrgTreeProductivityProfile(ctx context.Context, params map[string]interface{}) (interface{}, error)

GetOrgTreeProductivityProfile gets productivity profile reference ID for an organization tree Makes a GET request to /v2/org-trees/{orgTreeId}/productivity_profile

func (*SEIService) GetOrgTreeTeams

func (s *SEIService) GetOrgTreeTeams(ctx context.Context, params map[string]interface{}) (interface{}, error)

GetOrgTreeTeams gets team hierarchy for an organization tree Makes a GET request to /v2/org-trees/{orgTreeId}/teams

func (*SEIService) GetOrgTrees

func (s *SEIService) GetOrgTrees(ctx context.Context, params map[string]interface{}) (interface{}, error)

GetOrgTrees gets organization trees with pagination Makes a GET request to /v2/org-trees

func (*SEIService) GetProductivityFeatureMetrics

func (s *SEIService) GetProductivityFeatureMetrics(ctx context.Context, params map[string]interface{}) (interface{}, error)

GetProductivityFeatureMetrics gets productivity feature metrics Makes a POST request to /v2/productivityv3/feature_metrics with JSON body and query parameters

func (*SEIService) GetTeam

func (s *SEIService) GetTeam(ctx context.Context, params map[string]interface{}) (interface{}, error)

GetTeam gets team information by team reference ID Makes a GET request to /v2/teams/{teamRefId}/team_info

func (*SEIService) GetTeamDevelopers

func (s *SEIService) GetTeamDevelopers(ctx context.Context, params map[string]interface{}) (interface{}, error)

GetTeamDevelopers gets team developers by team reference ID Makes a GET request to /v2/teams/{teamRefId}/developers

func (*SEIService) GetTeamIntegrationFilters

func (s *SEIService) GetTeamIntegrationFilters(ctx context.Context, params map[string]interface{}) (interface{}, error)

GetTeamIntegrationFilters gets team integration filters by team reference ID Makes a GET request to /v2/teams/{teamRefId}/integration_filters

func (*SEIService) GetTeamIntegrations

func (s *SEIService) GetTeamIntegrations(ctx context.Context, params map[string]interface{}) (interface{}, error)

GetTeamIntegrations gets team integrations by team reference ID Makes a GET request to /v2/teams/{teamRefId}/integrations

func (*SEIService) GetTeamsList

func (s *SEIService) GetTeamsList(ctx context.Context, params map[string]interface{}) (interface{}, error)

GetTeamsList gets list of teams with pagination Makes a GET request to /v2/teams/list

type SecretsClient

type SecretsClient struct {
	*Client
}

SecretsClient provides methods to interact with the Harness secrets API

func (*SecretsClient) GetSecret

func (c *SecretsClient) GetSecret(ctx context.Context, scope dto.Scope, secretIdentifier string) (*dto.SecretResponse, error)

GetSecret retrieves a secret by its identifier

func (*SecretsClient) ListSecrets

func (c *SecretsClient) ListSecrets(ctx context.Context, scope dto.Scope, pageIndex, pageSize int, sortOrders []string, filters dto.SecretFilterProperties) (*dto.ListSecretsResponse, error)

ListSecrets retrieves a list of secrets with pagination and filtering options

type ServiceClient

type ServiceClient struct {
	Client *Client
}

func (*ServiceClient) Get

func (s *ServiceClient) Get(ctx context.Context, scope dto.Scope, serviceIdentifier string) (*dto.Service, error)

Get retrieves a service by its identifier https://apidocs.harness.io/tag/Services#operation/getServiceV2

func (*ServiceClient) List

func (s *ServiceClient) List(ctx context.Context, scope dto.Scope, opts *dto.ServiceOptions) ([]dto.Service, int, error)

List retrieves a list of services based on the provided options https://apidocs.harness.io/tag/Services#operation/getServiceList

type SettingsClient

type SettingsClient struct {
	*Client
}

SettingsClient provides methods to interact with the Harness settings API

func (*SettingsClient) List

List retrieves settings based on the provided scope and options

type TemplateService

type TemplateService struct {
	Client *Client
}

func (*TemplateService) ListAccount

ListAccount lists templates in the account scope

func (*TemplateService) ListOrg

ListOrg lists templates in the organization scope

func (*TemplateService) ListProject

ListProject lists templates in the project scope

Directories

Path Synopsis
Package ar provides primitives to interact with the openapi HTTP API.
Package ar provides primitives to interact with the openapi HTTP API.
gitops
generated
Package generated provides primitives to interact with the openapi HTTP API.
Package generated provides primitives to interact with the openapi HTTP API.
scs
generated
Package generated provides primitives to interact with the openapi HTTP API.
Package generated provides primitives to interact with the openapi HTTP API.
sto
generated
Package generated provides primitives to interact with the openapi HTTP API.
Package generated provides primitives to interact with the openapi HTTP API.

Jump to

Keyboard shortcuts

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