MCPcopy
hub / github.com/apache/devlake / GithubConn

Struct GithubConn

backend/plugins/github/models/connection.go:54–62  ·  view source on GitHub ↗

GithubConn holds the essential information to connect to the GitHub API

Source from the content-addressed store, hash-verified

52
53// GithubConn holds the essential information to connect to the GitHub API
54type GithubConn struct {
55 helper.RestConnection `mapstructure:",squash"`
56 helper.MultiAuth `mapstructure:",squash"`
57 GithubAccessToken `mapstructure:",squash" authMethod:"AccessToken"`
58 GithubAppKey `mapstructure:",squash" authMethod:"AppKey"`
59 RefreshToken string `mapstructure:"refreshToken" json:"refreshToken" gorm:"type:text;serializer:encdec"`
60 TokenExpiresAt *time.Time `mapstructure:"tokenExpiresAt" json:"tokenExpiresAt"`
61 RefreshTokenExpiresAt *time.Time `mapstructure:"refreshTokenExpiresAt" json:"refreshTokenExpiresAt"`
62}
63
64// UpdateToken updates the token and refresh token information
65func (conn *GithubConn) UpdateToken(newToken, newRefreshToken string, expiry, refreshExpiry *time.Time) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected