version

package
v0.3.42 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Source_name = map[int32]string{
		0: "UNKNOWN_SOURCE",
		1: "WEB",
		2: "INTERACTIVE_PVNCTL",
		3: "CONFIG_FILE",
		4: "REPO_FOLLOW",
		5: "PRODVANA",
		6: "IAC",
	}
	Source_value = map[string]int32{
		"UNKNOWN_SOURCE":     0,
		"WEB":                1,
		"INTERACTIVE_PVNCTL": 2,
		"CONFIG_FILE":        3,
		"REPO_FOLLOW":        4,
		"PRODVANA":           5,
		"IAC":                6,
	}
)

Enum value maps for Source.

View Source
var File_prodvana_version_source_metadata_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Source

type Source int32
const (
	Source_UNKNOWN_SOURCE     Source = 0
	Source_WEB                Source = 1
	Source_INTERACTIVE_PVNCTL Source = 2
	Source_CONFIG_FILE        Source = 3
	Source_REPO_FOLLOW        Source = 4
	// this source indicates this version was provided by Prodvana
	// this is used for things like builtin Protections or other first party provided features
	Source_PRODVANA Source = 5
	// Infra as Code sources like Terraform and Pulumi
	Source_IAC Source = 6
)

func (Source) Descriptor

func (Source) Descriptor() protoreflect.EnumDescriptor

func (Source) Enum

func (x Source) Enum() *Source

func (Source) EnumDescriptor deprecated

func (Source) EnumDescriptor() ([]byte, []int)

Deprecated: Use Source.Descriptor instead.

func (Source) Number

func (x Source) Number() protoreflect.EnumNumber

func (Source) String

func (x Source) String() string

func (Source) Type

func (Source) Type() protoreflect.EnumType

type SourceMetadata

type SourceMetadata struct {

	// full repo URL, like git@github.com:foo/bar.git or https://github.com/foo/bar
	RepoUrl  string `protobuf:"bytes,1,opt,name=repo_url,json=repoUrl,proto3" json:"repo_url,omitempty"`
	FilePath string `protobuf:"bytes,2,opt,name=file_path,json=filePath,proto3" json:"file_path,omitempty"`
	Commit   string `protobuf:"bytes,3,opt,name=commit,proto3" json:"commit,omitempty"`
	// set internally, automatically, by Prodvana if the action was initiated by a user
	UserId string `protobuf:"bytes,4,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	// contains filtered or unexported fields
}

all of these fields are optional and only set if it makes sense for a given source.

func (*SourceMetadata) Descriptor deprecated

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

Deprecated: Use SourceMetadata.ProtoReflect.Descriptor instead.

func (*SourceMetadata) GetCommit

func (x *SourceMetadata) GetCommit() string

func (*SourceMetadata) GetFilePath

func (x *SourceMetadata) GetFilePath() string

func (*SourceMetadata) GetRepoUrl

func (x *SourceMetadata) GetRepoUrl() string

func (*SourceMetadata) GetUserId

func (x *SourceMetadata) GetUserId() string

func (*SourceMetadata) ProtoMessage

func (*SourceMetadata) ProtoMessage()

func (*SourceMetadata) ProtoReflect

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

func (*SourceMetadata) Reset

func (x *SourceMetadata) Reset()

func (*SourceMetadata) String

func (x *SourceMetadata) String() string

func (*SourceMetadata) Validate

func (m *SourceMetadata) Validate() error

Validate checks the field values on SourceMetadata with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*SourceMetadata) ValidateAll

func (m *SourceMetadata) ValidateAll() error

ValidateAll checks the field values on SourceMetadata with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in SourceMetadataMultiError, or nil if none found.

type SourceMetadataMultiError

type SourceMetadataMultiError []error

SourceMetadataMultiError is an error wrapping multiple validation errors returned by SourceMetadata.ValidateAll() if the designated constraints aren't met.

func (SourceMetadataMultiError) AllErrors

func (m SourceMetadataMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (SourceMetadataMultiError) Error

func (m SourceMetadataMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type SourceMetadataValidationError

type SourceMetadataValidationError struct {
	// contains filtered or unexported fields
}

SourceMetadataValidationError is the validation error returned by SourceMetadata.Validate if the designated constraints aren't met.

func (SourceMetadataValidationError) Cause

Cause function returns cause value.

func (SourceMetadataValidationError) Error

Error satisfies the builtin error interface

func (SourceMetadataValidationError) ErrorName

func (e SourceMetadataValidationError) ErrorName() string

ErrorName returns error name.

func (SourceMetadataValidationError) Field

Field function returns field value.

func (SourceMetadataValidationError) Key

Key function returns key value.

func (SourceMetadataValidationError) Reason

Reason function returns reason value.

Jump to

Keyboard shortcuts

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