index

package
v0.0.0-...-9ef90bf Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Provides structure for the primary API data index.

Index

Constants

This section is empty.

Variables

View Source
var MemberTypes = []id.MemberType{
	"Property",
	"Function",
	"Event",
	"Callback",
}

Functions

This section is empty.

Types

type Class

type Class struct {
	Name         string
	Removed      bool       // Not present in latest state.
	HasRemoved   bool       // Has removed descendant class.
	Subclasses   []id.Class // Sorted by name.
	Superclasses []id.Class // Sorted by ancestry.
	Related      TypeRefs   `json:",omitempty"`
}

type Enum

type Enum struct {
	Name         string
	Removed      bool
	ItemsByValue []id.EnumItem
	ItemsByIndex []id.EnumItem
	Related      TypeRefs `json:",omitempty"`
}

type EnumItem

type EnumItem struct {
	Enum    string
	Name    string
	Removed bool
}

type Member

type Member struct {
	Class      string
	Name       string
	MemberType string
	Removed    bool
	Related    TypeRefs `json:",omitempty"`
}

type Root

type Root struct {
	RootClasses    []id.Class
	MemberTypes    []id.MemberType
	TypeCategories []string
	Tag            []string
	Security       []string
	ThreadSafety   []string

	Class    map[id.Class]*Class
	Member   map[id.Class]map[id.Member]*Member
	Enum     map[id.Enum]*Enum
	EnumItem map[id.Enum]map[id.EnumItem]*EnumItem
	Type     map[id.Type]*Type

	MinYear int
	MaxYear int
}

func (*Root) Build

func (r *Root) Build(hist *history.Root, dump *rbxdump.Root) error

type Type

type Type struct {
	Category string
	Name     string
	Removed  bool
	Related  TypeRefs `json:",omitempty"`
}

type TypeRef

type TypeRef struct {
	Class      id.Class      // Class name.
	Member     id.Member     // Member name.
	MemberType id.MemberType // Member type.
	Removed    bool          // Whether member is removed.
	Field      string        // Index of Fields.
	Kind       string        // Type: rbxdump.Type; Parameter: rbxdump.Parameter.
	Index      int           // Index within slice value. -1: Not a slice.
	Type       rbxdump.Type  // Type value.
}

TypeRef represents a reference to a type from a member.

type TypeRefs

type TypeRefs []TypeRef

func (TypeRefs) Len

func (t TypeRefs) Len() int

func (TypeRefs) Less

func (t TypeRefs) Less(i, j int) bool

func (TypeRefs) Swap

func (t TypeRefs) Swap(i, j int)

Jump to

Keyboard shortcuts

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