spotter v0.4.0 Spotter.Endpoint.Base behaviour
Base module for implementing endpoints.
By default any module must implement three required functions, that’s going to use this functionality later:
new(path, permissions)
for creating a new instance of a structurematch(endpoint, path)
for getting an understanding that the appropriate endpointhas_permissions(endpoint, permissions)
for checking an access to the particular resource
Also the base module provides two methods, each of those returns an input data as is by default, but can be overridden:
tranform(data)
for post-processing data before passing it furthervalidate(data)
for validating an input data
Link to this section Summary
Link to this section Callbacks
Link to this callback
has_permissions(endpoint, permissions)
Link to this callback
match(endpoint, path)
Link to this callback
new(path, permissions)
new(path :: Strint.t(), permissions :: [String.t()]) :: UserDefined