package moby_buildkit_v1_sourcepolicy
import "github.com/moby/buildkit/sourcepolicy/pb"
Index ¶
- Variables
- type AttrConstraint
- func (*AttrConstraint) Descriptor() ([]byte, []int)
- func (m *AttrConstraint) GetCondition() AttrMatch
- func (m *AttrConstraint) GetKey() string
- func (m *AttrConstraint) GetValue() string
- func (m *AttrConstraint) Marshal() (dAtA []byte, err error)
- func (m *AttrConstraint) MarshalTo(dAtA []byte) (int, error)
- func (m *AttrConstraint) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*AttrConstraint) ProtoMessage()
- func (m *AttrConstraint) Reset()
- func (m *AttrConstraint) Size() (n int)
- func (m *AttrConstraint) String() string
- func (m *AttrConstraint) Unmarshal(dAtA []byte) error
- func (m *AttrConstraint) XXX_DiscardUnknown()
- func (m *AttrConstraint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *AttrConstraint) XXX_Merge(src proto.Message)
- func (m *AttrConstraint) XXX_Size() int
- func (m *AttrConstraint) XXX_Unmarshal(b []byte) error
- type AttrMatch
- func (AttrMatch) EnumDescriptor() ([]byte, []int)
- func (a AttrMatch) MarshalJSON() ([]byte, error)
- func (x AttrMatch) String() string
- func (a *AttrMatch) UnmarshalJSON(data []byte) error
- type MatchType
- func (MatchType) EnumDescriptor() ([]byte, []int)
- func (a MatchType) MarshalJSON() ([]byte, error)
- func (x MatchType) String() string
- func (a *MatchType) UnmarshalJSON(data []byte) error
- type Policy
- func (*Policy) Descriptor() ([]byte, []int)
- func (m *Policy) GetRules() []*Rule
- func (m *Policy) GetVersion() int64
- func (m *Policy) Marshal() (dAtA []byte, err error)
- func (m *Policy) MarshalTo(dAtA []byte) (int, error)
- func (m *Policy) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Policy) ProtoMessage()
- func (m *Policy) Reset()
- func (m *Policy) Size() (n int)
- func (m *Policy) String() string
- func (m *Policy) Unmarshal(dAtA []byte) error
- func (m *Policy) XXX_DiscardUnknown()
- func (m *Policy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Policy) XXX_Merge(src proto.Message)
- func (m *Policy) XXX_Size() int
- func (m *Policy) XXX_Unmarshal(b []byte) error
- type PolicyAction
- func (PolicyAction) EnumDescriptor() ([]byte, []int)
- func (a PolicyAction) MarshalJSON() ([]byte, error)
- func (x PolicyAction) String() string
- func (a *PolicyAction) UnmarshalJSON(data []byte) error
- type Rule
- func (*Rule) Descriptor() ([]byte, []int)
- func (m *Rule) GetAction() PolicyAction
- func (m *Rule) GetSelector() *Selector
- func (m *Rule) GetUpdates() *Update
- func (m *Rule) Marshal() (dAtA []byte, err error)
- func (m *Rule) MarshalTo(dAtA []byte) (int, error)
- func (m *Rule) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Rule) ProtoMessage()
- func (m *Rule) Reset()
- func (m *Rule) Size() (n int)
- func (m *Rule) String() string
- func (m *Rule) Unmarshal(dAtA []byte) error
- func (m *Rule) XXX_DiscardUnknown()
- func (m *Rule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Rule) XXX_Merge(src proto.Message)
- func (m *Rule) XXX_Size() int
- func (m *Rule) XXX_Unmarshal(b []byte) error
- type Selector
- func (*Selector) Descriptor() ([]byte, []int)
- func (m *Selector) GetConstraints() []*AttrConstraint
- func (m *Selector) GetIdentifier() string
- func (m *Selector) GetMatchType() MatchType
- func (m *Selector) Marshal() (dAtA []byte, err error)
- func (m *Selector) MarshalTo(dAtA []byte) (int, error)
- func (m *Selector) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Selector) ProtoMessage()
- func (m *Selector) Reset()
- func (m *Selector) Size() (n int)
- func (m *Selector) String() string
- func (m *Selector) Unmarshal(dAtA []byte) error
- func (m *Selector) XXX_DiscardUnknown()
- func (m *Selector) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Selector) XXX_Merge(src proto.Message)
- func (m *Selector) XXX_Size() int
- func (m *Selector) XXX_Unmarshal(b []byte) error
- type Update
- func (*Update) Descriptor() ([]byte, []int)
- func (m *Update) GetAttrs() map[string]string
- func (m *Update) GetIdentifier() string
- func (m *Update) Marshal() (dAtA []byte, err error)
- func (m *Update) MarshalTo(dAtA []byte) (int, error)
- func (m *Update) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Update) ProtoMessage()
- func (m *Update) Reset()
- func (m *Update) Size() (n int)
- func (m *Update) String() string
- func (m *Update) Unmarshal(dAtA []byte) error
- func (m *Update) XXX_DiscardUnknown()
- func (m *Update) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Update) XXX_Merge(src proto.Message)
- func (m *Update) XXX_Size() int
- func (m *Update) XXX_Unmarshal(b []byte) error
Variables ¶
var ( ErrInvalidLengthPolicy = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowPolicy = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupPolicy = fmt.Errorf("proto: unexpected end of group") )
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"` }
AttrConstraint defines a constraint on a source attribute
func (*AttrConstraint) Descriptor ¶
func (*AttrConstraint) Descriptor() ([]byte, []int)
func (*AttrConstraint) GetCondition ¶
func (m *AttrConstraint) GetCondition() AttrMatch
func (*AttrConstraint) GetKey ¶
func (m *AttrConstraint) GetKey() string
func (*AttrConstraint) GetValue ¶
func (m *AttrConstraint) GetValue() string
func (*AttrConstraint) Marshal ¶
func (m *AttrConstraint) Marshal() (dAtA []byte, err error)
func (*AttrConstraint) MarshalTo ¶
func (m *AttrConstraint) MarshalTo(dAtA []byte) (int, error)
func (*AttrConstraint) MarshalToSizedBuffer ¶
func (m *AttrConstraint) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*AttrConstraint) ProtoMessage ¶
func (*AttrConstraint) ProtoMessage()
func (*AttrConstraint) Reset ¶
func (m *AttrConstraint) Reset()
func (*AttrConstraint) Size ¶
func (m *AttrConstraint) Size() (n int)
func (*AttrConstraint) String ¶
func (m *AttrConstraint) String() string
func (*AttrConstraint) Unmarshal ¶
func (m *AttrConstraint) Unmarshal(dAtA []byte) error
func (*AttrConstraint) XXX_DiscardUnknown ¶
func (m *AttrConstraint) XXX_DiscardUnknown()
func (*AttrConstraint) XXX_Marshal ¶
func (m *AttrConstraint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*AttrConstraint) XXX_Merge ¶
func (m *AttrConstraint) XXX_Merge(src proto.Message)
func (*AttrConstraint) XXX_Size ¶
func (m *AttrConstraint) XXX_Size() int
func (*AttrConstraint) XXX_Unmarshal ¶
func (m *AttrConstraint) XXX_Unmarshal(b []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) EnumDescriptor ¶
func (AttrMatch) MarshalJSON ¶
func (AttrMatch) String ¶
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) EnumDescriptor ¶
func (MatchType) MarshalJSON ¶
func (MatchType) String ¶
func (*MatchType) UnmarshalJSON ¶
type Policy ¶
type Policy struct { Version int64 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"` Rules []*Rule `protobuf:"bytes,2,rep,name=rules,proto3" json:"rules,omitempty"` }
Policy is the list of rules the policy engine will perform
func (*Policy) Descriptor ¶
func (*Policy) GetRules ¶
func (*Policy) GetVersion ¶
func (*Policy) Marshal ¶
func (*Policy) MarshalTo ¶
func (*Policy) MarshalToSizedBuffer ¶
func (*Policy) ProtoMessage ¶
func (*Policy) ProtoMessage()
func (*Policy) Reset ¶
func (m *Policy) Reset()
func (*Policy) Size ¶
func (*Policy) String ¶
func (*Policy) Unmarshal ¶
func (*Policy) XXX_DiscardUnknown ¶
func (m *Policy) XXX_DiscardUnknown()
func (*Policy) XXX_Marshal ¶
func (*Policy) XXX_Merge ¶
func (*Policy) XXX_Size ¶
func (*Policy) XXX_Unmarshal ¶
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) EnumDescriptor ¶
func (PolicyAction) EnumDescriptor() ([]byte, []int)
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) String ¶
func (x PolicyAction) String() string
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"` }
Rule defines the action(s) to take when a source is matched
func (*Rule) Descriptor ¶
func (*Rule) GetAction ¶
func (m *Rule) GetAction() PolicyAction
func (*Rule) GetSelector ¶
func (*Rule) GetUpdates ¶
func (*Rule) Marshal ¶
func (*Rule) MarshalTo ¶
func (*Rule) MarshalToSizedBuffer ¶
func (*Rule) ProtoMessage ¶
func (*Rule) ProtoMessage()
func (*Rule) Reset ¶
func (m *Rule) Reset()
func (*Rule) Size ¶
func (*Rule) String ¶
func (*Rule) Unmarshal ¶
func (*Rule) XXX_DiscardUnknown ¶
func (m *Rule) XXX_DiscardUnknown()
func (*Rule) XXX_Marshal ¶
func (*Rule) XXX_Merge ¶
func (*Rule) XXX_Size ¶
func (*Rule) XXX_Unmarshal ¶
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"` }
Selector identifies a source to match a policy to
func (*Selector) Descriptor ¶
func (*Selector) GetConstraints ¶
func (m *Selector) GetConstraints() []*AttrConstraint
func (*Selector) GetIdentifier ¶
func (*Selector) GetMatchType ¶
func (*Selector) Marshal ¶
func (*Selector) MarshalTo ¶
func (*Selector) MarshalToSizedBuffer ¶
func (*Selector) ProtoMessage ¶
func (*Selector) ProtoMessage()
func (*Selector) Reset ¶
func (m *Selector) Reset()
func (*Selector) Size ¶
func (*Selector) String ¶
func (*Selector) Unmarshal ¶
func (*Selector) XXX_DiscardUnknown ¶
func (m *Selector) XXX_DiscardUnknown()
func (*Selector) XXX_Marshal ¶
func (*Selector) XXX_Merge ¶
func (*Selector) XXX_Size ¶
func (*Selector) XXX_Unmarshal ¶
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"` }
Update contains updates to the matched build step after rule is applied
func (*Update) Descriptor ¶
func (*Update) GetAttrs ¶
func (*Update) GetIdentifier ¶
func (*Update) Marshal ¶
func (*Update) MarshalTo ¶
func (*Update) MarshalToSizedBuffer ¶
func (*Update) ProtoMessage ¶
func (*Update) ProtoMessage()
func (*Update) Reset ¶
func (m *Update) Reset()
func (*Update) Size ¶
func (*Update) String ¶
func (*Update) Unmarshal ¶
func (*Update) XXX_DiscardUnknown ¶
func (m *Update) XXX_DiscardUnknown()
func (*Update) XXX_Marshal ¶
func (*Update) XXX_Merge ¶
func (*Update) XXX_Size ¶
func (*Update) XXX_Unmarshal ¶
Source Files ¶
generate.go json.go policy.pb.go
- Version
- v0.13.1
- Published
- Mar 18, 2024
- Platform
- js/wasm
- Imports
- 6 packages
- Last checked
- 3 minutes ago –
Tools for package owners.