events

package
v0.0.0-...-9387b4f Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2023 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventData

type EventData struct {
	Schema string `json:"$schema"`
}

type Meta

type Meta struct {
	URI       string `json:"uri"`
	RequestID string `json:"request_id"`
	ID        string `json:"id"`
	Dt        string `json:"dt"`
	Domain    string `json:"domain"`
	Stream    string `json:"stream"`
	Topic     string `json:"topic"`
	Partition int    `json:"partition"`
	Offset    int    `json:"offset"`
}

type Performer

type Performer struct {
	UserText           string   `json:"user_text"`
	UserGroups         []string `json:"user_groups"`
	UserIsBot          bool     `json:"user_is_bot"`
	UserID             int      `json:"user_id"`
	UserRegistrationDt string   `json:"user_registration_dt"`
	UserEditCount      int      `json:"user_edit_count"`
}

type RecentChangeEvent

type RecentChangeEvent struct {
	ID        int    `json:"id"`
	Meta      Meta   `json:"meta"`
	Type      string `json:"type"`
	Namespace int    `json:"namespace"`
	Title     string `json:"title"`
	Comment   string `json:"comment"`
	Timestamp int    `json:"timestamp"`
	User      string `json:"user"`
	Bot       bool   `json:"bot"`
	Minor     bool   `json:"minor"`
	Patrolled bool   `json:"patrolled"`
	Length    struct {
		Old int
		New int
	}
	Revision struct {
		Old int
		New int
	}
	ServerURL        string `json:"server_url"`
	ServerName       string `json:"server_name"`
	ServerScriptPath string `json:"server_script_path"`
	Wiki             string `json:"wiki"`
	ParsedComment    string `json:"parsedcomment"`
	EventData
}

RecentChangeEvent corresponds to the JSON event objects returned by the recent changes stream (see: https://schema.wikimedia.org/repositories/primary/jsonschema/mediawiki/recentchange/1.0.0.yaml).

type RevSlots

type RevSlots struct {
	Main Slot `json:"main"`
}

type RevisionCreateEvent

type RevisionCreateEvent struct {
	Meta              Meta      `json:"meta"`
	Database          string    `json:"database"`
	PageID            int       `json:"page_id"`
	PageTitle         string    `json:"page_title"`
	PageNamespace     int       `json:"page_namespace"`
	RevID             int       `json:"rev_id"`
	RevTimestamp      string    `json:"rev_timestamp"`
	RevSHA1           string    `json:"rev_sha1"`
	RevMinorEdit      bool      `json:"rev_minor_edit"`
	RevLen            int       `json:"rev_len"`
	RevContentModel   string    `json:"rev_content_model"`
	RevContentFormat  string    `json:"rev_content_format"`
	Performer         Performer `json:"performer"`
	PageIsRedirect    bool      `json:"page_is_redirect"`
	Comment           string    `json:"comment"`
	ParsedComment     string    `json:"parsedcomment"`
	RevParentID       int       `json:"rev_parent_id"`
	Dt                string    `json:"dt"`
	RevSlots          RevSlots  `json:"rev_slots"`
	RevContentChanged bool      `json:"rev_content_changed"`
	EventData
}

RevisionCreateEvent corresponds to the JSON event objects returned by the recent changes stream (see: https://schema.wikimedia.org/repositories/primary/jsonschema/mediawiki/revision/create/2.0.0.yaml).

type Slot

type Slot struct {
	RevSlotContentModel string `json:"rev_slot_content_model"`
	RevSlotSha1         string `json:"rev_slot_sha1"`
	RevSlotSize         int    `json:"rev_slot_size"`
	RevSlotOriginRevID  int    `json:"rev_slot_origin_rev_id"`
}

Jump to

Keyboard shortcuts

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