doc

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ORPCThis = &FieldDoc{
		Name: "This",
		Doc:  []string{"This: ORPCTHIS structure that is used to send ORPC extension data to the server."},
	}

	ORPCThat = &FieldDoc{
		Name: "That",
		Doc:  []string{"That: ORPCTHAT structure that is used to return ORPC extension data to the client."},
	}
)
View Source
var (
	LogOutput = os.Stderr
)

Functions

func MustURLJoinPath

func MustURLJoinPath(base string, elem ...string) string

func NewDocument

func NewDocument(url string) (*goquery.Document, error)

func String

func String(v string) string

func WithCache

func WithCache(c string) func(*Doc)

Types

type Doc

type Doc struct {
	Types []*TypeDoc `json:"types"`
	// contains filtered or unexported fields
}

func BuildDoc

func BuildDoc(n string, opts ...func(*Doc)) (*Doc, error)

func (*Doc) DocumentToCache

func (d *Doc) DocumentToCache(url string, nodes []*html.Node) error

func (*Doc) NewDocumentFromCache

func (d *Doc) NewDocumentFromCache(url string) (*goquery.Document, error)

func (*Doc) Type

func (d *Doc) Type(n ...string) (*TypeDoc, bool)

type FieldDoc

type FieldDoc struct {
	Name string   `json:"name"`
	Doc  []string `json:"doc"`
}

func (*FieldDoc) AddDoc

func (td *FieldDoc) AddDoc(doc string)

type TypeDoc

type TypeDoc struct {
	Ref    string      `json:"ref"`
	Name   string      `json:"name"`
	Doc    []string    `json:"doc"`
	Fields []*FieldDoc `json:"fields"`
}

func MergeType

func MergeType(t1, t2 *TypeDoc) *TypeDoc

func (*TypeDoc) AddDoc

func (td *TypeDoc) AddDoc(doc string)

func (*TypeDoc) AddField

func (td *TypeDoc) AddField(field, doc string)

func (*TypeDoc) Field

func (td *TypeDoc) Field(n string) (*FieldDoc, bool)

func (*TypeDoc) ObjectField

func (td *TypeDoc) ObjectField(n string) (*FieldDoc, bool)

Jump to

Keyboard shortcuts

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