MCPcopy Index your code
hub / github.com/gogs/gogs / AuthorizedString

Method AuthorizedString

internal/database/ssh_key.go:83–85  ·  view source on GitHub ↗

AuthorizedString returns formatted public key string for authorized_keys file.

()

Source from the content-addressed store, hash-verified

81
82// AuthorizedString returns formatted public key string for authorized_keys file.
83func (k *PublicKey) AuthorizedString() string {
84 return fmt.Sprintf(tplPublicKey, conf.AppPath(), k.ID, conf.CustomConf, k.Content)
85}
86
87// IsDeployKey returns true if the public key is used as deploy key.
88func (k *PublicKey) IsDeployKey() bool {

Callers 3

RewriteAuthorizedKeysMethod · 0.95
RewriteAuthorizedKeysFunction · 0.80

Calls 1

AppPathFunction · 0.92

Tested by

no test coverage detected