moby_buildkit_v1_sourcepolicy

package
v0.18.2 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2024 License: Apache-2.0 Imports: 10 Imported by: 53

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	PolicyAction_name = map[int32]string{
		0: "ALLOW",
		1: "DENY",
		2: "CONVERT",
	}
	PolicyAction_value = map[string]int32{
		"ALLOW":   0,
		"DENY":    1,
		"CONVERT": 2,
	}
)

Enum value maps for PolicyAction.

View Source
var (
	AttrMatch_name = map[int32]string{
		0: "EQUAL",
		1: "NOTEQUAL",
		2: "MATCHES",
	}
	AttrMatch_value = map[string]int32{
		"EQUAL":    0,
		"NOTEQUAL": 1,
		"MATCHES":  2,
	}
)

Enum value maps for AttrMatch.

View Source
var (
	MatchType_name = map[int32]string{
		0: "WILDCARD",
		1: "EXACT",
		2: "REGEX",
	}
	MatchType_value = map[string]int32{
		"WILDCARD": 0,
		"EXACT":    1,
		"REGEX":    2,
	}
)

Enum value maps for MatchType.

View Source
var File_github_com_moby_buildkit_sourcepolicy_pb_policy_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type AttrConstraint

type AttrConstraint struct {
	Key       string    `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	Value     string    `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	Condition AttrMatch `protobuf:"varint,3,opt,name=condition,proto3,enum=moby.buildkit.v1.sourcepolicy.AttrMatch" json:"condition,omitempty"`
	// contains filtered or unexported fields
}

AttrConstraint defines a constraint on a source attribute

func (*AttrConstraint) CloneMessageVT added in v0.17.0

func (m *AttrConstraint) CloneMessageVT() proto.Message

func (*AttrConstraint) CloneVT added in v0.17.0

func (m *AttrConstraint) CloneVT() *AttrConstraint

func (*AttrConstraint) Descriptor deprecated

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

Deprecated: Use AttrConstraint.ProtoReflect.Descriptor instead.

func (*AttrConstraint) EqualMessageVT added in v0.17.0

func (this *AttrConstraint) EqualMessageVT(thatMsg proto.Message) bool

func (*AttrConstraint) EqualVT added in v0.17.0

func (this *AttrConstraint) EqualVT(that *AttrConstraint) bool

func (*AttrConstraint) GetCondition

func (x *AttrConstraint) GetCondition() AttrMatch

func (*AttrConstraint) GetKey

func (x *AttrConstraint) GetKey() string

func (*AttrConstraint) GetValue

func (x *AttrConstraint) GetValue() string

func (*AttrConstraint) MarshalToSizedBufferVT added in v0.17.0

func (m *AttrConstraint) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*AttrConstraint) MarshalToVT added in v0.17.0

func (m *AttrConstraint) MarshalToVT(dAtA []byte) (int, error)

func (*AttrConstraint) MarshalVT added in v0.17.0

func (m *AttrConstraint) MarshalVT() (dAtA []byte, err error)

func (*AttrConstraint) ProtoMessage

func (*AttrConstraint) ProtoMessage()

func (*AttrConstraint) ProtoReflect added in v0.17.0

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

func (*AttrConstraint) Reset

func (x *AttrConstraint) Reset()

func (*AttrConstraint) SizeVT added in v0.17.0

func (m *AttrConstraint) SizeVT() (n int)

func (*AttrConstraint) String

func (x *AttrConstraint) String() string

func (*AttrConstraint) UnmarshalVT added in v0.17.0

func (m *AttrConstraint) UnmarshalVT(dAtA []byte) error

type AttrMatch

type AttrMatch int32

AttrMatch defines the condition to match a source attribute

const (
	AttrMatch_EQUAL    AttrMatch = 0
	AttrMatch_NOTEQUAL AttrMatch = 1
	AttrMatch_MATCHES  AttrMatch = 2
)

func (AttrMatch) Descriptor added in v0.17.0

func (AttrMatch) Descriptor() protoreflect.EnumDescriptor

func (AttrMatch) Enum added in v0.17.0

func (x AttrMatch) Enum() *AttrMatch

func (AttrMatch) EnumDescriptor deprecated

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

Deprecated: Use AttrMatch.Descriptor instead.

func (AttrMatch) MarshalJSON

func (a AttrMatch) MarshalJSON() ([]byte, error)

func (AttrMatch) Number added in v0.17.0

func (x AttrMatch) Number() protoreflect.EnumNumber

func (AttrMatch) String

func (x AttrMatch) String() string

func (AttrMatch) Type added in v0.17.0

func (*AttrMatch) UnmarshalJSON

func (a *AttrMatch) UnmarshalJSON(data []byte) error

type MatchType

type MatchType int32

Match type is used to determine how a rule source is matched

const (
	// WILDCARD is the default matching type.
	// It may first attempt to due an exact match but will follow up with a wildcard match
	// For something more powerful, use REGEX
	MatchType_WILDCARD MatchType = 0
	// EXACT treats the source identifier as a litteral string match
	MatchType_EXACT MatchType = 1
	// REGEX treats the source identifier as a regular expression
	// With regex matching you can also use match groups to replace values in the destination identifier
	MatchType_REGEX MatchType = 2
)

func (MatchType) Descriptor added in v0.17.0

func (MatchType) Descriptor() protoreflect.EnumDescriptor

func (MatchType) Enum added in v0.17.0

func (x MatchType) Enum() *MatchType

func (MatchType) EnumDescriptor deprecated

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

Deprecated: Use MatchType.Descriptor instead.

func (MatchType) MarshalJSON

func (a MatchType) MarshalJSON() ([]byte, error)

func (MatchType) Number added in v0.17.0

func (x MatchType) Number() protoreflect.EnumNumber

func (MatchType) String

func (x MatchType) String() string

func (MatchType) Type added in v0.17.0

func (*MatchType) UnmarshalJSON

func (a *MatchType) UnmarshalJSON(data []byte) error

type Policy

type Policy struct {
	Version int64   `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"` // Currently 1
	Rules   []*Rule `protobuf:"bytes,2,rep,name=rules,proto3" json:"rules,omitempty"`
	// contains filtered or unexported fields
}

Policy is the list of rules the policy engine will perform

func (*Policy) CloneMessageVT added in v0.17.0

func (m *Policy) CloneMessageVT() proto.Message

func (*Policy) CloneVT added in v0.17.0

func (m *Policy) CloneVT() *Policy

func (*Policy) Descriptor deprecated

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

Deprecated: Use Policy.ProtoReflect.Descriptor instead.

func (*Policy) EqualMessageVT added in v0.17.0

func (this *Policy) EqualMessageVT(thatMsg proto.Message) bool

func (*Policy) EqualVT added in v0.17.0

func (this *Policy) EqualVT(that *Policy) bool

func (*Policy) GetRules

func (x *Policy) GetRules() []*Rule

func (*Policy) GetVersion

func (x *Policy) GetVersion() int64

func (*Policy) MarshalToSizedBufferVT added in v0.17.0

func (m *Policy) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*Policy) MarshalToVT added in v0.17.0

func (m *Policy) MarshalToVT(dAtA []byte) (int, error)

func (*Policy) MarshalVT added in v0.17.0

func (m *Policy) MarshalVT() (dAtA []byte, err error)

func (*Policy) ProtoMessage

func (*Policy) ProtoMessage()

func (*Policy) ProtoReflect added in v0.17.0

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

func (*Policy) Reset

func (x *Policy) Reset()

func (*Policy) SizeVT added in v0.17.0

func (m *Policy) SizeVT() (n int)

func (*Policy) String

func (x *Policy) String() string

func (*Policy) UnmarshalVT added in v0.17.0

func (m *Policy) UnmarshalVT(dAtA []byte) error

type PolicyAction

type PolicyAction int32

PolicyAction defines the action to take when a source is matched

const (
	PolicyAction_ALLOW   PolicyAction = 0
	PolicyAction_DENY    PolicyAction = 1
	PolicyAction_CONVERT PolicyAction = 2
)

func (PolicyAction) Descriptor added in v0.17.0

func (PolicyAction) Enum added in v0.17.0

func (x PolicyAction) Enum() *PolicyAction

func (PolicyAction) EnumDescriptor deprecated

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

Deprecated: Use PolicyAction.Descriptor instead.

func (PolicyAction) MarshalJSON

func (a PolicyAction) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler with custom marshaling for PolicyAction. It gives the string form of the enum value.

func (PolicyAction) Number added in v0.17.0

func (PolicyAction) String

func (x PolicyAction) String() string

func (PolicyAction) Type added in v0.17.0

func (*PolicyAction) UnmarshalJSON

func (a *PolicyAction) UnmarshalJSON(data []byte) error

type Rule

type Rule struct {
	Action   PolicyAction `protobuf:"varint,1,opt,name=action,proto3,enum=moby.buildkit.v1.sourcepolicy.PolicyAction" json:"action,omitempty"`
	Selector *Selector    `protobuf:"bytes,2,opt,name=selector,proto3" json:"selector,omitempty"`
	Updates  *Update      `protobuf:"bytes,3,opt,name=updates,proto3" json:"updates,omitempty"`
	// contains filtered or unexported fields
}

Rule defines the action(s) to take when a source is matched

func (*Rule) CloneMessageVT added in v0.17.0

func (m *Rule) CloneMessageVT() proto.Message

func (*Rule) CloneVT added in v0.17.0

func (m *Rule) CloneVT() *Rule

func (*Rule) Descriptor deprecated

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

Deprecated: Use Rule.ProtoReflect.Descriptor instead.

func (*Rule) EqualMessageVT added in v0.17.0

func (this *Rule) EqualMessageVT(thatMsg proto.Message) bool

func (*Rule) EqualVT added in v0.17.0

func (this *Rule) EqualVT(that *Rule) bool

func (*Rule) GetAction

func (x *Rule) GetAction() PolicyAction

func (*Rule) GetSelector

func (x *Rule) GetSelector() *Selector

func (*Rule) GetUpdates

func (x *Rule) GetUpdates() *Update

func (*Rule) MarshalToSizedBufferVT added in v0.17.0

func (m *Rule) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*Rule) MarshalToVT added in v0.17.0

func (m *Rule) MarshalToVT(dAtA []byte) (int, error)

func (*Rule) MarshalVT added in v0.17.0

func (m *Rule) MarshalVT() (dAtA []byte, err error)

func (*Rule) ProtoMessage

func (*Rule) ProtoMessage()

func (*Rule) ProtoReflect added in v0.17.0

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

func (*Rule) Reset

func (x *Rule) Reset()

func (*Rule) SizeVT added in v0.17.0

func (m *Rule) SizeVT() (n int)

func (*Rule) String

func (x *Rule) String() string

func (*Rule) UnmarshalVT added in v0.17.0

func (m *Rule) UnmarshalVT(dAtA []byte) error

type Selector

type Selector struct {
	Identifier string `protobuf:"bytes,1,opt,name=identifier,proto3" json:"identifier,omitempty"`
	// MatchType is the type of match to perform on the source identifier
	MatchType   MatchType         `` /* 134-byte string literal not displayed */
	Constraints []*AttrConstraint `protobuf:"bytes,3,rep,name=constraints,proto3" json:"constraints,omitempty"`
	// contains filtered or unexported fields
}

Selector identifies a source to match a policy to

func (*Selector) CloneMessageVT added in v0.17.0

func (m *Selector) CloneMessageVT() proto.Message

func (*Selector) CloneVT added in v0.17.0

func (m *Selector) CloneVT() *Selector

func (*Selector) Descriptor deprecated

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

Deprecated: Use Selector.ProtoReflect.Descriptor instead.

func (*Selector) EqualMessageVT added in v0.17.0

func (this *Selector) EqualMessageVT(thatMsg proto.Message) bool

func (*Selector) EqualVT added in v0.17.0

func (this *Selector) EqualVT(that *Selector) bool

func (*Selector) GetConstraints

func (x *Selector) GetConstraints() []*AttrConstraint

func (*Selector) GetIdentifier

func (x *Selector) GetIdentifier() string

func (*Selector) GetMatchType

func (x *Selector) GetMatchType() MatchType

func (*Selector) MarshalToSizedBufferVT added in v0.17.0

func (m *Selector) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*Selector) MarshalToVT added in v0.17.0

func (m *Selector) MarshalToVT(dAtA []byte) (int, error)

func (*Selector) MarshalVT added in v0.17.0

func (m *Selector) MarshalVT() (dAtA []byte, err error)

func (*Selector) ProtoMessage

func (*Selector) ProtoMessage()

func (*Selector) ProtoReflect added in v0.17.0

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

func (*Selector) Reset

func (x *Selector) Reset()

func (*Selector) SizeVT added in v0.17.0

func (m *Selector) SizeVT() (n int)

func (*Selector) String

func (x *Selector) String() string

func (*Selector) UnmarshalVT added in v0.17.0

func (m *Selector) UnmarshalVT(dAtA []byte) error

type Update

type Update struct {
	Identifier string            `protobuf:"bytes,1,opt,name=identifier,proto3" json:"identifier,omitempty"`
	Attrs      map[string]string `` /* 151-byte string literal not displayed */
	// contains filtered or unexported fields
}

Update contains updates to the matched build step after rule is applied

func (*Update) CloneMessageVT added in v0.17.0

func (m *Update) CloneMessageVT() proto.Message

func (*Update) CloneVT added in v0.17.0

func (m *Update) CloneVT() *Update

func (*Update) Descriptor deprecated

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

Deprecated: Use Update.ProtoReflect.Descriptor instead.

func (*Update) EqualMessageVT added in v0.17.0

func (this *Update) EqualMessageVT(thatMsg proto.Message) bool

func (*Update) EqualVT added in v0.17.0

func (this *Update) EqualVT(that *Update) bool

func (*Update) GetAttrs

func (x *Update) GetAttrs() map[string]string

func (*Update) GetIdentifier

func (x *Update) GetIdentifier() string

func (*Update) MarshalToSizedBufferVT added in v0.17.0

func (m *Update) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*Update) MarshalToVT added in v0.17.0

func (m *Update) MarshalToVT(dAtA []byte) (int, error)

func (*Update) MarshalVT added in v0.17.0

func (m *Update) MarshalVT() (dAtA []byte, err error)

func (*Update) ProtoMessage

func (*Update) ProtoMessage()

func (*Update) ProtoReflect added in v0.17.0

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

func (*Update) Reset

func (x *Update) Reset()

func (*Update) SizeVT added in v0.17.0

func (m *Update) SizeVT() (n int)

func (*Update) String

func (x *Update) String() string

func (*Update) UnmarshalVT added in v0.17.0

func (m *Update) UnmarshalVT(dAtA []byte) error

Jump to

Keyboard shortcuts

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