Documentation ¶
Index ¶
Constants ¶
View Source
const ( EventActionCreated = "created" EventActionEdited = "edited" EventActionTierChanged = "tier_changed" EventActionPendingCancellation = "pending_cancellation" EventActionCancelled = "cancelled" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Changes ¶
type Changes struct { // Tier appears only in "tier_changed" events Tier *TierChange `json:"tier,omitempty"` // PrivacyLevel appears only in "edited" events PrivacyLevel *PrivacyLevelChange `json:"privacy_level,omitempty"` }
Changes field appears only in "edited" and "tier_changed" events. Describes what changes were made to the tier.
type Person ¶
type Person struct { Login string `json:"login"` ID int `json:"id"` NodeID string `json:"node_id"` AvatarURL string `json:"avatar_url"` GravatarID string `json:"gravatar_id"` URL string `json:"url"` HTMLURL string `json:"html_url"` FollowersURL string `json:"followers_url"` FollowingURL string `json:"following_url"` GistsURL string `json:"gists_url"` StarredURL string `json:"starred_url"` SubscriptionsURL string `json:"subscriptions_url"` OrganizationsURL string `json:"organizations_url"` ReposURL string `json:"repos_url"` EventsURL string `json:"events_url"` ReceivedEventsURL string `json:"received_events_url"` Type string `json:"type"` SiteAdmin bool `json:"site_admin"` }
type PrivacyLevelChange ¶
type PrivacyLevelChange struct {
From string `json:"from"`
}
PrivacyLevelChange appears only when a user changes privacy level of the subscription. It might happen at the same with tier_changed event, but it will produce two events.
type Sponsorship ¶
type Sponsorship struct { // DeliveryID is not an original field. It's an additional field added by the handler. DeliveryID string `json:"delivery_id"` Action string `json:"action"` Sponsorship SponsorshipDetails `json:"sponsorship"` // EffectiveDate appears only in "pending_cancellation" events // The value of this field is not yet completely understood. // CreatedAt = 2020-10-23T06:57:19+00:00 // EffectiveDate = 2020-10-27T00:00:00+00:00 EffectiveDate *time.Time `json:"effective_date,omitempty"` Sender Person `json:"sender"` Changes *Changes `json:"changes,omitempty"` }
The following struct is missing in github.com/google/go-github https://developer.github.com/v3/activity/event_types/#sponsorshipevent https://docs.github.com/en/free-pro-team@latest/developers/webhooks-and-events/webhook-events-and-payloads#sponsorship
func (*Sponsorship) IsPrivacyLevelChanged ¶
func (sponsorship *Sponsorship) IsPrivacyLevelChanged() bool
func (*Sponsorship) IsTierChanged ¶
func (sponsorship *Sponsorship) IsTierChanged() bool
type SponsorshipDetails ¶
type TierChange ¶
type TierChange struct {
From Tier `json:"from"`
}
TierChange appears only in "tier_changed" events
Click to show internal directories.
Click to hide internal directories.