Synaptic.AgentPolicy behaviour (synaptic v0.3.0-alpha.8)

View Source

Behavior for host-provided agent discovery and invocation authorization.

Summary

Types

caller_ctx()

@type caller_ctx() :: map()

invocation()

@type invocation() :: map()

record()

@type record() :: map()

Callbacks

authorize_discovery(caller_ctx, record, atom)

@callback authorize_discovery(caller_ctx(), record(), atom()) :: :allow | {:deny, term()}

authorize_invoke(caller_ctx, term, record, invocation)

@callback authorize_invoke(caller_ctx(), term(), record(), invocation()) ::
  :allow | {:deny, term()}

filter_visible_records(caller_ctx, list)

(optional)
@callback filter_visible_records(caller_ctx(), [record()]) :: [record()]

scope_defaults(caller_ctx)

(optional)
@callback scope_defaults(caller_ctx()) :: map()

Functions

authorize_discovery(caller_ctx, record, action)

authorize_invoke(caller_ctx, caller_identity, callee_record, invocation)

filter_visible_records(caller_ctx, records)

module()

scope_defaults(caller_ctx)