group

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 18, 2019 License: Apache-2.0 Imports: 4 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertAttributes

func ConvertAttributes(attributesTable map[string]*acpb.PolicyDTO_Attributes) (map[string]map[string]interface{}, error)

func ConvertPrettyCondition

func ConvertPrettyCondition(c *Condition) (*acpb.Condition, error)

func ConvertPrettyConditions

func ConvertPrettyConditions(cs Conditions) ([]*acpb.Condition, error)

Types

type Attribute

type Attribute struct {
	Name     string      `json:"name,omitempty"`
	Type     string      `json:"type,omitempty"`
	Required bool        `json:"required,omitempty"`
	Value    interface{} `json:"default,omitempty"`
}

type Condition

type Condition struct {
	Name    string           `json:"name,omitempty"`
	Type    string           `json:"type,omitempty"`
	Options *ConditionOption `json:"options,omitempty"`
}

func ConvertCondition

func ConvertCondition(c *acpb.Condition) (*Condition, error)

func (*Condition) ConvertCondition

func (c *Condition) ConvertCondition(values map[string]interface{}) (attr.Condition, error)

type ConditionOption

type ConditionOption struct {
	Expression string       `json:"expression,omitempty"`
	Attributes []*Attribute `json:"attributes,omitempty"`
}

type Conditions

type Conditions []*Condition

func ConvertConditions

func ConvertConditions(cs []*acpb.Condition) (Conditions, error)

func (Conditions) ConvertConditions

func (cs Conditions) ConvertConditions(all map[string]map[string]interface{}) (attr.Conditions, error)

type PredefinedPolicy

type PredefinedPolicy struct {
	Name        string     `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Description string     `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	Resources   []string   `protobuf:"bytes,3,rep,name=resources,proto3" json:"resources,omitempty"`
	Actions     []string   `protobuf:"bytes,4,rep,name=actions,proto3" json:"actions,omitempty"`
	Conditions  Conditions `protobuf:"bytes,5,opt,name=conditions,proto3" json:"conditions,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL