go_micro_bot

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package go_micro_bot is a generated protocol buffer package.

It is generated from these files:

github.com/micro/micro/bot/proto/bot.proto

It has these top-level messages:

HelpRequest
HelpResponse
ExecRequest
ExecResponse

Package go_micro_bot is a generated protocol buffer package.

It is generated from these files:

github.com/micro/micro/bot/proto/bot.proto

It has these top-level messages:

HelpRequest
HelpResponse
ExecRequest
ExecResponse

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterCommandHandler

func RegisterCommandHandler(s server.Server, hdlr CommandHandler, opts ...server.HandlerOption)

func RegisterCommandServer

func RegisterCommandServer(s *grpc.Server, srv CommandServer)

Types

type CommandClient

type CommandClient interface {
	Help(ctx context.Context, in *HelpRequest, opts ...grpc.CallOption) (*HelpResponse, error)
	Exec(ctx context.Context, in *ExecRequest, opts ...grpc.CallOption) (*ExecResponse, error)
}

func NewCommandClient

func NewCommandClient(cc *grpc.ClientConn) CommandClient

type CommandHandler

type CommandHandler interface {
	Help(context.Context, *HelpRequest, *HelpResponse) error
	Exec(context.Context, *ExecRequest, *ExecResponse) error
}

type CommandServer

type CommandServer interface {
	Help(context.Context, *HelpRequest) (*HelpResponse, error)
	Exec(context.Context, *ExecRequest) (*ExecResponse, error)
}

type CommandService

type CommandService interface {
	Help(ctx context.Context, in *HelpRequest, opts ...client.CallOption) (*HelpResponse, error)
	Exec(ctx context.Context, in *ExecRequest, opts ...client.CallOption) (*ExecResponse, error)
}

func NewCommandService

func NewCommandService(serviceName string, c client.Client) CommandService

type ExecRequest

type ExecRequest struct {
	Args []string `protobuf:"bytes,1,rep,name=args" json:"args,omitempty"`
}

func (*ExecRequest) Descriptor

func (*ExecRequest) Descriptor() ([]byte, []int)

func (*ExecRequest) GetArgs

func (m *ExecRequest) GetArgs() []string

func (*ExecRequest) ProtoMessage

func (*ExecRequest) ProtoMessage()

func (*ExecRequest) Reset

func (m *ExecRequest) Reset()

func (*ExecRequest) String

func (m *ExecRequest) String() string

type ExecResponse

type ExecResponse struct {
	Result []byte `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"`
	Error  string `protobuf:"bytes,2,opt,name=error" json:"error,omitempty"`
}

func (*ExecResponse) Descriptor

func (*ExecResponse) Descriptor() ([]byte, []int)

func (*ExecResponse) GetError

func (m *ExecResponse) GetError() string

func (*ExecResponse) GetResult

func (m *ExecResponse) GetResult() []byte

func (*ExecResponse) ProtoMessage

func (*ExecResponse) ProtoMessage()

func (*ExecResponse) Reset

func (m *ExecResponse) Reset()

func (*ExecResponse) String

func (m *ExecResponse) String() string

type HelpRequest

type HelpRequest struct {
}

func (*HelpRequest) Descriptor

func (*HelpRequest) Descriptor() ([]byte, []int)

func (*HelpRequest) ProtoMessage

func (*HelpRequest) ProtoMessage()

func (*HelpRequest) Reset

func (m *HelpRequest) Reset()

func (*HelpRequest) String

func (m *HelpRequest) String() string

type HelpResponse

type HelpResponse struct {
	Usage       string `protobuf:"bytes,1,opt,name=usage" json:"usage,omitempty"`
	Description string `protobuf:"bytes,2,opt,name=description" json:"description,omitempty"`
}

func (*HelpResponse) Descriptor

func (*HelpResponse) Descriptor() ([]byte, []int)

func (*HelpResponse) GetDescription

func (m *HelpResponse) GetDescription() string

func (*HelpResponse) GetUsage

func (m *HelpResponse) GetUsage() string

func (*HelpResponse) ProtoMessage

func (*HelpResponse) ProtoMessage()

func (*HelpResponse) Reset

func (m *HelpResponse) Reset()

func (*HelpResponse) String

func (m *HelpResponse) String() string

Jump to

Keyboard shortcuts

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