shared

package
v0.0.0-...-14bcf06 Latest Latest
Warning

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

Go to latest
Published: May 6, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Enum    = "enum"
	Message = "message"

	TODOComment = "***TODO***"
)

Variables

This section is empty.

Functions

func Register

func Register(tpl *template.Template, params pgs.Parameters)

Types

type EnumDoc

type EnumDoc struct {
	pgs.Enum
	Values []*EnumDocValue
}

type EnumDocValue

type EnumDocValue struct {
	Name    string
	Value   int32
	Comment string
}

type Func

type Func struct {
	pgsgo.Context
}

func (Func) Anchor

func (fn Func) Anchor(name pgs.Name) string

func (Func) EmbedFields

func (fn Func) EmbedFields(field pgs.Field, enumDoc map[string]interface{}, msgDoc map[string]interface{})

func (Func) EmbedMessages

func (fn Func) EmbedMessages(file pgs.File) map[string]map[string]interface{}

func (Func) EnumDoc

func (fn Func) EnumDoc(enum pgs.Enum) []*EnumDocValue

func (Func) GatewayDoc

func (fn Func) GatewayDoc(method pgs.Method) *GatewayDoc

func (Func) GatewayURL

func (fn Func) GatewayURL(method pgs.Method) string

func (Func) JSONDemo

func (fn Func) JSONDemo(message pgs.Message) string

func (Func) LeadingComment

func (fn Func) LeadingComment(info pgs.SourceCodeInfo) string

func (Func) MessageDoc

func (fn Func) MessageDoc(msg pgs.Message) []*MessageDocField

func (Func) TOCComment

func (fn Func) TOCComment(info pgs.SourceCodeInfo) string

func (Func) TrailingComment

func (fn Func) TrailingComment(info pgs.SourceCodeInfo) string

type GatewayDoc

type GatewayDoc struct {
	URL          string
	Method       string
	ContentType  string
	JsonRequired bool
}

type MessageDoc

type MessageDoc struct {
	pgs.Message
	Fields []*MessageDocField
}

type MessageDocField

type MessageDocField struct {
	Name      string
	Comment   string
	ProtoType string
	JsonType  string
	Default   string
	Required  bool
}

Jump to

Keyboard shortcuts

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