package moby_buildkit_v1_sourcepolicy
import "github.com/moby/buildkit/sourcepolicy/pb"
Index ¶
- Variables
- type AttrConstraint
- func (m *AttrConstraint) CloneMessageVT() proto.Message
- func (m *AttrConstraint) CloneVT() *AttrConstraint
- func (*AttrConstraint) Descriptor() ([]byte, []int)
- func (this *AttrConstraint) EqualMessageVT(thatMsg proto.Message) bool
- func (this *AttrConstraint) EqualVT(that *AttrConstraint) bool
- func (x *AttrConstraint) GetCondition() AttrMatch
- func (x *AttrConstraint) GetKey() string
- func (x *AttrConstraint) GetValue() string
- func (m *AttrConstraint) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *AttrConstraint) MarshalToVT(dAtA []byte) (int, error)
- func (m *AttrConstraint) MarshalVT() (dAtA []byte, err error)
- func (*AttrConstraint) ProtoMessage()
- func (x *AttrConstraint) ProtoReflect() protoreflect.Message
- func (x *AttrConstraint) Reset()
- func (m *AttrConstraint) SizeVT() (n int)
- func (x *AttrConstraint) String() string
- func (m *AttrConstraint) UnmarshalVT(dAtA []byte) error
- type AttrMatch
- func (AttrMatch) Descriptor() protoreflect.EnumDescriptor
- func (x AttrMatch) Enum() *AttrMatch
- func (AttrMatch) EnumDescriptor() ([]byte, []int)
- func (a AttrMatch) MarshalJSON() ([]byte, error)
- func (x AttrMatch) Number() protoreflect.EnumNumber
- func (x AttrMatch) String() string
- func (AttrMatch) Type() protoreflect.EnumType
- func (a *AttrMatch) UnmarshalJSON(data []byte) error
- type MatchType
- func (MatchType) Descriptor() protoreflect.EnumDescriptor
- func (x MatchType) Enum() *MatchType
- func (MatchType) EnumDescriptor() ([]byte, []int)
- func (a MatchType) MarshalJSON() ([]byte, error)
- func (x MatchType) Number() protoreflect.EnumNumber
- func (x MatchType) String() string
- func (MatchType) Type() protoreflect.EnumType
- func (a *MatchType) UnmarshalJSON(data []byte) error
- type Policy
- func (m *Policy) CloneMessageVT() proto.Message
- func (m *Policy) CloneVT() *Policy
- func (*Policy) Descriptor() ([]byte, []int)
- func (this *Policy) EqualMessageVT(thatMsg proto.Message) bool
- func (this *Policy) EqualVT(that *Policy) bool
- func (x *Policy) GetRules() []*Rule
- func (x *Policy) GetVersion() int64
- func (m *Policy) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *Policy) MarshalToVT(dAtA []byte) (int, error)
- func (m *Policy) MarshalVT() (dAtA []byte, err error)
- func (*Policy) ProtoMessage()
- func (x *Policy) ProtoReflect() protoreflect.Message
- func (x *Policy) Reset()
- func (m *Policy) SizeVT() (n int)
- func (x *Policy) String() string
- func (m *Policy) UnmarshalVT(dAtA []byte) error
- type PolicyAction
- func (PolicyAction) Descriptor() protoreflect.EnumDescriptor
- func (x PolicyAction) Enum() *PolicyAction
- func (PolicyAction) EnumDescriptor() ([]byte, []int)
- func (a PolicyAction) MarshalJSON() ([]byte, error)
- func (x PolicyAction) Number() protoreflect.EnumNumber
- func (x PolicyAction) String() string
- func (PolicyAction) Type() protoreflect.EnumType
- func (a *PolicyAction) UnmarshalJSON(data []byte) error
- type Rule
- func (m *Rule) CloneMessageVT() proto.Message
- func (m *Rule) CloneVT() *Rule
- func (*Rule) Descriptor() ([]byte, []int)
- func (this *Rule) EqualMessageVT(thatMsg proto.Message) bool
- func (this *Rule) EqualVT(that *Rule) bool
- func (x *Rule) GetAction() PolicyAction
- func (x *Rule) GetSelector() *Selector
- func (x *Rule) GetUpdates() *Update
- func (m *Rule) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *Rule) MarshalToVT(dAtA []byte) (int, error)
- func (m *Rule) MarshalVT() (dAtA []byte, err error)
- func (*Rule) ProtoMessage()
- func (x *Rule) ProtoReflect() protoreflect.Message
- func (x *Rule) Reset()
- func (m *Rule) SizeVT() (n int)
- func (x *Rule) String() string
- func (m *Rule) UnmarshalVT(dAtA []byte) error
- type Selector
- func (m *Selector) CloneMessageVT() proto.Message
- func (m *Selector) CloneVT() *Selector
- func (*Selector) Descriptor() ([]byte, []int)
- func (this *Selector) EqualMessageVT(thatMsg proto.Message) bool
- func (this *Selector) EqualVT(that *Selector) bool
- func (x *Selector) GetConstraints() []*AttrConstraint
- func (x *Selector) GetIdentifier() string
- func (x *Selector) GetMatchType() MatchType
- func (m *Selector) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *Selector) MarshalToVT(dAtA []byte) (int, error)
- func (m *Selector) MarshalVT() (dAtA []byte, err error)
- func (*Selector) ProtoMessage()
- func (x *Selector) ProtoReflect() protoreflect.Message
- func (x *Selector) Reset()
- func (m *Selector) SizeVT() (n int)
- func (x *Selector) String() string
- func (m *Selector) UnmarshalVT(dAtA []byte) error
- type Update
- func (m *Update) CloneMessageVT() proto.Message
- func (m *Update) CloneVT() *Update
- func (*Update) Descriptor() ([]byte, []int)
- func (this *Update) EqualMessageVT(thatMsg proto.Message) bool
- func (this *Update) EqualVT(that *Update) bool
- func (x *Update) GetAttrs() map[string]string
- func (x *Update) GetIdentifier() string
- func (m *Update) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *Update) MarshalToVT(dAtA []byte) (int, error)
- func (m *Update) MarshalVT() (dAtA []byte, err error)
- func (*Update) ProtoMessage()
- func (x *Update) ProtoReflect() protoreflect.Message
- func (x *Update) Reset()
- func (m *Update) SizeVT() (n int)
- func (x *Update) String() string
- func (m *Update) UnmarshalVT(dAtA []byte) error
Variables ¶
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.
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.
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.
var File_github_com_moby_buildkit_sourcepolicy_pb_policy_proto protoreflect.FileDescriptor
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 ¶
func (m *AttrConstraint) CloneMessageVT() proto.Message
func (*AttrConstraint) CloneVT ¶
func (m *AttrConstraint) CloneVT() *AttrConstraint
func (*AttrConstraint) Descriptor ¶
func (*AttrConstraint) Descriptor() ([]byte, []int)
Deprecated: Use AttrConstraint.ProtoReflect.Descriptor instead.
func (*AttrConstraint) EqualMessageVT ¶
func (this *AttrConstraint) EqualMessageVT(thatMsg proto.Message) bool
func (*AttrConstraint) EqualVT ¶
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 ¶
func (m *AttrConstraint) MarshalToSizedBufferVT(dAtA []byte) (int, error)
func (*AttrConstraint) MarshalToVT ¶
func (m *AttrConstraint) MarshalToVT(dAtA []byte) (int, error)
func (*AttrConstraint) MarshalVT ¶
func (m *AttrConstraint) MarshalVT() (dAtA []byte, err error)
func (*AttrConstraint) ProtoMessage ¶
func (*AttrConstraint) ProtoMessage()
func (*AttrConstraint) ProtoReflect ¶
func (x *AttrConstraint) ProtoReflect() protoreflect.Message
func (*AttrConstraint) Reset ¶
func (x *AttrConstraint) Reset()
func (*AttrConstraint) SizeVT ¶
func (m *AttrConstraint) SizeVT() (n int)
func (*AttrConstraint) String ¶
func (x *AttrConstraint) String() string
func (*AttrConstraint) UnmarshalVT ¶
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 ¶
func (AttrMatch) Descriptor() protoreflect.EnumDescriptor
func (AttrMatch) Enum ¶
func (AttrMatch) EnumDescriptor ¶
Deprecated: Use AttrMatch.Descriptor instead.
func (AttrMatch) MarshalJSON ¶
func (AttrMatch) Number ¶
func (x AttrMatch) Number() protoreflect.EnumNumber
func (AttrMatch) String ¶
func (AttrMatch) Type ¶
func (AttrMatch) Type() protoreflect.EnumType
func (*AttrMatch) UnmarshalJSON ¶
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 ¶
func (MatchType) Descriptor() protoreflect.EnumDescriptor
func (MatchType) Enum ¶
func (MatchType) EnumDescriptor ¶
Deprecated: Use MatchType.Descriptor instead.
func (MatchType) MarshalJSON ¶
func (MatchType) Number ¶
func (x MatchType) Number() protoreflect.EnumNumber
func (MatchType) String ¶
func (MatchType) Type ¶
func (MatchType) Type() protoreflect.EnumType
func (*MatchType) UnmarshalJSON ¶
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 ¶
func (*Policy) CloneVT ¶
func (*Policy) Descriptor ¶
Deprecated: Use Policy.ProtoReflect.Descriptor instead.
func (*Policy) EqualMessageVT ¶
func (*Policy) EqualVT ¶
func (*Policy) GetRules ¶
func (*Policy) GetVersion ¶
func (*Policy) MarshalToSizedBufferVT ¶
func (*Policy) MarshalToVT ¶
func (*Policy) MarshalVT ¶
func (*Policy) ProtoMessage ¶
func (*Policy) ProtoMessage()
func (*Policy) ProtoReflect ¶
func (x *Policy) ProtoReflect() protoreflect.Message
func (*Policy) Reset ¶
func (x *Policy) Reset()
func (*Policy) SizeVT ¶
func (*Policy) String ¶
func (*Policy) UnmarshalVT ¶
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 ¶
func (PolicyAction) Descriptor() protoreflect.EnumDescriptor
func (PolicyAction) Enum ¶
func (x PolicyAction) Enum() *PolicyAction
func (PolicyAction) EnumDescriptor ¶
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 ¶
func (x PolicyAction) Number() protoreflect.EnumNumber
func (PolicyAction) String ¶
func (x PolicyAction) String() string
func (PolicyAction) Type ¶
func (PolicyAction) Type() protoreflect.EnumType
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 ¶
func (*Rule) CloneVT ¶
func (*Rule) Descriptor ¶
Deprecated: Use Rule.ProtoReflect.Descriptor instead.
func (*Rule) EqualMessageVT ¶
func (*Rule) EqualVT ¶
func (*Rule) GetAction ¶
func (x *Rule) GetAction() PolicyAction
func (*Rule) GetSelector ¶
func (*Rule) GetUpdates ¶
func (*Rule) MarshalToSizedBufferVT ¶
func (*Rule) MarshalToVT ¶
func (*Rule) MarshalVT ¶
func (*Rule) ProtoMessage ¶
func (*Rule) ProtoMessage()
func (*Rule) ProtoReflect ¶
func (x *Rule) ProtoReflect() protoreflect.Message
func (*Rule) Reset ¶
func (x *Rule) Reset()
func (*Rule) SizeVT ¶
func (*Rule) String ¶
func (*Rule) UnmarshalVT ¶
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 `protobuf:"varint,2,opt,name=match_type,json=matchType,proto3,enum=moby.buildkit.v1.sourcepolicy.MatchType" json:"match_type,omitempty"` 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 ¶
func (*Selector) CloneVT ¶
func (*Selector) Descriptor ¶
Deprecated: Use Selector.ProtoReflect.Descriptor instead.
func (*Selector) EqualMessageVT ¶
func (*Selector) EqualVT ¶
func (*Selector) GetConstraints ¶
func (x *Selector) GetConstraints() []*AttrConstraint
func (*Selector) GetIdentifier ¶
func (*Selector) GetMatchType ¶
func (*Selector) MarshalToSizedBufferVT ¶
func (*Selector) MarshalToVT ¶
func (*Selector) MarshalVT ¶
func (*Selector) ProtoMessage ¶
func (*Selector) ProtoMessage()
func (*Selector) ProtoReflect ¶
func (x *Selector) ProtoReflect() protoreflect.Message
func (*Selector) Reset ¶
func (x *Selector) Reset()
func (*Selector) SizeVT ¶
func (*Selector) String ¶
func (*Selector) UnmarshalVT ¶
type Update ¶
type Update struct { Identifier string `protobuf:"bytes,1,opt,name=identifier,proto3" json:"identifier,omitempty"` Attrs map[string]string `protobuf:"bytes,2,rep,name=attrs,proto3" json:"attrs,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // contains filtered or unexported fields }
Update contains updates to the matched build step after rule is applied
func (*Update) CloneMessageVT ¶
func (*Update) CloneVT ¶
func (*Update) Descriptor ¶
Deprecated: Use Update.ProtoReflect.Descriptor instead.
func (*Update) EqualMessageVT ¶
func (*Update) EqualVT ¶
func (*Update) GetAttrs ¶
func (*Update) GetIdentifier ¶
func (*Update) MarshalToSizedBufferVT ¶
func (*Update) MarshalToVT ¶
func (*Update) MarshalVT ¶
func (*Update) ProtoMessage ¶
func (*Update) ProtoMessage()
func (*Update) ProtoReflect ¶
func (x *Update) ProtoReflect() protoreflect.Message
func (*Update) Reset ¶
func (x *Update) Reset()
func (*Update) SizeVT ¶
func (*Update) String ¶
func (*Update) UnmarshalVT ¶
Source Files ¶
json.go policy.pb.go policy_vtproto.pb.go
- Version
- v0.21.0 (latest)
- Published
- Apr 11, 2025
- Platform
- linux/amd64
- Imports
- 10 packages
- Last checked
- 11 hours ago –
Tools for package owners.