data

package
v0.19.1 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2023 License: BSD-2-Clause Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Alias

type Alias struct {
	Kind       TypeKind     `json:"kind,omitempty"`
	Name       string       `json:"name,omitempty"`        // class type name
	Module     string       `json:"module,omitempty"`      // module name
	TargetType string       `json:"target_type,omitempty"` // the target type name
	Values     []*EnumValue `json:"values,omitempty"`
}

Alias for typedef or enums

func (*Alias) FullName

func (a *Alias) FullName() string

func (*Alias) GetModule

func (a *Alias) GetModule() string

func (*Alias) GetName

func (a *Alias) GetName() string

type Class

type Class struct {
	Kind       TypeKind    `json:"kind,omitempty"`
	Name       string      `json:"name,omitempty"`       // class type name
	Module     string      `json:"module,omitempty"`     // module name
	Parent     string      `json:"parent,omitempty"`     // parent class type name
	Properties []*Property `json:"properties,omitempty"` // properties
	Methods    []*Method   `json:"methods,omitempty"`    // methods
}

func (*Class) FullName

func (c *Class) FullName() string

func (*Class) GetModule

func (c *Class) GetModule() string

func (*Class) GetName

func (c *Class) GetName() string

type EnumValue

type EnumValue struct {
	Name       string `json:"name,omitempty"`        // the objc enum name
	Value      string `json:"value,omitempty"`       // the enum value. if has different values in different arch, this value is for amd64.
	Arm64Value string `json:"arm64_value,omitempty"` // some may have different enum value in arm64
	Module     string `json:"module,omitempty"`      // the module enum value defined in
}

EnumValue the enum name and value

type Function

type Function struct {
	Name       string   `json:"name,omitempty"`        // the first part of objc function name
	Params     []*Param `json:"params,omitempty"`      // the params
	ReturnType string   `json:"return_type,omitempty"` // the return type name
	Deprecated bool     `json:"deprecated,omitempty"`  // if has been deprecated
}

Function is a objective-c Function

type KindType

type KindType struct {
	Kind TypeKind `json:"kind,omitempty"`
}

type Method

type Method struct {
	Name        string   `json:"name,omitempty"`         // the first part of objc method name
	GoName      string   `json:"go_name,omitempty"`      // may be empty.if empty, use Name
	Params      []*Param `json:"params,omitempty"`       // the params
	ReturnType  string   `json:"return_type,omitempty"`  // the return type name
	ClassMethod bool     `json:"class_method,omitempty"` // true if is class method
	Deprecated  bool     `json:"deprecated,omitempty"`   // if has been deprecated
	Required    bool     `json:"required,omitempty"`     // If this method is required. only for protocol method.
}

Method is a protocol/class method

type Param

type Param struct {
	Name         string `json:"name,omitempty"`          // the param name
	VariableName string `json:"variable_name,omitempty"` // the variable name
	Type         string `json:"type,omitempty"`          // type
}

Param is method param

type Property

type Property struct {
	Name          string `json:"name,omitempty"`           // the property name
	GoName        string `json:"go_name,omitempty"`        // optional go property name
	ReadOnly      bool   `json:"read_only,omitempty"`      // if is readonly property
	GetterName    string `json:"getter_name,omitempty"`    // the getter name for property
	Type          string `json:"type,omitempty"`           // the type name
	ClassProperty bool   `json:"class_property,omitempty"` // if is class property
	Weak          bool   `json:"weak,omitempty"`           // weak property
	Deprecated    bool   `json:"deprecated,omitempty"`     // if is deprecated
	Required      bool   `json:"required,omitempty"`       // for protocol, if require implement
}

type Protocol

type Protocol struct {
	Kind       TypeKind    `json:"kind,omitempty"`
	Name       string      `json:"name,omitempty"`       // the type name
	OnlyUse    bool        `json:"only_use,omitempty"`   // if this protocol is just for use, no need to implement it
	Module     string      `json:"module,omitempty"`     // module name
	Parents    []string    `json:"parents,omitempty"`    // the parent protocols names
	Methods    []*Method   `json:"methods,omitempty"`    // methods
	Properties []*Property `json:"properties,omitempty"` // properties
}

func (*Protocol) FullName

func (p *Protocol) FullName() string

func (*Protocol) GetModule

func (p *Protocol) GetModule() string

func (*Protocol) GetName

func (p *Protocol) GetName() string

type Struct

type Struct struct {
	Kind   TypeKind `json:"kind,omitempty"`
	Name   string   `json:"name,omitempty"`   // class type name
	Module string   `json:"module,omitempty"` // module name
}

Struct c struct type

func (*Struct) FullName

func (s *Struct) FullName() string

func (*Struct) GetModule

func (s *Struct) GetModule() string

func (*Struct) GetName

func (s *Struct) GetName() string

type TypeInfo

type TypeInfo interface {
	GetName() string
	GetModule() string
	FullName() string
}

type TypeKind

type TypeKind string
const (
	KindClass    TypeKind = "class"
	KindProtocol TypeKind = "protocol"
	KindAlias    TypeKind = "alias"
	KindStruct   TypeKind = "struct"
)

Jump to

Keyboard shortcuts

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