github

package
v0.15.5 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get(ctx context.Context, cli fetch.Client, username string) ([]byte, error)

Get returns OpenPGP ASCII armor text from GitHub user profile

func GetKey

func GetKey(ctx context.Context, cli fetch.Client, username string, keyID string) ([]byte, error)

GetKey returns JSON text for GitHub OpenPGP API

Types

type EMailInfo

type EMailInfo struct {
	EMail    string `json:"email"`
	Verified bool   `json:"verified"`
}

type OpenPGPKey

type OpenPGPKey struct {
	ID                int64         `json:"id"`
	PrimaryKeyID      *int64        `json:"primary_key_id"`
	KeyID             string        `json:"key_id"`
	RawKey            *string       `json:"raw_key"`
	PublicKey         string        `json:"public_key"`
	EMails            []*EMailInfo  `json:"emails"`
	SubKeys           []*OpenPGPKey `json:"subkeys"`
	CanSign           bool          `json:"can_sign"`
	CanEncryptCmms    bool          `json:"can_encrypt_comms"`
	CanEncryptStorage bool          `json:"can_encrypt_storage"`
	CanCertify        bool          `json:"can_certify"`
	CreatedAt         *time.Time    `json:"created_at"`
	ExpiresAt         *time.Time    `json:"expires_at"`
}

Jump to

Keyboard shortcuts

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