carny v2.2.0 Carny.Identifier

Identifiers are the objects that represent a given resource. i.e. bulwark:my-company:deployments

Link to this section Summary

Functions

Returns a global identifier, aka "*"

Parse an arn into an identifier struct

Takes an identifier and creates a list of each component. Useful when you're trying to build a string to represent the Identifier.

Replaces all the variables in a given resource with "" if the compared to resource has a "" in that field

Given two identifiers see if the first matches the second

Link to this section Functions

Link to this function

from_map(identifier)

Returns a global identifier, aka "*"

Parse an arn into an identifier struct

Examples

iex> Carny.Identifier.parse("bulwark:my-company:deployments")
%Carny.Identifier{domain: "my-company", organization: "bulwark", resource: "deployments"}

Takes an identifier and creates a list of each component. Useful when you're trying to build a string to represent the Identifier.

Link to this function

replace_wildcards(a, b)

Replaces all the variables in a given resource with "" if the compared to resource has a "" in that field

Link to this function

validate_against(identifier, resource)

Given two identifiers see if the first matches the second