Documentation ¶
Index ¶
- Variables
- type AttrConstraint
- func (m *AttrConstraint) CloneMessageVT() proto.Message
- func (m *AttrConstraint) CloneVT() *AttrConstraint
- func (*AttrConstraint) Descriptor() ([]byte, []int)deprecated
- 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)deprecated
- 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)deprecated
- 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)deprecated
- 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)deprecated
- 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)deprecated
- 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)deprecated
- 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)deprecated
- 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
Constants ¶
This section is empty.
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
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
func (AttrMatch) Descriptor ¶ added in v0.17.0
func (AttrMatch) Descriptor() protoreflect.EnumDescriptor
func (AttrMatch) EnumDescriptor
deprecated
func (AttrMatch) MarshalJSON ¶
func (AttrMatch) Number ¶ added in v0.17.0
func (x AttrMatch) Number() protoreflect.EnumNumber
func (AttrMatch) Type ¶ added in v0.17.0
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 ¶ added in v0.17.0
func (MatchType) Descriptor() protoreflect.EnumDescriptor
func (MatchType) EnumDescriptor
deprecated
func (MatchType) MarshalJSON ¶
func (MatchType) Number ¶ added in v0.17.0
func (x MatchType) Number() protoreflect.EnumNumber
func (MatchType) Type ¶ added in v0.17.0
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 ¶ added in v0.17.0
func (*Policy) Descriptor
deprecated
func (*Policy) EqualMessageVT ¶ added in v0.17.0
func (*Policy) GetVersion ¶
func (*Policy) MarshalToSizedBufferVT ¶ added in v0.17.0
func (*Policy) MarshalToVT ¶ added in v0.17.0
func (*Policy) ProtoMessage ¶
func (*Policy) ProtoMessage()
func (*Policy) ProtoReflect ¶ added in v0.17.0
func (x *Policy) ProtoReflect() protoreflect.Message
func (*Policy) UnmarshalVT ¶ added in v0.17.0
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) Descriptor() protoreflect.EnumDescriptor
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 (x PolicyAction) Number() protoreflect.EnumNumber
func (PolicyAction) String ¶
func (x PolicyAction) String() string
func (PolicyAction) Type ¶ added in v0.17.0
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 ¶ added in v0.17.0
func (*Rule) Descriptor
deprecated
func (*Rule) EqualMessageVT ¶ added in v0.17.0
func (*Rule) GetAction ¶
func (x *Rule) GetAction() PolicyAction
func (*Rule) GetSelector ¶
func (*Rule) GetUpdates ¶
func (*Rule) MarshalToSizedBufferVT ¶ added in v0.17.0
func (*Rule) ProtoMessage ¶
func (*Rule) ProtoMessage()
func (*Rule) ProtoReflect ¶ added in v0.17.0
func (x *Rule) ProtoReflect() protoreflect.Message
func (*Rule) UnmarshalVT ¶ added in v0.17.0
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 (*Selector) Descriptor
deprecated
func (*Selector) EqualMessageVT ¶ added in v0.17.0
func (*Selector) GetConstraints ¶
func (x *Selector) GetConstraints() []*AttrConstraint
func (*Selector) GetIdentifier ¶
func (*Selector) GetMatchType ¶
func (*Selector) MarshalToSizedBufferVT ¶ added in v0.17.0
func (*Selector) MarshalToVT ¶ added in v0.17.0
func (*Selector) ProtoMessage ¶
func (*Selector) ProtoMessage()
func (*Selector) ProtoReflect ¶ added in v0.17.0
func (x *Selector) ProtoReflect() protoreflect.Message
func (*Selector) UnmarshalVT ¶ added in v0.17.0
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 (*Update) Descriptor
deprecated
func (*Update) EqualMessageVT ¶ added in v0.17.0
func (*Update) GetIdentifier ¶
func (*Update) MarshalToSizedBufferVT ¶ added in v0.17.0
func (*Update) MarshalToVT ¶ added in v0.17.0
func (*Update) ProtoMessage ¶
func (*Update) ProtoMessage()
func (*Update) ProtoReflect ¶ added in v0.17.0
func (x *Update) ProtoReflect() protoreflect.Message