convert

package
v1.9.0-rc1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 6, 2019 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToAnnotatedTag added in v1.9.0

func ToAnnotatedTag(repo *models.Repository, t *git.Tag, c *git.Commit) *api.AnnotatedTag

ToAnnotatedTag convert git.Tag to api.AnnotatedTag

func ToAnnotatedTagObject added in v1.9.0

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) *api.Branch

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 added in v1.9.0

func ToCommitMeta(repo *models.Repository, tag *git.Tag) *api.CommitMeta

ToCommitMeta convert a git.Tag to an api.CommitMeta

func ToCommitUser added in v1.9.0

func ToCommitUser(sig *git.Signature) *api.CommitUser

ToCommitUser convert a git.Signature to an api.CommitUser

func ToCorrectPageSize

func ToCorrectPageSize(size int) int

ToCorrectPageSize makes sure page size is in allowed range.

func ToDeployKey

func ToDeployKey(apiLink string, key *models.DeployKey) *api.DeployKey

ToDeployKey convert models.DeployKey to api.DeployKey

func ToEmail

func ToEmail(email *models.EmailAddress) *api.Email

ToEmail convert models.EmailAddress to api.Email

func ToGPGKey added in v1.2.0

func ToGPGKey(key *models.GPGKey) *api.GPGKey

ToGPGKey converts models.GPGKey to api.GPGKey

func ToGPGKeyEmail added in v1.2.0

func ToGPGKeyEmail(email *models.EmailAddress) *api.GPGKeyEmail

ToGPGKeyEmail convert models.EmailAddress to api.GPGKeyEmail

func ToGitHook added in v1.9.0

func ToGitHook(h *git.Hook) *api.GitHook

ToGitHook convert git.Hook to api.GitHook

func ToHook

func ToHook(repoLink string, w *models.Webhook) *api.Hook

ToHook convert models.Webhook to api.Hook

func ToOrganization

func ToOrganization(org *models.User) *api.Organization

ToOrganization convert models.User to api.Organization

func ToPublicKey

func ToPublicKey(apiLink string, key *models.PublicKey) *api.PublicKey

ToPublicKey convert models.PublicKey to api.PublicKey

func ToTag added in v1.8.0

func ToTag(repo *models.Repository, t *git.Tag) *api.Tag

ToTag convert a git.Tag to an api.Tag

func ToTeam

func ToTeam(team *models.Team) *api.Team

ToTeam convert models.Team to api.Team

func ToUser added in v1.8.0

func ToUser(user *models.User, signed, admin bool) *api.User

ToUser convert models.User to api.User

func ToVerification added in v1.9.0

func ToVerification(c *git.Commit) *api.PayloadCommitVerification

ToVerification convert a git.Commit.Signature to an api.PayloadCommitVerification

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL