Documentation ¶
Overview ¶
Package inst implements GitHub App Installation authentication.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
Config defines an GitHub app installation config.
func NewConfig ¶
func NewConfig(appID, instID string, key *rsa.PrivateKey) (*Config, error)
NewConfig returns a new GitHub App instance.
func NewEnterpriseConfig ¶
func NewEnterpriseConfig(url, appID, instID string, key *rsa.PrivateKey) (*Config, error)
NewEnterpriseConfig returns a new GitHub App instance.
func (*Config) Client ¶
Client returns an HTTP client wrapping the context's HTTP transport and adding Authorization headers with tokens obtained using JWT.
The returned client and its Transport should not be modified.
func (*Config) Permissions ¶
Permissions returns a map of the GitHub app client's permissions.
func (*Config) RepositorySelection ¶
RepositorySelection returns the GitHub app client's repository selection (all or selected).
func (*Config) SetRepositories ¶
SetRepositories returns an updated installation with the provided repositories. Access will be limited to the list of provided repositories
func (*Config) SetRepositoryIDs ¶
SetRepositoryIDs returns an updated installation with the provided repository ids. Access will be limited to the list of provided repository IDs.