Documentation ¶
Index ¶
- func DeleteDeployKey(doer *user_model.User, id int64) error
- func DeletePublicKey(doer *user_model.User, id int64) (err error)
- func IsErrWontSign(err error) bool
- func PublicSigningKey(ctx context.Context, repoPath string) (string, error)
- func SignCRUDAction(ctx context.Context, repoPath string, u *user_model.User, ...) (bool, string, *git.Signature, error)
- func SignInitialCommit(ctx context.Context, repoPath string, u *user_model.User) (bool, string, *git.Signature, error)
- func SignMerge(ctx context.Context, pr *issues_model.PullRequest, u *user_model.User, ...) (bool, string, *git.Signature, error)
- func SignWikiCommit(ctx context.Context, repoWikiPath string, u *user_model.User) (bool, string, *git.Signature, error)
- func SigningKey(ctx context.Context, repoPath string) (string, *git.Signature)
- type ErrWontSign
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteDeployKey ¶
func DeleteDeployKey(doer *user_model.User, id int64) error
DeleteDeployKey deletes deploy key from its repository authorized_keys file if needed.
func DeletePublicKey ¶
func DeletePublicKey(doer *user_model.User, id int64) (err error)
DeletePublicKey deletes SSH key information both in database and authorized_keys file.
func IsErrWontSign ¶
IsErrWontSign checks if an error is a ErrWontSign
func PublicSigningKey ¶
PublicSigningKey gets the public signing key within a provided repository directory
func SignCRUDAction ¶
func SignCRUDAction(ctx context.Context, repoPath string, u *user_model.User, tmpBasePath, parentCommit string) (bool, string, *git.Signature, error)
SignCRUDAction determines if we should sign a CRUD commit to this repository
func SignInitialCommit ¶
func SignInitialCommit(ctx context.Context, repoPath string, u *user_model.User) (bool, string, *git.Signature, error)
SignInitialCommit determines if we should sign the initial commit to this repository
func SignMerge ¶
func SignMerge(ctx context.Context, pr *issues_model.PullRequest, u *user_model.User, tmpBasePath, baseCommit, headCommit string) (bool, string, *git.Signature, error)
SignMerge determines if we should sign a PR merge commit to the base repository
Types ¶
type ErrWontSign ¶
type ErrWontSign struct {
Reason signingMode
}
ErrWontSign explains the first reason why a commit would not be signed There may be other reasons - this is just the first reason found
func (*ErrWontSign) Error ¶
func (e *ErrWontSign) Error() string