mirror of https://github.com/jumpserver/jumpserver
30 lines
794 B
Python
30 lines
794 B
Python
from django.db.models import TextChoices
|
|
from django.utils.translation import gettext_lazy as _
|
|
|
|
|
|
class SecretType(TextChoices):
|
|
PASSWORD = 'password', _('Password')
|
|
SSH_KEY = 'ssh_key', _('SSH key')
|
|
ACCESS_KEY = 'access_key', _('Access key')
|
|
TOKEN = 'token', _('Token')
|
|
API_KEY = 'api_key', _("API key")
|
|
|
|
|
|
class AliasAccount(TextChoices):
|
|
ALL = '@ALL', _('All')
|
|
INPUT = '@INPUT', _('Manual input')
|
|
USER = '@USER', _('Dynamic user')
|
|
ANON = '@ANON', _('Anonymous account')
|
|
|
|
|
|
class Source(TextChoices):
|
|
LOCAL = 'local', _('Local')
|
|
COLLECTED = 'collected', _('Collected')
|
|
TEMPLATE = 'template', _('Template')
|
|
|
|
|
|
class AccountInvalidPolicy(TextChoices):
|
|
SKIP = 'skip', _('Skip')
|
|
UPDATE = 'update', _('Update')
|
|
ERROR = 'error', _('Failed')
|