Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var (
ErrInvalidChainRepresentation = errors.New("invalid chain representation")
)
Functions ¶
This section is empty.
Types ¶
type Chain ¶
type Chain struct { // Raw is the encoded chain kind. // It assumes that Raw's bytes are the result of encoding provided by // policy-engine package. Raw []byte }
Chain is an SDK representation for v2's Chain.
Note that Chain (as well as v2's Chain) and all related entities are NOT operated by Access-Policy-Engine (APE). The client is responsible to convert these types to policy-engine entities.
func (*Chain) ReadFromV2 ¶
ReadFromV2 fills Chain from v2.
type ChainTarget ¶
type ChainTarget struct { TargetType TargetType Name string }
ChainTarget is an SDK representation for v2's ChainTarget.
Note that ChainTarget (as well as v2's ChainTarget) and all related entities are NOT operated by Access-Policy-Engine (APE). The client is responsible to convert these types to policy-engine entities.
func (*ChainTarget) FromV2 ¶
func (ct *ChainTarget) FromV2(v2ct *apeV2.ChainTarget)
FromV2 reads ChainTarget frpm v2.
func (*ChainTarget) ToV2 ¶
func (ct *ChainTarget) ToV2() *apeV2.ChainTarget
ToV2 converts ChainTarget to v2.
type TargetType ¶
type TargetType apeV2.TargetType
TargetType is an SDK representation for v2's TargetType.
const ( TargetTypeUndefined TargetType = iota TargetTypeNamespace TargetTypeContainer TargetTypeUser TargetTypeGroup )
func (*TargetType) FromV2 ¶
func (targetType *TargetType) FromV2(v2targetType apeV2.TargetType)
FromV2 reads TargetType to v2.
func (TargetType) ToV2 ¶
func (targetType TargetType) ToV2() apeV2.TargetType
ToV2 converts TargetType to v2.