Documentation ¶
Index ¶
- func ToAnnotatedTag(repo *models.Repository, t *git.Tag, c *git.Commit) *api.AnnotatedTag
- func ToAnnotatedTagObject(repo *models.Repository, commit *git.Commit) *api.AnnotatedTagObject
- func ToBranch(repo *models.Repository, b *git.Branch, c *git.Commit, ...) (*api.Branch, error)
- func ToCommit(repo *models.Repository, c *git.Commit) *api.PayloadCommit
- func ToCommitMeta(repo *models.Repository, tag *git.Tag) *api.CommitMeta
- func ToCommitUser(sig *git.Signature) *api.CommitUser
- func ToCorrectPageSize(size int) int
- func ToDeployKey(apiLink string, key *models.DeployKey) *api.DeployKey
- func ToEmail(email *models.EmailAddress) *api.Email
- func ToGPGKey(key *models.GPGKey) *api.GPGKey
- func ToGPGKeyEmail(email *models.EmailAddress) *api.GPGKeyEmail
- func ToGitHook(h *git.Hook) *api.GitHook
- func ToHook(repoLink string, w *models.Webhook) *api.Hook
- func ToOrganization(org *models.User) *api.Organization
- func ToPublicKey(apiLink string, key *models.PublicKey) *api.PublicKey
- func ToTag(repo *models.Repository, t *git.Tag) *api.Tag
- func ToTeam(team *models.Team) *api.Team
- func ToTopicResponse(topic *models.Topic) *api.TopicResponse
- func ToUser(user *models.User, signed, authed bool) *api.User
- func ToVerification(c *git.Commit) *api.PayloadCommitVerification
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ToAnnotatedTag ¶
func ToAnnotatedTag(repo *models.Repository, t *git.Tag, c *git.Commit) *api.AnnotatedTag
ToAnnotatedTag convert git.Tag to api.AnnotatedTag
func ToAnnotatedTagObject ¶
func ToAnnotatedTagObject(repo *models.Repository, commit *git.Commit) *api.AnnotatedTagObject
ToAnnotatedTagObject convert a git.Commit to an api.AnnotatedTagObject
func ToBranch ¶
func ToBranch(repo *models.Repository, b *git.Branch, c *git.Commit, bp *models.ProtectedBranch, user *models.User) (*api.Branch, error)
ToBranch convert a git.Commit and git.Branch to an api.Branch
func ToCommit ¶
func ToCommit(repo *models.Repository, c *git.Commit) *api.PayloadCommit
ToCommit convert a git.Commit to api.PayloadCommit
func ToCommitMeta ¶
func ToCommitMeta(repo *models.Repository, tag *git.Tag) *api.CommitMeta
ToCommitMeta convert a git.Tag to an api.CommitMeta
func ToCommitUser ¶
func ToCommitUser(sig *git.Signature) *api.CommitUser
ToCommitUser convert a git.Signature to an api.CommitUser
func ToCorrectPageSize ¶
ToCorrectPageSize makes sure page size is in allowed range.
func ToDeployKey ¶
ToDeployKey convert models.DeployKey to api.DeployKey
func ToEmail ¶
func ToEmail(email *models.EmailAddress) *api.Email
ToEmail convert models.EmailAddress to api.Email
func ToGPGKeyEmail ¶
func ToGPGKeyEmail(email *models.EmailAddress) *api.GPGKeyEmail
ToGPGKeyEmail convert models.EmailAddress to api.GPGKeyEmail
func ToOrganization ¶
func ToOrganization(org *models.User) *api.Organization
ToOrganization convert models.User to api.Organization
func ToPublicKey ¶
ToPublicKey convert models.PublicKey to api.PublicKey
func ToTopicResponse ¶
func ToTopicResponse(topic *models.Topic) *api.TopicResponse
ToTopicResponse convert from models.Topic to api.TopicResponse
func ToUser ¶
ToUser convert models.User to api.User signed shall only be set if requester is logged in. authed shall only be set if user is site admin or user himself
func ToVerification ¶
func ToVerification(c *git.Commit) *api.PayloadCommitVerification
ToVerification convert a git.Commit.Signature to an api.PayloadCommitVerification
Types ¶
This section is empty.