Documentation ¶
Overview ¶
* Governance Policy Management API * * Read and manage OPA Governance policies, policy sets and evaluations * * API version: 1.2.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* Governance Policy Management API * * Read and manage OPA Governance policies, policy sets and evaluations * * API version: 1.2.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* Governance Policy Management API * * Read and manage OPA Governance policies, policy sets and evaluations * * API version: 1.2.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* Governance Policy Management API * * Read and manage OPA Governance policies, policy sets and evaluations * * API version: 1.2.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* Governance Policy Management API * * Read and manage OPA Governance policies, policy sets and evaluations * * API version: 1.2.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* Governance Policy Management API * * Read and manage OPA Governance policies, policy sets and evaluations * * API version: 1.2.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* Governance Policy Management API * * Read and manage OPA Governance policies, policy sets and evaluations * * API version: 1.2.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* Governance Policy Management API * * Read and manage OPA Governance policies, policy sets and evaluations * * API version: 1.2.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* Governance Policy Management API * * Read and manage OPA Governance policies, policy sets and evaluations * * API version: 1.2.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* Governance Policy Management API * * Read and manage OPA Governance policies, policy sets and evaluations * * API version: 1.2.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* Governance Policy Management API * * Read and manage OPA Governance policies, policy sets and evaluations * * API version: 1.2.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* Governance Policy Management API * * Read and manage OPA Governance policies, policy sets and evaluations * * API version: 1.2.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* Governance Policy Management API * * Read and manage OPA Governance policies, policy sets and evaluations * * API version: 1.2.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* Governance Policy Management API * * Read and manage OPA Governance policies, policy sets and evaluations * * API version: 1.2.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* Governance Policy Management API * * Read and manage OPA Governance policies, policy sets and evaluations * * API version: 1.2.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* Governance Policy Management API * * Read and manage OPA Governance policies, policy sets and evaluations * * API version: 1.2.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* Governance Policy Management API * * Read and manage OPA Governance policies, policy sets and evaluations * * API version: 1.2.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* Governance Policy Management API * * Read and manage OPA Governance policies, policy sets and evaluations * * API version: 1.2.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* Governance Policy Management API * * Read and manage OPA Governance policies, policy sets and evaluations * * API version: 1.2.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* Governance Policy Management API * * Read and manage OPA Governance policies, policy sets and evaluations * * API version: 1.2.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* Governance Policy Management API * * Read and manage OPA Governance policies, policy sets and evaluations * * API version: 1.2.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* Governance Policy Management API * * Read and manage OPA Governance policies, policy sets and evaluations * * API version: 1.2.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* Governance Policy Management API * * Read and manage OPA Governance policies, policy sets and evaluations * * API version: 1.2.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* Governance Policy Management API * * Read and manage OPA Governance policies, policy sets and evaluations * * API version: 1.2.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* Governance Policy Management API * * Read and manage OPA Governance policies, policy sets and evaluations * * API version: 1.2.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* Governance Policy Management API * * Read and manage OPA Governance policies, policy sets and evaluations * * API version: 1.2.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* Governance Policy Management API * * Read and manage OPA Governance policies, policy sets and evaluations * * API version: 1.2.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* Governance Policy Management API * * Read and manage OPA Governance policies, policy sets and evaluations * * API version: 1.2.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* Governance Policy Management API * * Read and manage OPA Governance policies, policy sets and evaluations * * API version: 1.2.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* Governance Policy Management API * * Read and manage OPA Governance policies, policy sets and evaluations * * API version: 1.2.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* Governance Policy Management API * * Read and manage OPA Governance policies, policy sets and evaluations * * API version: 1.2.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* Governance Policy Management API * * Read and manage OPA Governance policies, policy sets and evaluations * * API version: 1.2.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* Governance Policy Management API * * Read and manage OPA Governance policies, policy sets and evaluations * * API version: 1.2.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* Governance Policy Management API * * Read and manage OPA Governance policies, policy sets and evaluations * * API version: 1.2.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* Governance Policy Management API * * Read and manage OPA Governance policies, policy sets and evaluations * * API version: 1.2.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* Governance Policy Management API * * Read and manage OPA Governance policies, policy sets and evaluations * * API version: 1.2.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* Governance Policy Management API * * Read and manage OPA Governance policies, policy sets and evaluations * * API version: 1.2.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* Governance Policy Management API * * Read and manage OPA Governance policies, policy sets and evaluations * * API version: 1.2.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* Governance Policy Management API * * Read and manage OPA Governance policies, policy sets and evaluations * * API version: 1.2.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* Governance Policy Management API * * Read and manage OPA Governance policies, policy sets and evaluations * * API version: 1.2.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* Governance Policy Management API * * Read and manage OPA Governance policies, policy sets and evaluations * * API version: 1.2.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* Governance Policy Management API * * Read and manage OPA Governance policies, policy sets and evaluations * * API version: 1.2.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* Governance Policy Management API * * Read and manage OPA Governance policies, policy sets and evaluations * * API version: 1.2.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* Governance Policy Management API * * Read and manage OPA Governance policies, policy sets and evaluations * * API version: 1.2.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
Index ¶
- Variables
- func CacheExpires(r *http.Response) time.Time
- type APIClient
- type APIKey
- type APIResponse
- type AggregateStatus
- type AidaApiAidaAnalyzeOpts
- type AidaApiAidaGenerateOpts
- type AidaApiService
- type AnalyzeRequestBody
- type AnalyzeResponse
- type BasicAuth
- type Configuration
- type CreateRequestBody
- type CreateRequestBody2
- type DashboardApiDashboardMetricsOpts
- type DashboardApiService
- type DashboardMetrics
- type ErrorResultWithIdentifier
- type EvaluateApiEvaluateEvaluateByIdsOpts
- type EvaluateApiEvaluateEvaluateByTypeCheckOpts
- type EvaluateApiEvaluateEvaluateByTypeOpts
- type EvaluateApiEvaluateEvaluateOpts
- type EvaluateApiService
- func (a *EvaluateApiService) EvaluateEvaluate(ctx context.Context, body EvaluateRequestBody, ...) (EvaluatedPolicy, *http.Response, error)
- func (a *EvaluateApiService) EvaluateEvaluateByIds(ctx context.Context, ids string, ...) (Evaluation, *http.Response, error)
- func (a *EvaluateApiService) EvaluateEvaluateByType(ctx context.Context, type_ string, action string, ...) (Evaluation, *http.Response, error)
- func (a *EvaluateApiService) EvaluateEvaluateByTypeCheck(ctx context.Context, type_ string, action string, ...) (EvaluateByTypeCheckResponseBody, *http.Response, error)
- type EvaluateByTypeCheckResponseBody
- type EvaluateRequestBody
- type EvaluatedPolicy
- type Evaluation
- type Evaluation2
- type EvaluationCounts
- type EvaluationDetail
- type EvaluationDetail2
- type EvaluationsApiEvaluationsFindOpts
- type EvaluationsApiEvaluationsListOpts
- type EvaluationsApiService
- type ExamplesApiExamplesListOpts
- type ExamplesApiService
- type GenerateRequestBody
- type GenericSwaggerError
- type GitErrorResult
- type LinkedPolicy
- type LinkedPolicy2
- type Linkedpolicyidentifier
- type ModelError
- type PoliciesApiPoliciesCreateOpts
- type PoliciesApiPoliciesDeleteOpts
- type PoliciesApiPoliciesFindOpts
- type PoliciesApiPoliciesListOpts
- type PoliciesApiPoliciesUpdateOpts
- type PoliciesApiService
- func (a *PoliciesApiService) PoliciesCreate(ctx context.Context, body CreateRequestBody, ...) (Policy, *http.Response, error)
- func (a *PoliciesApiService) PoliciesDelete(ctx context.Context, identifier string, ...) (*http.Response, error)
- func (a *PoliciesApiService) PoliciesFind(ctx context.Context, identifier string, ...) (Policy, *http.Response, error)
- func (a *PoliciesApiService) PoliciesList(ctx context.Context, localVarOptionals *PoliciesApiPoliciesListOpts) ([]Policy, *http.Response, error)
- func (a *PoliciesApiService) PoliciesUpdate(ctx context.Context, body UpdateRequestBody, identifier string, ...) (*http.Response, error)
- type Policy
- type PolicyExample
- type PolicyHealth
- type PolicySample
- type PolicySet
- type PolicySet2
- type PolicysetsApiPolicysetsCreateOpts
- type PolicysetsApiPolicysetsDeleteOpts
- type PolicysetsApiPolicysetsFindOpts
- type PolicysetsApiPolicysetsListOpts
- type PolicysetsApiPolicysetsUpdateOpts
- type PolicysetsApiService
- func (a *PolicysetsApiService) PolicysetsCreate(ctx context.Context, body CreateRequestBody2, ...) (PolicySet, *http.Response, error)
- func (a *PolicysetsApiService) PolicysetsDelete(ctx context.Context, identifier string, ...) (*http.Response, error)
- func (a *PolicysetsApiService) PolicysetsFind(ctx context.Context, identifier string, ...) (PolicySet, *http.Response, error)
- func (a *PolicysetsApiService) PolicysetsList(ctx context.Context, localVarOptionals *PolicysetsApiPolicysetsListOpts) ([]PolicySet, *http.Response, error)
- func (a *PolicysetsApiService) PolicysetsUpdate(ctx context.Context, body UpdateRequestBody2, identifier string, ...) (*http.Response, error)
- type ResourceGroup
- type ResourceGroupIdentifier
- type ServiceVersion
- type SystemApiService
- type UpdateRequestBody
- type UpdateRequestBody2
- type Variable
Constants ¶
This section is empty.
Variables ¶
var ( // ContextOAuth2 takes a oauth2.TokenSource as authentication for the request. ContextOAuth2 = contextKey("token") // ContextBasicAuth takes BasicAuth as authentication for the request. ContextBasicAuth = contextKey("basic") // ContextAccessToken takes a string oauth2 access token as authentication for the request. ContextAccessToken = contextKey("accesstoken") // ContextAPIKey takes an APIKey as authentication for the request ContextAPIKey = contextKey("apikey") )
Functions ¶
Types ¶
type APIClient ¶
type APIClient struct { AidaApi *AidaApiService DashboardApi *DashboardApiService EvaluateApi *EvaluateApiService EvaluationsApi *EvaluationsApiService ExamplesApi *ExamplesApiService PoliciesApi *PoliciesApiService PolicysetsApi *PolicysetsApiService SystemApi *SystemApiService // contains filtered or unexported fields }
APIClient manages communication with the Governance Policy Management API API v1.2.0 In most cases there should be only one, shared, APIClient.
func NewAPIClient ¶
func NewAPIClient(cfg *Configuration) *APIClient
NewAPIClient creates a new API client. Requires a userAgent string describing your application. optionally a custom http.Client to allow for advanced features such as caching.
func (*APIClient) ChangeBasePath ¶
Change base path to allow switching to mocks
type APIKey ¶
APIKey provides API key based authentication to a request passed via context using ContextAPIKey
type APIResponse ¶
type APIResponse struct { *http.Response `json:"-"` Message string `json:"message,omitempty"` // Operation is the name of the swagger operation. Operation string `json:"operation,omitempty"` // RequestURL is the request URL. This value is always available, even if the // embedded *http.Response is nil. RequestURL string `json:"url,omitempty"` // Method is the HTTP method used for the request. This value is always // available, even if the embedded *http.Response is nil. Method string `json:"method,omitempty"` // Payload holds the contents of the response body (which may be nil or empty). // This is provided here as the raw response.Body() reader will have already // been drained. Payload []byte `json:"-"` }
func NewAPIResponse ¶
func NewAPIResponse(r *http.Response) *APIResponse
func NewAPIResponseWithError ¶
func NewAPIResponseWithError(errorMessage string) *APIResponse
type AggregateStatus ¶
type AggregateStatus struct { // Count of evaluations that have a status of 'error' Error_ int64 `json:"error"` // Count of evaluations that have a status of 'pass' Pass int64 `json:"pass"` // The Unix time of this particular aggregation Time int64 `json:"time"` // Count of evaluations that have a status of 'warning' Warning int64 `json:"warning"` }
Aggregate metrics for evaluations on a single day
type AidaApiAidaAnalyzeOpts ¶ added in v0.3.53
type AidaApiAidaGenerateOpts ¶ added in v0.3.53
type AidaApiService ¶ added in v0.3.53
type AidaApiService service
func (*AidaApiService) AidaAnalyze ¶ added in v0.3.53
func (a *AidaApiService) AidaAnalyze(ctx context.Context, body AnalyzeRequestBody, localVarOptionals *AidaApiAidaAnalyzeOpts) (AnalyzeResponse, *http.Response, error)
func (*AidaApiService) AidaGenerate ¶ added in v0.3.53
func (a *AidaApiService) AidaGenerate(ctx context.Context, body GenerateRequestBody, localVarOptionals *AidaApiAidaGenerateOpts) (PolicySample, *http.Response, error)
type AnalyzeRequestBody ¶ added in v0.3.53
type AnalyzeResponse ¶ added in v0.3.53
type BasicAuth ¶
type BasicAuth struct { UserName string `json:"userName,omitempty"` Password string `json:"password,omitempty"` }
BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth
type Configuration ¶
type Configuration struct { BasePath string `json:"basePath,omitempty"` Host string `json:"host,omitempty"` Scheme string `json:"scheme,omitempty"` DefaultHeader map[string]string `json:"defaultHeader,omitempty"` UserAgent string `json:"userAgent,omitempty"` HTTPClient *http.Client }
func NewConfiguration ¶
func NewConfiguration() *Configuration
func (*Configuration) AddDefaultHeader ¶
func (c *Configuration) AddDefaultHeader(key string, value string)
type CreateRequestBody ¶
type CreateRequestBody struct { // The harness connector used for authenticating on the git provider GitConnectorRef string `json:"git_connector_ref,omitempty"` // The path to the file in the git repo GitPath string `json:"git_path,omitempty"` // The git repo the policy resides in GitRepo string `json:"git_repo,omitempty"` // Identifier for the policy Identifier string `json:"identifier"` // Name of the policy Name string `json:"name"` // Rego that defines the policy policy Rego string `json:"rego"` }
type CreateRequestBody2 ¶
type CreateRequestBody2 struct { // Action that triggers the policy set Action string `json:"action"` // Description of the policy set Description string `json:"description,omitempty"` // Only enabled policy sets are evaluated when evaluating by type/action Enabled bool `json:"enabled"` // Identifier for the policy set Identifier string `json:"identifier"` // Name of the policy set Name string `json:"name"` // Type of input suitable for the policy set Type_ string `json:"type"` }
type DashboardApiService ¶
type DashboardApiService service
func (*DashboardApiService) DashboardMetrics ¶
func (a *DashboardApiService) DashboardMetrics(ctx context.Context, localVarOptionals *DashboardApiDashboardMetricsOpts) (DashboardMetrics, *http.Response, error)
type DashboardMetrics ¶
type DashboardMetrics struct { // Aggregate evaluation counts by day Aggregates []AggregateStatus `json:"aggregates"` PolicyHealth *PolicyHealth `json:"policy_health"` }
type ErrorResultWithIdentifier ¶
type ErrorResultWithIdentifier struct { // Is the error a server-side fault? Fault bool `json:"fault"` // ID is a unique identifier for this particular occurrence of the problem. Id string `json:"id"` // the identifier associated with the error Identifier string `json:"identifier,omitempty"` // Message is a human-readable explanation specific to this occurrence of the problem. Message string `json:"message"` // Name is the name of this class of errors. Name string `json:"name"` // Is the error temporary? Temporary bool `json:"temporary"` // Is the error a timeout? Timeout bool `json:"timeout"` }
type EvaluateApiEvaluateEvaluateByIdsOpts ¶
type EvaluateApiEvaluateEvaluateByIdsOpts struct { AccountIdentifier optional.String OrgIdentifier optional.String ProjectIdentifier optional.String Entity optional.String EntityMetadata optional.String PrincipalIdentifier optional.String PrincipalType optional.String UserIdentifier optional.String XApiKey optional.String }
type EvaluateApiEvaluateEvaluateByTypeCheckOpts ¶ added in v0.3.53
type EvaluateApiEvaluateEvaluateByTypeOpts ¶
type EvaluateApiEvaluateEvaluateByTypeOpts struct { AccountIdentifier optional.String OrgIdentifier optional.String ProjectIdentifier optional.String Entity optional.String EntityMetadata optional.String PrincipalIdentifier optional.String PrincipalType optional.String UserIdentifier optional.String XApiKey optional.String }
type EvaluateApiService ¶
type EvaluateApiService service
func (*EvaluateApiService) EvaluateEvaluate ¶
func (a *EvaluateApiService) EvaluateEvaluate(ctx context.Context, body EvaluateRequestBody, localVarOptionals *EvaluateApiEvaluateEvaluateOpts) (EvaluatedPolicy, *http.Response, error)
func (*EvaluateApiService) EvaluateEvaluateByIds ¶
func (a *EvaluateApiService) EvaluateEvaluateByIds(ctx context.Context, ids string, localVarOptionals *EvaluateApiEvaluateEvaluateByIdsOpts) (Evaluation, *http.Response, error)
func (*EvaluateApiService) EvaluateEvaluateByType ¶
func (a *EvaluateApiService) EvaluateEvaluateByType(ctx context.Context, type_ string, action string, localVarOptionals *EvaluateApiEvaluateEvaluateByTypeOpts) (Evaluation, *http.Response, error)
func (*EvaluateApiService) EvaluateEvaluateByTypeCheck ¶ added in v0.3.53
func (a *EvaluateApiService) EvaluateEvaluateByTypeCheck(ctx context.Context, type_ string, action string, localVarOptionals *EvaluateApiEvaluateEvaluateByTypeCheckOpts) (EvaluateByTypeCheckResponseBody, *http.Response, error)
type EvaluateByTypeCheckResponseBody ¶ added in v0.3.53
type EvaluateByTypeCheckResponseBody struct { // Boolean value that indicates if there are policies to evaluate for the given type, action and acc/org/proj scope. ShouldEvaluate bool `json:"should_evaluate"` }
type EvaluateRequestBody ¶
type EvaluatedPolicy ¶
type EvaluatedPolicy struct { // The values of any `deny` rego rules as returned by the rego engine DenyMessages []string `json:"deny_messages"` // Any errors returned by the rego engine when this policy was evaluated Error_ string `json:"error"` // The output returned by the rego engine when this policy was evaluated Output **os.File `json:"output"` Policy *Policy `json:"policy"` // The overall status for this individual policy indicating whether it passed Status string `json:"status"` }
type Evaluation ¶
type Evaluation struct { // The Harness account in which the evaluation was performed AccountId string `json:"account_id"` // The action that triggered evaluation Action string `json:"action"` // The time at which the evaluation was performed in Unix time millseconds Created int64 `json:"created"` // The detailed results of te evaluation Details []EvaluationDetail `json:"details"` // An arbtrary user-supplied string that globally identifies the entity under evaluation Entity string `json:"entity"` // Additional arbtrary user-supplied metadta about the entity under evaluation EntityMetadata string `json:"entity_metadata"` // The ID of this evaluation Id int64 `json:"id"` // The input provided at evaluation time Input **os.File `json:"input"` // The Harness organisation in which the evaluation was performed OrgId string `json:"org_id"` // The Harness project in which the evaluation was performed ProjectId string `json:"project_id"` // The overall status of the evaluation indicating whether it passed Status string `json:"status"` // The types of the entity under evaluation Type_ string `json:"type"` }
type Evaluation2 ¶
type Evaluation2 struct { // The Harness account in which the evaluation was performed AccountId string `json:"account_id"` // The action that triggered evaluation Action string `json:"action"` // The time at which the evaluation was performed in Unix time millseconds Created int64 `json:"created"` // The detailed results of te evaluation Details []EvaluationDetail2 `json:"details"` // An arbtrary user-supplied string that globally identifies the entity under evaluation Entity string `json:"entity"` // Additional arbtrary user-supplied metadta about the entity under evaluation EntityMetadata string `json:"entity_metadata"` // The ID of this evaluation Id int64 `json:"id"` // The input provided at evaluation time Input **os.File `json:"input"` // The Harness organisation in which the evaluation was performed OrgId string `json:"org_id"` // The Harness project in which the evaluation was performed ProjectId string `json:"project_id"` // The overall status of the evaluation indicating whether it passed Status string `json:"status"` // The type of the entity under evaluation Type_ string `json:"type"` }
The result of a single evaluation
type EvaluationCounts ¶
type EvaluationCounts struct { // Count of evaluations that have a status of 'error' Error_ int64 `json:"error"` // Count of evaluations that have a status of 'pass' Pass int64 `json:"pass"` // Count of evaluations that have a status of 'warning' Warning int64 `json:"warning"` }
Evaluation counts by status
type EvaluationDetail ¶
type EvaluationDetail struct { // Harness account ID associated with this policy set AccountId string `json:"account_id"` // Action that triggers the policy set Action string `json:"action"` // Time the policy set was created Created int64 `json:"created"` // Description of the policy set Description string `json:"description,omitempty"` Details []EvaluatedPolicy `json:"details"` // Only enabled policy sets are evaluated when evaluating by type/action Enabled bool `json:"enabled"` // Identifier of the policy set Identifier string `json:"identifier"` // Name of the policy set Name string `json:"name"` // Harness organization ID associated with this policy set OrgId string `json:"org_id"` // Harness project ID associated with this policy set ProjectId string `json:"project_id"` // The overall status for this policy set indicating whether it passed Status string `json:"status"` // Type of input suitable for the policy set Type_ string `json:"type"` // Time the policy set was last updated Updated int64 `json:"updated"` }
type EvaluationDetail2 ¶
type EvaluationDetail2 struct { // Harness account ID associated with this policy set AccountId string `json:"account_id,omitempty"` // Action that triggers the policy set Action string `json:"action,omitempty"` // Time the policy set was created Created int64 `json:"created,omitempty"` // Description of the policy set Description string `json:"description,omitempty"` Details []EvaluatedPolicy `json:"details"` // Only enabled policy sets are evaluated when evaluating by type/action Enabled bool `json:"enabled,omitempty"` // Identifier of the policy set Identifier string `json:"identifier,omitempty"` // Name of the policy set Name string `json:"name,omitempty"` // Harness organization ID associated with this policy set OrgId string `json:"org_id,omitempty"` // Harness project ID associated with this policy set ProjectId string `json:"project_id,omitempty"` // The overall status for this policy set indicating whether it passed Status string `json:"status"` // Type of input suitable for the policy set Type_ string `json:"type,omitempty"` // Time the policy set was last updated Updated int64 `json:"updated,omitempty"` }
type EvaluationsApiEvaluationsListOpts ¶
type EvaluationsApiEvaluationsListOpts struct { AccountIdentifier optional.String OrgIdentifier optional.String ProjectIdentifier optional.String PerPage optional.Int32 Page optional.Int32 Entity optional.String Type_ optional.String Action optional.String LastSeen optional.Int64 CreatedDateFrom optional.Int64 CreatedDateTo optional.Int64 Status optional.String IncludeChildScopes optional.Bool XApiKey optional.String }
type EvaluationsApiService ¶
type EvaluationsApiService service
func (*EvaluationsApiService) EvaluationsFind ¶
func (a *EvaluationsApiService) EvaluationsFind(ctx context.Context, id int64, localVarOptionals *EvaluationsApiEvaluationsFindOpts) (Evaluation, *http.Response, error)
func (*EvaluationsApiService) EvaluationsList ¶
func (a *EvaluationsApiService) EvaluationsList(ctx context.Context, localVarOptionals *EvaluationsApiEvaluationsListOpts) ([]Evaluation, *http.Response, error)
type ExamplesApiService ¶
type ExamplesApiService service
func (*ExamplesApiService) ExamplesList ¶
func (a *ExamplesApiService) ExamplesList(ctx context.Context, localVarOptionals *ExamplesApiExamplesListOpts) ([]PolicyExample, *http.Response, error)
type GenerateRequestBody ¶ added in v0.3.53
type GenericSwaggerError ¶
type GenericSwaggerError struct {
// contains filtered or unexported fields
}
GenericSwaggerError Provides access to the body, error and model on returned errors.
func (GenericSwaggerError) Body ¶
func (e GenericSwaggerError) Body() []byte
Body returns the raw bytes of the response
func (GenericSwaggerError) Error ¶
func (e GenericSwaggerError) Error() string
Error returns non-empty string if there was an error.
func (GenericSwaggerError) Model ¶
func (e GenericSwaggerError) Model() interface{}
Model returns the unpacked model of the error
type GitErrorResult ¶
type LinkedPolicy ¶
type LinkedPolicy struct { // Harness account ID associated with this policy AccountId string `json:"account_id"` // Time the policy was created Created int64 `json:"created"` // identifier of the policy Identifier string `json:"identifier"` // Name of the policy Name string `json:"name"` // Harness organization ID associated with this policy OrgId string `json:"org_id"` // Harness project ID associated with this policy ProjectId string `json:"project_id"` // Rego that defines the policy Rego string `json:"rego"` // The severity of this policy in this context Severity string `json:"severity"` // Time the policy was last updated Updated int64 `json:"updated"` }
type LinkedPolicy2 ¶
type LinkedPolicy2 struct { // Harness account ID associated with this policy AccountId string `json:"account_id"` // Time the policy was created Created int64 `json:"created"` // identifier of the policy Identifier string `json:"identifier"` // Name of the policy Name string `json:"name"` // Harness organization ID associated with this policy OrgId string `json:"org_id"` // Harness project ID associated with this policy ProjectId string `json:"project_id"` // Rego that defines the policy Rego string `json:"rego"` // The severity of this policy in this context Severity string `json:"severity"` // Time the policy was last updated Updated int64 `json:"updated"` }
type Linkedpolicyidentifier ¶
type ModelError ¶
type ModelError struct { // Is the error a server-side fault? Fault bool `json:"fault"` // ID is a unique identifier for this particular occurrence of the problem. Id string `json:"id"` // Message is a human-readable explanation specific to this occurrence of the problem. Message string `json:"message"` // Name is the name of this class of errors. Name string `json:"name"` // Is the error temporary? Temporary bool `json:"temporary"` // Is the error a timeout? Timeout bool `json:"timeout"` }
type PoliciesApiPoliciesCreateOpts ¶
type PoliciesApiPoliciesCreateOpts struct { XApiKey optional.String AccountIdentifier optional.String OrgIdentifier optional.String ProjectIdentifier optional.String GitCommitMsg optional.String GitImport optional.Bool GitBranch optional.String GitIsNewBranch optional.Bool GitBaseBranch optional.String }
type PoliciesApiPoliciesUpdateOpts ¶
type PoliciesApiPoliciesUpdateOpts struct { XApiKey optional.String GitCommitMsg optional.String GitIsNewBranch optional.Bool GitBaseBranch optional.String GitBranch optional.String GitCommitSha optional.String GitFileId optional.String AccountIdentifier optional.String OrgIdentifier optional.String ProjectIdentifier optional.String }
type PoliciesApiService ¶
type PoliciesApiService service
func (*PoliciesApiService) PoliciesCreate ¶
func (a *PoliciesApiService) PoliciesCreate(ctx context.Context, body CreateRequestBody, localVarOptionals *PoliciesApiPoliciesCreateOpts) (Policy, *http.Response, error)
func (*PoliciesApiService) PoliciesDelete ¶
func (a *PoliciesApiService) PoliciesDelete(ctx context.Context, identifier string, localVarOptionals *PoliciesApiPoliciesDeleteOpts) (*http.Response, error)
func (*PoliciesApiService) PoliciesFind ¶
func (a *PoliciesApiService) PoliciesFind(ctx context.Context, identifier string, localVarOptionals *PoliciesApiPoliciesFindOpts) (Policy, *http.Response, error)
func (*PoliciesApiService) PoliciesList ¶
func (a *PoliciesApiService) PoliciesList(ctx context.Context, localVarOptionals *PoliciesApiPoliciesListOpts) ([]Policy, *http.Response, error)
func (*PoliciesApiService) PoliciesUpdate ¶
func (a *PoliciesApiService) PoliciesUpdate(ctx context.Context, body UpdateRequestBody, identifier string, localVarOptionals *PoliciesApiPoliciesUpdateOpts) (*http.Response, error)
type Policy ¶
type Policy struct { // Harness account ID associated with this policy AccountId string `json:"account_id"` // Time the policy was created Created int64 `json:"created"` // The commit sha of the commit that last effected the file GitCommitSha string `json:"git_commit_sha,omitempty"` // The harness connector used for authenticating on the git provider GitConnectorRef string `json:"git_connector_ref,omitempty"` // The default branch, the service pulls in changes from from this branch for policy evaluation GitDefaultBranch string `json:"git_default_branch,omitempty"` // The commit sha of the commit that last effected the file in the default branch GitDefaultBranchCommitSha string `json:"git_default_branch_commit_sha,omitempty"` // The file id of the file in the default branch, may be empty for bitbucket files GitDefaultBranchFileId string `json:"git_default_branch_file_id,omitempty"` // The url of the file in the default branch GitDefaultBranchFileUrl string `json:"git_default_branch_file_url,omitempty"` GitDefaultBranchUpdateError *GitErrorResult `json:"git_default_branch_update_error,omitempty"` // The last time the service successfully pulled in changes from the default branch GitDefaultBranchUpdated int64 `json:"git_default_branch_updated,omitempty"` // The file id of the file, may be empty for bitbucket files GitFileId string `json:"git_file_id,omitempty"` // The url of the file on the fit provider GitFileUrl string `json:"git_file_url,omitempty"` // The path to the file in the git repo GitPath string `json:"git_path,omitempty"` // The git repo the policy resides in GitRepo string `json:"git_repo,omitempty"` // identifier of the policy Identifier string `json:"identifier"` // Name of the policy Name string `json:"name"` // Harness organization ID associated with this policy OrgId string `json:"org_id"` // Harness project ID associated with this policy ProjectId string `json:"project_id"` // Rego that defines the policy Rego string `json:"rego"` // Time the policy was last updated Updated int64 `json:"updated"` }
type PolicyExample ¶
type PolicyExample struct { // Longer description of the example Desc string `json:"desc"` // Example input to illustrate the rego policy Input string `json:"input"` // Example name Name string `json:"name"` // Example rego policy Rego string `json:"rego"` // The type of entity illustrated in this example Type_ string `json:"type"` // The list of substitutable variables in the policy example Variables []Variable `json:"variables,omitempty"` }
Example policies and input
type PolicyHealth ¶
type PolicyHealth struct { // Total number of evaluations that have occurred TotalEvaluationCount int64 `json:"total_evaluation_count"` TotalEvaluationEntityCount *EvaluationCounts `json:"total_evaluation_entity_count"` // Total number of policies stored TotalPolicyCount int64 `json:"total_policy_count"` // Total number of policy sets stored TotalPolicySetCount int64 `json:"total_policy_set_count"` // Total number of policy sets by type TotalPolicySetEntityCount map[string]int64 `json:"total_policy_set_entity_count"` }
Policy health metrics
type PolicySample ¶ added in v0.3.53
type PolicySet ¶
type PolicySet struct { // Harness account ID associated with this policy set AccountId string `json:"account_id"` // Action that triggers the policy set Action string `json:"action"` // Time the policy set was created Created int64 `json:"created"` // Description of the policy set Description string `json:"description,omitempty"` // Only enabled policy sets are evaluated when evaluating by type/action Enabled bool `json:"enabled"` // A string enum value which determines which entities the policy set applies to during evaluation EntitySelector string `json:"entity_selector"` // Identifier of the policy set Identifier string `json:"identifier"` // Name of the policy set Name string `json:"name"` // Harness organization ID associated with this policy set OrgId string `json:"org_id"` // Policies linked to this policy set Policies []LinkedPolicy `json:"policies,omitempty"` // Harness project ID associated with this policy set ProjectId string `json:"project_id"` // The groups of resources that this policy set should be applied to ResourceGroups []ResourceGroup `json:"resource_groups,omitempty"` // Type of input suitable for the policy set Type_ string `json:"type"` // Time the policy set was last updated Updated int64 `json:"updated"` }
type PolicySet2 ¶
type PolicySet2 struct { // Harness account ID associated with this policy set AccountId string `json:"account_id"` // Action that triggers the policy set Action string `json:"action"` // Time the policy set was created Created int64 `json:"created"` // Description of the policy set Description string `json:"description,omitempty"` // Only enabled policy sets are evaluated when evaluating by type/action Enabled bool `json:"enabled"` // Identifier of the policy set Identifier string `json:"identifier"` // Name of the policy set Name string `json:"name"` // Harness organization ID associated with this policy set OrgId string `json:"org_id"` // Policies linked to this policy set Policies []LinkedPolicy2 `json:"policies,omitempty"` // Harness project ID associated with this policy set ProjectId string `json:"project_id"` // Type of input suitable for the policy set Type_ string `json:"type"` // Time the policy set was last updated Updated int64 `json:"updated"` }
type PolicysetsApiPolicysetsListOpts ¶
type PolicysetsApiPolicysetsListOpts struct { AccountIdentifier optional.String OrgIdentifier optional.String ProjectIdentifier optional.String PerPage optional.Int32 Page optional.Int32 SearchTerm optional.String Sort optional.String Type_ optional.String Action optional.String XApiKey optional.String }
type PolicysetsApiService ¶
type PolicysetsApiService service
func (*PolicysetsApiService) PolicysetsCreate ¶
func (a *PolicysetsApiService) PolicysetsCreate(ctx context.Context, body CreateRequestBody2, localVarOptionals *PolicysetsApiPolicysetsCreateOpts) (PolicySet, *http.Response, error)
func (*PolicysetsApiService) PolicysetsDelete ¶
func (a *PolicysetsApiService) PolicysetsDelete(ctx context.Context, identifier string, localVarOptionals *PolicysetsApiPolicysetsDeleteOpts) (*http.Response, error)
func (*PolicysetsApiService) PolicysetsFind ¶
func (a *PolicysetsApiService) PolicysetsFind(ctx context.Context, identifier string, localVarOptionals *PolicysetsApiPolicysetsFindOpts) (PolicySet, *http.Response, error)
func (*PolicysetsApiService) PolicysetsList ¶
func (a *PolicysetsApiService) PolicysetsList(ctx context.Context, localVarOptionals *PolicysetsApiPolicysetsListOpts) ([]PolicySet, *http.Response, error)
func (*PolicysetsApiService) PolicysetsUpdate ¶
func (a *PolicysetsApiService) PolicysetsUpdate(ctx context.Context, body UpdateRequestBody2, identifier string, localVarOptionals *PolicysetsApiPolicysetsUpdateOpts) (*http.Response, error)
type ResourceGroup ¶ added in v0.3.53
type ResourceGroup struct { // resource group account id AccountId string `json:"account_id"` // resource group timestamp Created int64 `json:"created"` // resource group identifier Identifier string `json:"identifier"` // resource group name Name string `json:"name"` // resource group org id OrgId string `json:"org_id"` // resource group project identifier ProjectId string `json:"project_id"` }
type ResourceGroupIdentifier ¶ added in v0.3.53
type ResourceGroupIdentifier struct { // resource group account id AccountId string `json:"account_id"` // resource group identifier Identifier string `json:"identifier"` // resource group org id OrgId string `json:"org_id"` // resource group project identifier ProjectId string `json:"project_id"` }
type ServiceVersion ¶
type SystemApiService ¶
type SystemApiService service
func (*SystemApiService) SystemHealth ¶
SystemApiService Check service health
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
func (*SystemApiService) SystemVersion ¶
func (a *SystemApiService) SystemVersion(ctx context.Context) (ServiceVersion, *http.Response, error)
SystemApiService Check service version
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ServiceVersion
type UpdateRequestBody ¶
type UpdateRequestBody2 ¶
type UpdateRequestBody2 struct { // Action that triggers the policy set Action string `json:"action,omitempty"` // Description of the policy set Description string `json:"description,omitempty"` // Only enabled policy sets are evaluated when evaluating by type/action Enabled bool `json:"enabled,omitempty"` // A string enum value which determines which entities the policy set applies to during evaluation. This feature is not available for all accounts, Contact support if you wish to have it enabled. EntitySelector string `json:"entity_selector,omitempty"` // Name of the policy set Name string `json:"name,omitempty"` // Policies linked to this policy set Policies []Linkedpolicyidentifier `json:"policies,omitempty"` // Resource groups that contain the resources that this policy set should be evaluated for. Resource groups are not supported for flag or custom policy sets. This feature is not available for all accounts, Contact support if you wish to have it enabled. ResourceGroups []ResourceGroupIdentifier `json:"resource_groups,omitempty"` // Type of input suitable for the policy set Type_ string `json:"type,omitempty"` }
type Variable ¶ added in v0.3.53
type Variable struct { // The values that are selected by default Default_ []string `json:"default,omitempty"` // Longer description of the variable to substitute Desc string `json:"desc,omitempty"` // The id of the variable to substitute in the rego Id string `json:"id,omitempty"` // The human readable name of the variable to substitute in the rego Name string `json:"name,omitempty"` // The variable type Type_ string `json:"type,omitempty"` // Pre populated sample values to substitute the variable with Values []string `json:"values,omitempty"` }
Source Files ¶
- api_aida.go
- api_dashboard.go
- api_evaluate.go
- api_evaluations.go
- api_examples.go
- api_policies.go
- api_policysets.go
- api_system.go
- client.go
- configuration.go
- model_aggregate_status.go
- model_analyze_request_body.go
- model_analyze_response.go
- model_create_request_body.go
- model_create_request_body2.go
- model_dashboard_metrics.go
- model_error.go
- model_error_result_with_identifier.go
- model_evaluate_by_type_check_response_body.go
- model_evaluate_request_body.go
- model_evaluated_policy.go
- model_evaluation.go
- model_evaluation2.go
- model_evaluation_counts.go
- model_evaluation_detail.go
- model_evaluation_detail2.go
- model_generate_request_body.go
- model_git_error_result.go
- model_linked_policy.go
- model_linked_policy2.go
- model_linkedpolicyidentifier.go
- model_policy.go
- model_policy_example.go
- model_policy_health.go
- model_policy_sample.go
- model_policy_set.go
- model_policy_set2.go
- model_resource_group.go
- model_resource_group_identifier.go
- model_service_version.go
- model_update_request_body.go
- model_update_request_body2.go
- model_variable.go
- response.go