Documentation
¶
Overview ¶
package policy handles Policy management for ACP.
Policies have multiple definition synxtaxes which gets mapped to a consistent internal implementation.
Index ¶
Constants ¶
View Source
const OwnerRelation string = "owner"
Variables ¶
View Source
var ( ErrInvalidPolicy = types.ErrAcpInput.Wrap("invalid policy") ErrUnknownMarshalingType = types.ErrAcpInput.Wrap("unknown marshaling type") ErrUnmarshaling = types.ErrAcpInput.Wrap("unmarshaling error") ErrInvalidShortPolicy = fmt.Errorf("invalid short policy: %w", ErrInvalidPolicy) ErrInvalidCreator = fmt.Errorf("invalid creator: %w", ErrInvalidPolicy) ErrResourceMissingOwnerRelation = fmt.Errorf("resource missing owner relation: %w", ErrInvalidPolicy) ErrMalformedGraph = fmt.Errorf("malformed management graph: %w", ErrInvalidPolicy) )
Functions ¶
This section is empty.
Types ¶
type CreatePolicyCommand ¶
type CreatePolicyCommand struct { // Cosmos Address of the Policy Creator Creator string // Policy Intermediary Representation Policy PolicyIR // Timestamp for Policy creation CreationTime *prototypes.Timestamp }
CreatePolicyCommand models an instruction to createa a new ACP Policy
func (*CreatePolicyCommand) Execute ¶
func (c *CreatePolicyCommand) Execute(ctx context.Context, accountKeeper types.AccountKeeper, engine auth_engine.AuthEngine) (*types.Policy, error)
Execute consumes the data supplied in the command and creates a new ACP Policy and stores it in the given engine.
Click to show internal directories.
Click to hide internal directories.