Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SecretValue ¶
func SecretValue(cid string, secret *entity.SecretStored) string
SecretValue determines the appropriate representation of a secret's value to use, giving precedence to a transformed value over the raw values. This function supports both current implementations and backward compatibility by handling secrets with multiple values or transformed values.
Parameters:
- cid (string): Correlation ID for operation tracing and logging.
- secret (*entity.SecretStored): A pointer to the secret entity from which the value is to be retrieved.
Returns:
- string: The selected representation of the secret's value. This could be the transformed value, a single raw value, a JSON-encoded string of multiple values, or an empty string in case of an error.
func WorkloadIDAndParts ¶
WorkloadIDAndParts extracts the workload identifier and its constituent parts from a SPIFFE ID string, based on a predefined prefix that is removed from the SPIFFE ID.
Parameters:
- spiffeid (string): The SPIFFE ID string from which the workload identifier and parts are to be extracted.
Returns:
- (string, []string): The first return value is the workload identifier, which is essentially the first part of the SPIFFE ID after removing the prefix. The second return value is a slice of strings representing all parts of the SPIFFE ID after the prefix removal.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.