Gogs Entities¶
This page documents the classes provided by gogs_client
module that represent entities
(e.g. users, repositories) in a Gogs server.
GogsUser¶
-
class
GogsUser
¶ An immutable representation of a Gogs user
-
id
¶ The user’s id
Type: int
-
username
¶ The user’s username
Type: str
-
full_name
¶ The user’s full name
Type: str
-
email
¶ The user’s email address. Can be empty as a result of invalid authentication
Type: str
-
avatar_url
¶ The user’s avatar URL
Type: str
-
GogsRepo¶
-
class
GogsRepo
¶ An immutable representation of a Gogs repository
-
id
¶ The repository’s id
Type: int
-
name
¶ The name of the repository
Type: str
-
full_name
¶ The full name of the repository
Type: str
-
private
¶ Whether the repository is private
Type: bool
-
fork
¶ Whether the repository is a fork
Type: bool
-
default_branch
¶ The name of the default branch
Type: str
-
permissions
¶ Permissions for the repository
Type: Permissions
-
description
¶ The description of the repository
Type: str
-
empty
¶ Whether the repository is empty
Type: bool
-
size
¶ Size of the repository in kilobytes
Type: int
-
-
class
GogsRepo.
Urls
¶ -
html_url
¶ URL for the repository’s webpage
Type: str
-
clone_url
¶ URL for cloning the repository (via HTTP)
Type: str
-
ssh_url
¶ URL for cloning the repository via SSH
Type: str
-
-
class
GogsRepo.
Permissions
¶ -
admin
¶ Whether the user that requested this repository has admin permissions
Type: bool
-
push
¶ Whether the user that requested this repository has push permissions
Type: bool
-
pull
¶ Whether the user that requested this repository has pull permissions
Type: bool
-
-
class
GogsRepo.
Hook
¶ -
id
¶ The hook’s id number
Type: int
-
type
¶ The hook’s type (gogs, slack, etc.)
Type: str
-
hook_type
¶ The hook’s type (gogs, slack, etc.)
Type: str Deprecated since version 1.1: Use
type
instead
-
events
¶ The events that fire the hook
Type: List[str]
-
active
¶ Whether the hook is active
Type: bool
-
config
¶ Config of the hook. Possible keys include
"content_type"
,"url"
,"secret"
Type: dict
-
GogsOrg¶
-
class
GogsOrg
¶ An immutable representation of a Gogs organization
-
id
¶ The organization’s id
Type: int
-
username
¶ Organization’s username
Type: str
-
full_name
¶ Organization’s full name
Type: str
-
avatar_url
¶ Organization’s avatar URL
Type: str
-
description
¶ Organization’s description
Type: str
-
website
¶ Organization’s website address
Type: str
-
location
¶ Organization’s location
Type: str
-
GogsTeam¶
GogsBranch¶
-
class
GogsBranch
¶ An immutable representation of a Gogs branch
-
name
¶ The branch’s name
Type: str
-
commit
¶ The HEAD commit of the branch
Type: GogsCommit
-