go_micro_bot

package
v1.3.3 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2021 License: Apache-2.0 Imports: 6 Imported by: 14

Documentation

Overview

Package go_micro_bot is a generated protocol buffer package.

It is generated from these files:

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:

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)

Types

type CommandHandler

type CommandHandler 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(name string, c client.Client) CommandService

type ExecRequest

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

func (*ExecRequest) Descriptor

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

func (*ExecRequest) GetArgs

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

func (*ExecRequest) GetSender

func (m *ExecRequest) GetSender() 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