HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //lib/python3/dist-packages/docker/models/__pycache__/secrets.cpython-310.pyc
o

�2.a5�@s@ddlmZddlmZmZGdd�de�ZGdd�de�ZdS)	�)�	APIClient�)�Model�
Collectionc@s0eZdZdZdZdd�Zedd��Zdd�Zd	S)
�Secretz	A secret.�IDcCsd|jj�d|j�d�S)N�<z: 'z'>)�	__class__�__name__�name��self�r�7/usr/lib/python3/dist-packages/docker/models/secrets.py�__repr__	szSecret.__repr__cCs|jddS)N�Spec�Name)�attrsrrrrrszSecret.namecCs|jj�|j�S)z�
        Remove this secret.

        Raises:
            :py:class:`docker.errors.APIError`
                If secret failed to remove.
        )�client�api�
remove_secret�idrrrr�removesz
Secret.removeN)	r
�
__module__�__qualname__�__doc__�id_attributer�propertyrrrrrrrs
rc@s6eZdZdZeZdd�Zejje_dd�Z	dd�Z
dS)	�SecretCollectionzSecrets on the Docker server.cKs4|jjjdi|��}|�d�|�di�d<|�|�S)Nrrrr)rr�
create_secret�get�
setdefault�
prepare_model)r
�kwargs�objrrr�creates
zSecretCollection.createcCs|�|jj�|��S)ac
        Get a secret.

        Args:
            secret_id (str): Secret ID.

        Returns:
            (:py:class:`Secret`): The secret.

        Raises:
            :py:class:`docker.errors.NotFound`
                If the secret does not exist.
            :py:class:`docker.errors.APIError`
                If the server returns an error.
        )r"rr�inspect_secret)r
�	secret_idrrrr %szSecretCollection.getcs&�jjjdi|��}�fdd�|D�S)aT
        List secrets. Similar to the ``docker secret ls`` command.

        Args:
            filters (dict): Server-side list filtering options.

        Returns:
            (list of :py:class:`Secret`): The secrets.

        Raises:
            :py:class:`docker.errors.APIError`
                If the server returns an error.
        csg|]}��|��qSr)r")�.0r$rrr�
<listcomp>Fsz)SecretCollection.list.<locals>.<listcomp>Nr)rr�secrets)r
r#�resprrr�list7szSecretCollection.listN)r
rrrr�modelr%rrr r,rrrrrs
rN)rr�resourcerrrrrrrr�<module>s