go_micro_bot

package
v1.17.1 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2019 License: Apache-2.0 Imports: 6 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterCommandHandler

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

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 {
	Args                 []string `protobuf:"bytes,1,rep,name=args,proto3" json:"args,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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

func (*ExecRequest) XXX_DiscardUnknown

func (m *ExecRequest) XXX_DiscardUnknown()

func (*ExecRequest) XXX_Marshal

func (m *ExecRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ExecRequest) XXX_Merge

func (m *ExecRequest) XXX_Merge(src proto.Message)

func (*ExecRequest) XXX_Size

func (m *ExecRequest) XXX_Size() int

func (*ExecRequest) XXX_Unmarshal

func (m *ExecRequest) XXX_Unmarshal(b []byte) error

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,proto3" json:"error,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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

func (*ExecResponse) XXX_DiscardUnknown

func (m *ExecResponse) XXX_DiscardUnknown()

func (*ExecResponse) XXX_Marshal

func (m *ExecResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ExecResponse) XXX_Merge

func (m *ExecResponse) XXX_Merge(src proto.Message)

func (*ExecResponse) XXX_Size

func (m *ExecResponse) XXX_Size() int

func (*ExecResponse) XXX_Unmarshal

func (m *ExecResponse) XXX_Unmarshal(b []byte) error

type HelpRequest

type HelpRequest struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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

func (*HelpRequest) XXX_DiscardUnknown

func (m *HelpRequest) XXX_DiscardUnknown()

func (*HelpRequest) XXX_Marshal

func (m *HelpRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*HelpRequest) XXX_Merge

func (m *HelpRequest) XXX_Merge(src proto.Message)

func (*HelpRequest) XXX_Size

func (m *HelpRequest) XXX_Size() int

func (*HelpRequest) XXX_Unmarshal

func (m *HelpRequest) XXX_Unmarshal(b []byte) error

type HelpResponse

type HelpResponse struct {
	Usage                string   `protobuf:"bytes,1,opt,name=usage,proto3" json:"usage,omitempty"`
	Description          string   `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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

func (*HelpResponse) XXX_DiscardUnknown

func (m *HelpResponse) XXX_DiscardUnknown()

func (*HelpResponse) XXX_Marshal

func (m *HelpResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*HelpResponse) XXX_Merge

func (m *HelpResponse) XXX_Merge(src proto.Message)

func (*HelpResponse) XXX_Size

func (m *HelpResponse) XXX_Size() int

func (*HelpResponse) XXX_Unmarshal

func (m *HelpResponse) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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