directive

package
v0.0.0-...-666727d Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package directive GENERATED BY gengo:runtimedoc DON'T EDIT THIS FILE

Index

Constants

View Source
const DefaultDirectiveNewer = "_default"

Variables

This section is empty.

Functions

func MarshalDirective

func MarshalDirective(funcName string, args ...any) ([]byte, error)

Types

type Decoder

type Decoder struct {
	// contains filtered or unexported fields
}

func NewDecoder

func NewDecoder(r io.Reader) *Decoder

func (*Decoder) DirectiveName

func (d *Decoder) DirectiveName() (string, error)

func (*Decoder) Next

func (d *Decoder) Next() (Kind, []byte)

func (*Decoder) RegisterDirectiveNewer

func (d *Decoder) RegisterDirectiveNewer(directiveName string, fn Newer)

func (*Decoder) Reset

func (d *Decoder) Reset(r io.Reader)

func (*Decoder) Unmarshaler

func (d *Decoder) Unmarshaler(name string) (Unmarshaler, error)

type Directive

type Directive struct {
	Args []any
	Name string
}

func (Directive) MarshalDirective

func (f Directive) MarshalDirective() ([]byte, error)

func (*Directive) RuntimeDoc

func (v *Directive) RuntimeDoc(names ...string) ([]string, bool)

func (*Directive) UnmarshalDirective

func (r *Directive) UnmarshalDirective(dec *Decoder) error

type ErrInvalidDirective

type ErrInvalidDirective struct {
	DirectiveName string
}

func (*ErrInvalidDirective) Error

func (e *ErrInvalidDirective) Error() string

func (*ErrInvalidDirective) RuntimeDoc

func (v *ErrInvalidDirective) RuntimeDoc(names ...string) ([]string, bool)

func (*ErrInvalidDirective) StatusCode

func (e *ErrInvalidDirective) StatusCode() int

type ErrUnsupportedDirective

type ErrUnsupportedDirective struct {
	DirectiveName string
}

func (*ErrUnsupportedDirective) Error

func (e *ErrUnsupportedDirective) Error() string

func (*ErrUnsupportedDirective) RuntimeDoc

func (v *ErrUnsupportedDirective) RuntimeDoc(names ...string) ([]string, bool)

func (*ErrUnsupportedDirective) StatusCode

func (e *ErrUnsupportedDirective) StatusCode() int

type Kind

type Kind int
const (
	KindInvalid Kind = iota
	KindFuncStart
	KindFuncEnd
	KindValue
	EOF
)

func (*Kind) RuntimeDoc

func (*Kind) RuntimeDoc(names ...string) ([]string, bool)

type Marshaler

type Marshaler interface {
	MarshalDirective() ([]byte, error)
}

type Newer

type Newer func() Unmarshaler

func (*Newer) RuntimeDoc

func (*Newer) RuntimeDoc(names ...string) ([]string, bool)

type RawValue

type RawValue []byte

func (RawValue) MarshalDirective

func (v RawValue) MarshalDirective() ([]byte, error)

func (*RawValue) RuntimeDoc

func (*RawValue) RuntimeDoc(names ...string) ([]string, bool)

type Unmarshaler

type Unmarshaler interface {
	UnmarshalDirective(*Decoder) error
}

type UnmarshalerFunc

type UnmarshalerFunc func(*Decoder) error

func (*UnmarshalerFunc) RuntimeDoc

func (*UnmarshalerFunc) RuntimeDoc(names ...string) ([]string, bool)

func (UnmarshalerFunc) UnmarshalDirective

func (fn UnmarshalerFunc) UnmarshalDirective(d *Decoder) error

Jump to

Keyboard shortcuts

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