metadata

package
v0.0.0-...-4c29529 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FromDefault = iota
	FromContext
	FromQuery
	FromHeader
	FromParams
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Call

type Call struct {
	Server  string
	Handler string
	Name    string
	In      *Message
	Out     *Message
	Timeout time.Duration
}

type Field

type Field struct {
	Tag      int
	Name     string
	Kind     TypeKind
	Message  *Message
	Repeated bool
	Options  FieldOptions
}

type FieldOptions

type FieldOptions struct {
	OmitEmpty bool
	RawData   bool
	Validate  bool
	Bind      int
}

type Message

type Message struct {
	Name   string
	Fields []*Field

	Options MessageOptions
	// contains filtered or unexported fields
}

func (*Message) BakeNameField

func (m *Message) BakeNameField()

func (*Message) BakeTagIndex

func (m *Message) BakeTagIndex()

func (*Message) GetField

func (m *Message) GetField(fieldName string) *Field

func (*Message) TagIndex

func (m *Message) TagIndex(tag int) int

type MessageOptions

type MessageOptions struct {
	Flat      bool
	ExtraInfo interface{}
}

type Metadata

type Metadata struct {
	Routes []*Route
}

type Route

type Route struct {
	Method  string
	Path    string
	Options RouteOptions
	Call    *Call
}

type RouteOptions

type RouteOptions struct {
	Middlewares []string
}

type TypeKind

type TypeKind int
const (
	InvalidType TypeKind = iota
	Int32Kind
	Uint32Kind
	Int64Kind
	Uint64Kind
	BoolKind
	FloatKind
	DoubleKind
	Fixed32Kind
	Fixed64Kind
	EnumKind
	Sfixed32Kind
	Sfixed64Kind
	Sint32Kind
	Sint64Kind
	StringKind
	BytesKind
	MessageKind
	MapKind
	MaxTypeKind
)

Jump to

Keyboard shortcuts

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