Documentation
¶
Overview ¶
The rbxapidump package implements the rbxapi interface as a codec for the Roblox API dump format.
Note that this package is an implementation of a non-standardized format. Therefore, this package's API is subject to change as the format changes.
Index ¶
- func Encode(w io.Writer, root *Root) (err error)
- type Callback
- func (member *Callback) Copy() rbxapi.Member
- func (member *Callback) GetMemberType() string
- func (member *Callback) GetName() string
- func (member *Callback) GetParameters() rbxapi.Parameters
- func (member *Callback) GetReturnType() rbxapi.Type
- func (member *Callback) GetSecurity() string
- func (member *Callback) Patch(actions []patch.Action)
- type Class
- type Enum
- type EnumItem
- type Event
- type Function
- func (member *Function) Copy() rbxapi.Member
- func (member *Function) GetMemberType() string
- func (member *Function) GetName() string
- func (member *Function) GetParameters() rbxapi.Parameters
- func (member *Function) GetReturnType() rbxapi.Type
- func (member *Function) GetSecurity() string
- func (member *Function) Patch(actions []patch.Action)
- type Parameter
- type Parameters
- type Property
- type Root
- type SyntaxError
- type Tags
- type Type
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Callback ¶
Callback represents an event member descriptor.
func (*Callback) Copy ¶
Copy returns a deep copy of the member descriptor.
Copy implements the rbxapi.Member interface.
func (*Callback) GetMemberType ¶
GetMemberType returns a string indicating the the type of member.
GetMemberType implements the rbxapi.Member interface.
func (*Callback) GetName ¶
GetName returns the name of the member.
GetName implements the rbxapi.Member interface.
func (*Callback) GetParameters ¶
func (member *Callback) GetParameters() rbxapi.Parameters
GetParameters returns the list of parameters describing the arguments passed to the callback. These parameters cannot have default values.
GetParameters implements the rbxapi.Callback interface.
func (*Callback) GetReturnType ¶
GetReturnType returns the type of value that is returned by the callback.
GetReturnType implements the rbxapi.Callback interface.
func (*Callback) GetSecurity ¶
GetSecurity returns the security context of the member's access.
GetSecurity implements the rbxapi.Callback interface.
type Class ¶
Class represents a class descriptor.
func (*Class) Copy ¶
Copy returns a deep copy of the class descriptor.
Copy implements the rbxapi.Class interface.
func (*Class) GetMember ¶
GetMember returns the first member descriptor of the given name, or nil if no member of the given name is present.
GetMember implements the rbxapi.Class interface.
func (*Class) GetMembers ¶
GetMembers returns a list of member descriptors belonging to the class.
GetMembers implements the rbxapi.Class interface.
func (*Class) GetName ¶
GetName returns the class name.
GetName implements the rbxapi.Class interface.
func (*Class) GetSuperclass ¶
GetSuperclass returns the name of the class that this class inherits from.
GetSuperclass implements the rbxapi.Class interface.
type Enum ¶
Enum represents an enum descriptor.
func (*Enum) Copy ¶
Copy returns a deep copy of the enum descriptor.
Copy implements the rbxapi.Enum interface.
func (*Enum) GetEnumItem ¶
GetEnumItem returns the first item of the given name, or nil if no item of the given name is present.
GetEnumItem implements the rbxapi.Enum interface.
func (*Enum) GetEnumItems ¶
GetEnumItems returns a list of items of the enum.
GetEnumItems implements the rbxapi.Enum interface.
type EnumItem ¶
EnumItem represents an enum item descriptor.
func (*EnumItem) Copy ¶
Copy returns a deep copy of the enum item descriptor.
Copy implements the rbxapi.EnumItem interface.
func (*EnumItem) GetName ¶
GetName returns the name of the enum item.
GetName implements the rbxapi.EnumItem interface.
type Event ¶
Event represents an event member descriptor.
func (*Event) Copy ¶
Copy returns a deep copy of the member descriptor.
Copy implements the rbxapi.Member interface.
func (*Event) GetMemberType ¶
GetMemberType returns a string indicating the the type of member.
GetMemberType implements the rbxapi.Member interface.
func (*Event) GetName ¶
GetName returns the name of the member.
GetName implements the rbxapi.Member interface.
func (*Event) GetParameters ¶
func (member *Event) GetParameters() rbxapi.Parameters
GetParameters returns the list of parameters describing the arguments received from the event. These parameters cannot have default values.
GetParameters implements the rbxapi.Event interface.
func (*Event) GetSecurity ¶
GetSecurity returns the security context of the member's access.
GetSecurity implements the rbxapi.Event interface.
type Function ¶
Function represents a function member descriptor.
func (*Function) Copy ¶
Copy returns a deep copy of the member descriptor.
Copy implements the rbxapi.Member interface.
func (*Function) GetMemberType ¶
GetMemberType returns a string indicating the the type of member.
GetMemberType implements the rbxapi.Member interface.
func (*Function) GetName ¶
GetName returns the name of the member.
GetName implements the rbxapi.Member interface.
func (*Function) GetParameters ¶
func (member *Function) GetParameters() rbxapi.Parameters
GetParameters returns the list of parameters describing the arguments passed to the function. These parameters may have default values.
GetParameters implements the rbxapi.Function interface.
func (*Function) GetReturnType ¶
GetReturnType returns the type of value returned by the function.
GetReturnType implements the rbxapi.Function interface.
func (*Function) GetSecurity ¶
GetSecurity returns the security context of the member's access.
GetSecurity implements the rbxapi.Function interface.
type Parameter ¶
Parameter represents a parameter of a function, yield function, event, or callback member.
func (Parameter) Copy ¶
Copy returns a deep copy of the parameter.
Copy implements the rbxapi.Parameter interface.
func (Parameter) GetDefault ¶
GetDefault returns a string representing the default value of the parameter, and whether a default value is present.
GetDefault implements the rbxapi.Parameter interface.
type Parameters ¶
type Parameters struct {
List *[]Parameter
}
func (Parameters) Copy ¶
func (params Parameters) Copy() rbxapi.Parameters
func (Parameters) GetLength ¶
func (params Parameters) GetLength() int
func (Parameters) GetParameter ¶
func (params Parameters) GetParameter(index int) rbxapi.Parameter
func (Parameters) GetParameters ¶
func (params Parameters) GetParameters() []rbxapi.Parameter
type Property ¶
Property represents a property member descriptor.
func (*Property) Copy ¶
Copy returns a deep copy of the member descriptor.
Copy implements the rbxapi.Member interface.
func (*Property) GetMemberType ¶
GetMemberType returns a string indicating the the type of member.
GetMemberType implements the rbxapi.Member interface.
func (*Property) GetName ¶
GetName returns the name of the member.
GetName implements the rbxapi.Member interface.
func (*Property) GetSecurity ¶
GetSecurity returns the security context associated with the property's read and write access.
GetSecurity implements the rbxapi.Property interface.
func (*Property) GetValueType ¶
GetValueType returns the type of value stored in the property.
GetValueType implements the rbxapi.Property interface.
type Root ¶
type Root struct { // Classes is the list of class descriptors present in the API. Classes []*Class // Enums is the list of enum descriptors present in the API. Enums []*Enum }
Root represents the top-level structure of the API dump.
func (*Root) Copy ¶
Copy returns a deep copy of the API structure.
Copy implements the rbxapi.Root interface.
func (*Root) GetClass ¶
GetClass returns the first class descriptor of the given name, or nil if no class of the given name is present.
GetClass implements the rbxapi.Root interface.
func (*Root) GetClasses ¶
GetClasses returns a list of class descriptors present in the API.
GetClasses implements the rbxapi.Root interface.
func (*Root) GetEnum ¶
GetEnum returns the first enum descriptor of the given name, or nil if no enum of the given name is present.
GetEnum implements the rbxapi.Root interface.
type SyntaxError ¶
type SyntaxError interface { error // SyntaxError returns an error message and the line on which the error // occurred. SyntaxError() (msg string, line int) }
SyntaxError indicates that a syntax error occurred while decoding.
type Tags ¶
type Tags []string
Tags contains the list of tags of a descriptor.
func (Tags) GetTag ¶
GetTag returns whether the given tag is present in the descriptor.
GetTag implements the rbxapi.Taggable interface.
func (Tags) GetTags ¶
GetTags returns a copy of the tags as a slice of strings.
GetTags implements the rbxapi.Taggable interface.
type Type ¶
type Type string
Type represents a value type.
func (Type) GetCategory ¶
GetCategory returns the category of the type. This will be empty when the type has no category.
GetCategory implements the rbxapi.Type interface.
func (Type) GetName ¶
GetName returns the name of the type.
GetName implements the rbxapi.Type interface.
func (*Type) SetFromType ¶
SetFromType sets the name of the type from a generic rbxapi.Type.