Documentation
¶
Index ¶
- func BranchName(ref string) (string, bool)
- func GetConfigPath(forge string, org string) (string, error)
- func GetLocalStatePath(forge string, org string, repoName string) (string, error)
- func InferForgeOrgAndRepo(repo *git.Repository) (forge string, org string, repoName string)
- func SaveLocalState(repo *git.Repository, state *gitkit.RepoState, repoConfig *RepoConfig, ...) error
- func Verify(repo *git.Repository, state *gitkit.RepoState, repoConfig *RepoConfig, ...) error
- func VerifyLocalState(repo *git.Repository, state *gitkit.RepoState, repoConfig *RepoConfig, ...) error
- type After
- type CommitData
- type Config
- type Digests
- type ExemptTag
- type Identity
- type LocalState
- type ParsedConfig
- type ParsedRepository
- type ParsedRules
- type RepoConfig
- type Repository
- type Rules
- type SSHPublicKey
- type SSHSig
- type SignatureType
- type SshSig
- type U2FSignature
- type ValidateOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BranchName ¶
func GetLocalStatePath ¶
func InferForgeOrgAndRepo ¶
func InferForgeOrgAndRepo(repo *git.Repository) (forge string, org string, repoName string)
func SaveLocalState ¶
func Verify ¶
func Verify(repo *git.Repository, state *gitkit.RepoState, repoConfig *RepoConfig, gitHashSHA1 githash.GitHash, gitHashSHA512 githash.GitHash, opts *ValidateOptions) error
func VerifyLocalState ¶
Types ¶
type After ¶
type After struct {
SHA1 *string `json:"sha1,omitempty"`
SHA512 *string `json:"sha512,omitempty"`
Branch *string `json:"branch,omitempty"`
}
func AfterCandidates ¶
func AfterCandidates(repo *git.Repository, repoConfig *RepoConfig, useSHA512 bool) ([]After, error)
type CommitData ¶
type CommitData struct {
SignatureType SignatureType
Ignore bool
SignatureVerified bool
MergeTag *object.Tag
}
type Config ¶
type Config struct {
Type string `json:"_type"`
Identities []Identity `json:"identities"`
Maintainers []string `json:"maintainers"`
Contributors []string `json:"contributors"`
Rules *Rules `json:"rules"`
ProtectedBranches []string `json:"protectedBranches"`
TrustedForge *string `json:"trustedForge"`
Repositories []Repository `json:"repositories"`
}
type LocalState ¶
type ParsedConfig ¶
type ParsedConfig struct {
Repositories []ParsedRepository
}
func LoadConfig ¶
func LoadConfig(configPath string) (*ParsedConfig, error)
type ParsedRepository ¶
type ParsedRules ¶
type RepoConfig ¶
type RepoConfig struct {
// contains filtered or unexported fields
}
func LoadRepoConfig ¶
func LoadRepoConfig(config *ParsedConfig, repoUri string) (*RepoConfig, error)
type Repository ¶
type Repository struct {
Uri string `json:"uri"`
After []After `json:"after"`
Identities []Identity `json:"identities"`
Maintainers []string `json:"maintainers"`
Contributors []string `json:"contributors"`
Rules *Rules `json:"rules"`
ProtectedBranches []string `json:"protectedBranches"`
TrustedForge *string `json:"trustedForge"`
ExemptTags []ExemptTag `json:"exemptTags"`
}
type Rules ¶
type Rules struct {
AllowSSHSignatures *bool `json:"allowSshSignatures"`
RequireSSHUserPresent *bool `json:"requireSshUserPresent"`
RequireSSHUserVerified *bool `json:"requireSshUserVerified"`
AllowSSHSHA256 *bool `json:"allowSshSha256"`
AllowGPGSignatures *bool `json:"allowGpgSignatures"`
RequireSignedTags *bool `json:"requireSignedTags"`
RequireMergeCommits *bool `json:"requireMergeCommits"`
RequireCountersigning *bool `json:"requireCountersigning"`
RequireSHA512 *bool `json:"requireSha512"`
}
type SSHPublicKey ¶
type SignatureType ¶
type SignatureType string
const ( SignatureTypeGPG SignatureType = "gpg" SignatureTypeSSH SignatureType = "ssh" SignatureTypeNone SignatureType = "none" SignatureTypeSMime SignatureType = "smime" SignatureTypeUnknown SignatureType = "unknown" )
type U2FSignature ¶
type U2FSignature struct {
// https://github.com/openssh/openssh-portable/blob/master/PROTOCOL.u2f
Type string
Signature []byte
Flags byte
Counter uint32
}
Click to show internal directories.
Click to hide internal directories.