Documentation ¶
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
- type MatchType
- 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
- 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
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidLengthPolicy = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowPolicy = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupPolicy = fmt.Errorf("proto: unexpected end of group") )
View Source
var AttrMatch_name = map[int32]string{
0: "EQUAL",
1: "NOTEQUAL",
2: "MATCHES",
}
View Source
var AttrMatch_value = map[string]int32{
"EQUAL": 0,
"NOTEQUAL": 1,
"MATCHES": 2,
}
View Source
var MatchType_name = map[int32]string{
0: "WILDCARD",
1: "EXACT",
2: "REGEX",
}
View Source
var MatchType_value = map[string]int32{
"WILDCARD": 0,
"EXACT": 1,
"REGEX": 2,
}
View Source
var PolicyAction_name = map[int32]string{
0: "ALLOW",
1: "DENY",
2: "CONVERT",
}
View Source
var PolicyAction_value = map[string]int32{
"ALLOW": 0,
"DENY": 1,
"CONVERT": 2,
}
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"` }
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) 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
func (AttrMatch) EnumDescriptor ¶
func (AttrMatch) MarshalJSON ¶
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) 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) GetVersion ¶
func (*Policy) MarshalToSizedBuffer ¶
func (*Policy) ProtoMessage ¶
func (*Policy) ProtoMessage()
func (*Policy) XXX_DiscardUnknown ¶
func (m *Policy) XXX_DiscardUnknown()
func (*Policy) XXX_Marshal ¶
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) ProtoMessage ¶
func (*Rule) ProtoMessage()
func (*Rule) XXX_DiscardUnknown ¶
func (m *Rule) XXX_DiscardUnknown()
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 `` /* 134-byte string literal not displayed */ 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) MarshalToSizedBuffer ¶
func (*Selector) ProtoMessage ¶
func (*Selector) ProtoMessage()
func (*Selector) XXX_DiscardUnknown ¶
func (m *Selector) XXX_DiscardUnknown()
func (*Selector) XXX_Marshal ¶
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 `` /* 151-byte string literal not displayed */ }
Update contains updates to the matched build step after rule is applied
func (*Update) Descriptor ¶
func (*Update) GetIdentifier ¶
func (*Update) MarshalToSizedBuffer ¶
func (*Update) ProtoMessage ¶
func (*Update) ProtoMessage()
func (*Update) XXX_DiscardUnknown ¶
func (m *Update) XXX_DiscardUnknown()
func (*Update) XXX_Marshal ¶
func (*Update) XXX_Unmarshal ¶
Click to show internal directories.
Click to hide internal directories.