Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidPolicy = errors.New("invalid policy")
Functions ¶
This section is empty.
Types ¶
type Policy ¶ added in v0.1.0
type Policy struct { SignatureThreshold int `json:"ospkg_signature_threshold"` FetchMethod ospkg.FetchMethod `json:"ospkg_fetch_method"` }
Policy holds security configuration.
func NewPolicy ¶ added in v0.1.0
NewPolicy creates a Policy from template. If the template is not a valid Policy, the returned error wrapps ErrInvalidPolicy.
func (*Policy) UnmarshalJSON ¶ added in v0.1.0
UnmarshalJSON implements json.Unmarshaler. It initializes p from a JSON data byte stream. If unmarshaling fails, a json.UnmarshalTypeError is returned. In case of further inter-field invalidities or other rules, that are not met, the reurned error wrapps ErrInvalidPolicy.
Click to show internal directories.
Click to hide internal directories.