entity

package
v0.7.3 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrMutualAuthParamsAreNotEnough = errors.New("cert and certkey are required to authenticate mutually")

Functions

This section is empty.

Types

type BidiStream

type BidiStream interface {
	Send(req proto.Message) error
	Receive(res *proto.Message) error
	Close() error
}

type ClientStream

type ClientStream interface {
	Send(req proto.Message) error
	CloseAndReceive(res *proto.Message) error
}

type Enum

type Enum interface {
	Name() string
	Values() []EnumValue
}

type EnumField

type EnumField interface {
	Field
	Enum
}

EnumField is set of values

type EnumValue

type EnumValue interface {
	Name() string
	Number() int32
}

type Field

type Field interface {
	FieldName() string
	FQRN() string
	Type() FieldType
	IsRepeated() bool

	// *desc.FieldDescriptor.GetType().String()
	// used only from port.Showable
	PBType() string
}

Field represents base field features. fieldable types:

enum, oneof, message, primitive

type FieldType

type FieldType int
const (
	FieldTypePrimitive FieldType = iota
	FieldTypeEnum
	FieldTypeOneOf
	FieldTypeMessage
)

type GRPCClient

type GRPCClient interface {
	Invoke(ctx context.Context, fqrn string, req, res interface{}) error
	NewClientStream(ctx context.Context, rpc RPC) (ClientStream, error)
	NewServerStream(ctx context.Context, rpc RPC) (ServerStream, error)
	NewBidiStream(ctx context.Context, rpc RPC) (BidiStream, error)
	Close(ctx context.Context) error

	GRPCReflectionClient
}

type GRPCReflectionClient

type GRPCReflectionClient interface {
	ReflectionEnabled() bool
	ListPackages() ([]*Package, error)
}
type Header struct {
	Key, Val string

	// NeedToRemove is used only from REPL header command
	NeedToRemove bool
}

type Message

type Message interface {
	Name() string
	Fields() []Field
	IsCycled() bool
}

type MessageField

type MessageField interface {
	Field
	Message
}

type OneOfField

type OneOfField interface {
	Field
	Choices() []Field
}

type Package

type Package struct {
	Name     string
	Services []Service
	Messages []Message
}

func NewPackage

func NewPackage(name string, msgs []Message, svcs []Service) *Package

type Parser

type Parser interface {
	ParseFile(fnames []string, fpaths []string) ([]*Package, error)
}

type PrimitiveField

type PrimitiveField interface {
	Field
}

type RPC

type RPC interface {
	Name() string
	FQRN() string
	RequestMessage() Message
	ResponseMessage() Message
	IsServerStreaming() bool
	IsClientStreaming() bool

	// StreamDesc returns *grpc.StreamDesc.
	// if both of IsServerStreaming and IsClientStreaming are nil,
	// StreamDesc will panic.
	StreamDesc() *grpc.StreamDesc
}

type ServerStream

type ServerStream interface {
	Send(req proto.Message) error
	Receive(res *proto.Message) error
}

type Service

type Service interface {
	Name() string
	FQRN() string
	RPCs() []RPC
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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