harbor_cli.models
Models used by various modules.
Defined here to avoid circular imports when using these models in multiple modules that otherwise can't mutually import each other. Refactor to module (directory with init.py) if needed.
Classes
BaseModel
ParamSummary
Bases: BaseModel
Serializable representation of a click.Parameter.
Source code in harbor_cli/models.py
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 |
|
Attributes
allow_from_autoenv: Optional[bool] = None
class-attribute
instance-attribute
confirmation_prompt: Optional[bool] = None
class-attribute
instance-attribute
choices: Optional[List[str]] = None
class-attribute
instance-attribute
count: Optional[bool] = None
class-attribute
instance-attribute
default: Optional[Any] = None
class-attribute
instance-attribute
envvar: Optional[Union[str, Sequence[str]]]
instance-attribute
expose_value: bool
instance-attribute
flag_value: Optional[Any] = None
class-attribute
instance-attribute
help: str
instance-attribute
hidden: Optional[bool] = None
class-attribute
instance-attribute
human_readable_name: str
instance-attribute
is_argument: bool
instance-attribute
is_eager: bool = False
class-attribute
instance-attribute
is_bool_flag: Optional[bool] = None
class-attribute
instance-attribute
is_flag: Optional[bool] = None
class-attribute
instance-attribute
is_option: Optional[bool]
instance-attribute
max: Optional[int] = None
class-attribute
instance-attribute
min: Optional[int] = None
class-attribute
instance-attribute
metavar: Optional[str]
instance-attribute
multiple: bool
instance-attribute
name: Optional[str]
instance-attribute
nargs: int
instance-attribute
opts: List[str]
instance-attribute
prompt: Optional[str] = None
class-attribute
instance-attribute
prompt_required: Optional[bool] = None
class-attribute
instance-attribute
required: bool
instance-attribute
secondary_opts: List[str] = []
class-attribute
instance-attribute
show_choices: Optional[bool] = None
class-attribute
instance-attribute
show_default: Optional[bool] = None
class-attribute
instance-attribute
show_envvar: Optional[bool] = None
class-attribute
instance-attribute
type: str
instance-attribute
value_from_envvar: Any
instance-attribute
help_plain: str
property
help_md: str
property
Functions
from_param(param: Parameter) -> ParamSummary
classmethod
Construct a new ParamSummary from a click.Parameter.
Source code in harbor_cli/models.py
CommandSummary
Bases: BaseModel
Convenience class for accessing information about a command.
Source code in harbor_cli/models.py
149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 |
|
Attributes
category: Optional[str] = None
class-attribute
instance-attribute
deprecated: bool
instance-attribute
epilog: Optional[str]
instance-attribute
help: str
instance-attribute
hidden: bool
instance-attribute
name: str
instance-attribute
options_metavar: str
instance-attribute
params: List[ParamSummary] = []
class-attribute
instance-attribute
score: int = 0
class-attribute
instance-attribute
short_help: Optional[str]
instance-attribute
help_plain: str
property
help_md: str
property
usage: str
property
options: List[ParamSummary]
property
arguments: List[ParamSummary]
property
Functions
from_command(command: TyperCommand, name: str | None = None, category: str | None = None) -> CommandSummary
classmethod
Construct a new CommandSummary from a TyperCommand.
Source code in harbor_cli/models.py
ProjectExtended
Operator
Bases: Enum
Operator used to detmerine matching of multiple search criteria.
Source code in harbor_cli/models.py
Attributes
AND = 'and'
class-attribute
instance-attribute
OR = 'or'
class-attribute
instance-attribute
XOR = 'xor'
class-attribute
instance-attribute
UserGroupType
Bases: StrEnum
Source code in harbor_cli/models.py
Attributes
LDAP = 'LDAP'
class-attribute
instance-attribute
HTTP = 'HTTP'
class-attribute
instance-attribute
OIDC = 'OIDC'
class-attribute
instance-attribute
Functions
from_int(value: int) -> UserGroupType
classmethod
MemberRoleType
Bases: Enum
Source code in harbor_cli/models.py
Attributes
ADMIN = 'admin'
class-attribute
instance-attribute
DEVELOPER = 'developer'
class-attribute
instance-attribute
GUEST = 'guest'
class-attribute
instance-attribute
MAINTAINER = 'maintainer'
class-attribute
instance-attribute
LIMITED_GUEST = 'limited_guest'
class-attribute
instance-attribute
Functions
from_int(value: int) -> MemberRoleType
classmethod
ArtifactVulnerabilitySummary
Bases: BaseModel
Source code in harbor_cli/models.py
Attributes
artifact: str
instance-attribute
tags: List[str]
instance-attribute
summary: Optional[NativeReportSummary]
instance-attribute
artifact_short: str = Field(..., exclude=True)
class-attribute
instance-attribute
Functions
from_artifactinfo(artifact: ArtifactInfo) -> ArtifactVulnerabilitySummary
classmethod
Source code in harbor_cli/models.py
MetadataFields
Bases: RootModel[Dict[str, Any]]
Renders a mapping of one or more metadata fields as a table.