v1alpha1

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package v1alpha1 contains versioned pmap contracts, e.g. resource mapping definition.

Package v1alpha1 contains versioned pmap contracts, e.g. resource mapping definition.

Index

Constants

View Source
const (
	// Reserved key where annotation from CAIS will be stored.
	AnnotationKeyAssetInfo = "assetInfo"
)

Variables

View Source
var File_pmap_event_proto protoreflect.FileDescriptor
View Source
var File_resource_mapping_proto protoreflect.FileDescriptor

Functions

func ValidateResourceMapping

func ValidateResourceMapping(m *ResourceMapping) (vErr error)

ValidateResourceMapping checks if the ResourceMapping is valid.

Types

type Contacts

type Contacts struct {

	// Required. Email of the person in the format of `john.doe@xyz`,
	Email []string `protobuf:"bytes,1,rep,name=email,proto3" json:"email,omitempty"`
	// contains filtered or unexported fields
}

Contacts.

func (*Contacts) Descriptor deprecated

func (*Contacts) Descriptor() ([]byte, []int)

Deprecated: Use Contacts.ProtoReflect.Descriptor instead.

func (*Contacts) GetEmail

func (x *Contacts) GetEmail() []string

func (*Contacts) ProtoMessage

func (*Contacts) ProtoMessage()

func (*Contacts) ProtoReflect

func (x *Contacts) ProtoReflect() protoreflect.Message

func (*Contacts) Reset

func (x *Contacts) Reset()

func (*Contacts) String

func (x *Contacts) String() string

type GitHubSource

type GitHubSource struct {

	// Required. The repository name where the payload is located.
	RepoName string `protobuf:"bytes,1,opt,name=repo_name,json=repoName,proto3" json:"repo_name,omitempty"`
	// Required. The file path of the payload.
	FilePath string `protobuf:"bytes,2,opt,name=file_path,json=filePath,proto3" json:"file_path,omitempty"`
	// Required. The git commit.
	Commit string `protobuf:"bytes,3,opt,name=commit,proto3" json:"commit,omitempty"`
	// Required. The github workflow that triggered the pmap event.
	// Example: pmap-snapshot-file-change
	Workflow string `protobuf:"bytes,4,opt,name=workflow,proto3" json:"workflow,omitempty"`
	// Required. The sha for the github workflow.
	// Example: 6a558007186d9a4ceb17590166a40f173e5df3ff
	WorkflowSha string `protobuf:"bytes,5,opt,name=workflow_sha,json=workflowSha,proto3" json:"workflow_sha,omitempty"`
	// Required. The timestamp when workflow is triggered.
	// Example: 2023-04-25T17:44:57Z
	WorkflowTriggeredTimestamp *timestamppb.Timestamp `` /* 141-byte string literal not displayed */
	// Required. The workflow run id.
	// Example: 5050509831
	WorkflowRunId string `protobuf:"bytes,7,opt,name=workflow_run_id,json=workflowRunId,proto3" json:"workflow_run_id,omitempty"`
	// Required. The workflow run attempts.
	// Example: 1
	WorkflowRunAttempt int64 `protobuf:"varint,8,opt,name=workflow_run_attempt,json=workflowRunAttempt,proto3" json:"workflow_run_attempt,omitempty"`
	// contains filtered or unexported fields
}

func (*GitHubSource) Descriptor deprecated

func (*GitHubSource) Descriptor() ([]byte, []int)

Deprecated: Use GitHubSource.ProtoReflect.Descriptor instead.

func (*GitHubSource) GetCommit

func (x *GitHubSource) GetCommit() string

func (*GitHubSource) GetFilePath

func (x *GitHubSource) GetFilePath() string

func (*GitHubSource) GetRepoName

func (x *GitHubSource) GetRepoName() string

func (*GitHubSource) GetWorkflow

func (x *GitHubSource) GetWorkflow() string

func (*GitHubSource) GetWorkflowRunAttempt

func (x *GitHubSource) GetWorkflowRunAttempt() int64

func (*GitHubSource) GetWorkflowRunId

func (x *GitHubSource) GetWorkflowRunId() string

func (*GitHubSource) GetWorkflowSha

func (x *GitHubSource) GetWorkflowSha() string

func (*GitHubSource) GetWorkflowTriggeredTimestamp

func (x *GitHubSource) GetWorkflowTriggeredTimestamp() *timestamppb.Timestamp

func (*GitHubSource) ProtoMessage

func (*GitHubSource) ProtoMessage()

func (*GitHubSource) ProtoReflect

func (x *GitHubSource) ProtoReflect() protoreflect.Message

func (*GitHubSource) Reset

func (x *GitHubSource) Reset()

func (*GitHubSource) String

func (x *GitHubSource) String() string

type PmapEvent

type PmapEvent struct {

	// Required.
	Payload *anypb.Any `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"`
	// Required. The type of the payload such as resource mapping and retention plan.
	Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
	// Required.
	Timestamp *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// Required. The source of the payload.
	GithubSource *GitHubSource `protobuf:"bytes,4,opt,name=github_source,json=githubSource,proto3" json:"github_source,omitempty"`
	// contains filtered or unexported fields
}

A representation of an event associated with creation/modification of privacy related information represented by a payload.

func (*PmapEvent) Descriptor deprecated

func (*PmapEvent) Descriptor() ([]byte, []int)

Deprecated: Use PmapEvent.ProtoReflect.Descriptor instead.

func (*PmapEvent) GetGithubSource

func (x *PmapEvent) GetGithubSource() *GitHubSource

func (*PmapEvent) GetPayload

func (x *PmapEvent) GetPayload() *anypb.Any

func (*PmapEvent) GetTimestamp

func (x *PmapEvent) GetTimestamp() *timestamppb.Timestamp

func (*PmapEvent) GetType

func (x *PmapEvent) GetType() string

func (*PmapEvent) ProtoMessage

func (*PmapEvent) ProtoMessage()

func (*PmapEvent) ProtoReflect

func (x *PmapEvent) ProtoReflect() protoreflect.Message

func (*PmapEvent) Reset

func (x *PmapEvent) Reset()

func (*PmapEvent) String

func (x *PmapEvent) String() string

type Resource

type Resource struct {

	// Required. Describe the provider of the resource. Example: `gcp`
	Provider string `protobuf:"bytes,1,opt,name=provider,proto3" json:"provider,omitempty"`
	// Required. The full resource name. Example:
	// `//spanner.googleapis.com/projects/p1/instances/i1/databases/d1`
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	// Optional. The representation for subresource in the format of a URL.
	// Subscope is the resource that is beyond cloud resource level, e.g.
	// spanner table, GCS object, etc.
	//
	// Format: "[SUBRESOURCE_HIERARCHY]?[ADDITIONAL_QUALIFIERS]"
	//
	// [SUBRESOURCE_HIERARCHY] represents the hierarchy of the subresource
	// E.g. "databases/example-db/tables/example-table".
	//
	// [ADDITIONAL_QUALIFIERS] represents the additional qualifiers to select
	// the data in the subresource. E.g. "source=example-org1&team=example-team".
	// Notice the keys and values must be in alphabetical order.
	//
	// Full example: "databases/example-db/tables/example-table?source=example-org1&team=example-team".
	Subscope string `protobuf:"bytes,3,opt,name=subscope,proto3" json:"subscope,omitempty"`
	// contains filtered or unexported fields
}

Identification of the ResourceMapping.

func (*Resource) Descriptor deprecated

func (*Resource) Descriptor() ([]byte, []int)

Deprecated: Use Resource.ProtoReflect.Descriptor instead.

func (*Resource) GetName

func (x *Resource) GetName() string

func (*Resource) GetProvider

func (x *Resource) GetProvider() string

func (*Resource) GetSubscope added in v0.0.4

func (x *Resource) GetSubscope() string

func (*Resource) ProtoMessage

func (*Resource) ProtoMessage()

func (*Resource) ProtoReflect

func (x *Resource) ProtoReflect() protoreflect.Message

func (*Resource) Reset

func (x *Resource) Reset()

func (*Resource) String

func (x *Resource) String() string

type ResourceMapping

type ResourceMapping struct {

	// Required. Resource that identifies the resource described by the ResourceMapping.
	Resource *Resource `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"`
	// Required. Contacts for the ResourceMapping.
	Contacts *Contacts `protobuf:"bytes,2,opt,name=contacts,proto3" json:"contacts,omitempty"`
	// Optional. A map of key (string), value (any type) pairs that annotates the resource. Example:
	//
	//	{
	//	 "retentionPlanId":  "611498",
	//	 "iamPolicy": {
	//	     "bindings": [
	//	       {
	//	         "role": "roles/pubsub.publisher",
	//	         "members": [XXXX],
	//	       }
	//	     ]
	//	   },
	//	}
	Annotations *structpb.Struct `protobuf:"bytes,3,opt,name=annotations,proto3" json:"annotations,omitempty"`
	// contains filtered or unexported fields
}

A ResourceMapping can be any resource in the GCP or non-GCP services.

func (*ResourceMapping) Descriptor deprecated

func (*ResourceMapping) Descriptor() ([]byte, []int)

Deprecated: Use ResourceMapping.ProtoReflect.Descriptor instead.

func (*ResourceMapping) GetAnnotations

func (x *ResourceMapping) GetAnnotations() *structpb.Struct

func (*ResourceMapping) GetContacts

func (x *ResourceMapping) GetContacts() *Contacts

func (*ResourceMapping) GetResource

func (x *ResourceMapping) GetResource() *Resource

func (*ResourceMapping) ProtoMessage

func (*ResourceMapping) ProtoMessage()

func (*ResourceMapping) ProtoReflect

func (x *ResourceMapping) ProtoReflect() protoreflect.Message

func (*ResourceMapping) Reset

func (x *ResourceMapping) Reset()

func (*ResourceMapping) String

func (x *ResourceMapping) String() string

Jump to

Keyboard shortcuts

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