builds

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PatchTypeString

func PatchTypeString(typ patch.Type, mode string) string

Types

type Action

type Action struct {
	Type     patch.Type
	Index    int                  `json:"-"`
	Class    *rbxapijson.Class    `json:",omitempty"`
	Property *rbxapijson.Property `json:",omitempty"`
	Function *rbxapijson.Function `json:",omitempty"`
	Event    *rbxapijson.Event    `json:",omitempty"`
	Callback *rbxapijson.Callback `json:",omitempty"`
	Enum     *rbxapijson.Enum     `json:",omitempty"`
	EnumItem *rbxapijson.EnumItem `json:",omitempty"`
	Field    string               `json:",omitempty"`
	Prev     *Value               `json:",omitempty"`
	Next     *Value               `json:",omitempty"`
}

func MakeSubactions

func MakeSubactions(action Action) []Action

Generates a list of actions for each member of the element.

func WrapActions

func WrapActions(actions []patch.Action) []Action

func (*Action) GetClass

func (a *Action) GetClass() rbxapi.Class

func (*Action) GetElement

func (a *Action) GetElement() interface{}

func (*Action) GetElementType

func (a *Action) GetElementType() string

func (*Action) GetEnum

func (a *Action) GetEnum() rbxapi.Enum

func (*Action) GetEnumItem

func (a *Action) GetEnumItem() rbxapi.EnumItem

func (*Action) GetField

func (a *Action) GetField() string

func (*Action) GetMember

func (a *Action) GetMember() rbxapi.Member

func (*Action) GetNext

func (a *Action) GetNext() interface{}

func (*Action) GetPrev

func (a *Action) GetPrev() interface{}

func (*Action) GetType

func (a *Action) GetType() patch.Type

func (*Action) SetMember

func (a *Action) SetMember(member rbxapi.Member)

func (*Action) String

func (a *Action) String() string

type Build

type Build struct {
	Config string
	Info   Info
	API    *rbxapijson.Root
}

type Info

type Info struct {
	Hash    string
	Date    time.Time
	Version fetch.Version
}

func (Info) Equal

func (a Info) Equal(b Info) bool

func (Info) String

func (m Info) String() string

type Patch

type Patch struct {
	Stale   bool  `json:"-"`
	Prev    *Info `json:",omitempty"`
	Info    Info
	Config  string
	Actions []Action
}

func MergePatches

func MergePatches(left, right []Patch, filter func(*Action) bool) []Patch

type Settings

type Settings struct {
	// Configs maps an identifying name to a fetch configuration.
	Configs map[string]fetch.Config
	// UseConfigs specifies the logical concatenation of the fetch configs
	// defined in the Configs setting. Builds from these configs are read
	// sequentially.
	UseConfigs []string
	// DisableRewind sets whether rewinding is enabled. If true, builds that are
	// not yet live will be included.
	DisableRewind bool
}

func (Settings) Fetch

func (settings Settings) Fetch() (builds []Build, err error)

func (Settings) Merge

func (settings Settings) Merge(cached []Patch, builds []Build) (patches []Patch, err error)

type Value

type Value struct {
	V interface{}
}

func WrapValue

func WrapValue(v interface{}) *Value

func (*Value) MarshalJSON

func (v *Value) MarshalJSON() (b []byte, err error)

func (*Value) UnmarshalJSON

func (v *Value) UnmarshalJSON(b []byte) (err error)

Jump to

Keyboard shortcuts

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