bot

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthBot        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowBot          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupBot = fmt.Errorf("proto: unexpected end of group")
)

Functions

func NewCommandEndpoints

func NewCommandEndpoints() []*api.Endpoint

Api Endpoints for Command service

func RegisterCommandHandler

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

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)
}

CommandClient is the client API for Command service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

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
}

Server API for Command service

type CommandServer

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

CommandServer is the server API for Command service.

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)
}

Client API for Command service

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"`
}

func (*ExecRequest) Descriptor

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

func (*ExecRequest) GetArgs

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

func (*ExecRequest) Marshal

func (m *ExecRequest) Marshal() (dAtA []byte, err error)

func (*ExecRequest) MarshalTo

func (m *ExecRequest) MarshalTo(dAtA []byte) (int, error)

func (*ExecRequest) MarshalToSizedBuffer

func (m *ExecRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ExecRequest) ProtoMessage

func (*ExecRequest) ProtoMessage()

func (*ExecRequest) Reset

func (m *ExecRequest) Reset()

func (*ExecRequest) Size

func (m *ExecRequest) Size() (n int)

func (*ExecRequest) String

func (m *ExecRequest) String() string

func (*ExecRequest) Unmarshal

func (m *ExecRequest) Unmarshal(dAtA []byte) error

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"`
}

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) Marshal

func (m *ExecResponse) Marshal() (dAtA []byte, err error)

func (*ExecResponse) MarshalTo

func (m *ExecResponse) MarshalTo(dAtA []byte) (int, error)

func (*ExecResponse) MarshalToSizedBuffer

func (m *ExecResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ExecResponse) ProtoMessage

func (*ExecResponse) ProtoMessage()

func (*ExecResponse) Reset

func (m *ExecResponse) Reset()

func (*ExecResponse) Size

func (m *ExecResponse) Size() (n int)

func (*ExecResponse) String

func (m *ExecResponse) String() string

func (*ExecResponse) Unmarshal

func (m *ExecResponse) Unmarshal(dAtA []byte) error

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 {
}

func (*HelpRequest) Descriptor

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

func (*HelpRequest) Marshal

func (m *HelpRequest) Marshal() (dAtA []byte, err error)

func (*HelpRequest) MarshalTo

func (m *HelpRequest) MarshalTo(dAtA []byte) (int, error)

func (*HelpRequest) MarshalToSizedBuffer

func (m *HelpRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*HelpRequest) ProtoMessage

func (*HelpRequest) ProtoMessage()

func (*HelpRequest) Reset

func (m *HelpRequest) Reset()

func (*HelpRequest) Size

func (m *HelpRequest) Size() (n int)

func (*HelpRequest) String

func (m *HelpRequest) String() string

func (*HelpRequest) Unmarshal

func (m *HelpRequest) Unmarshal(dAtA []byte) error

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"`
}

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) Marshal

func (m *HelpResponse) Marshal() (dAtA []byte, err error)

func (*HelpResponse) MarshalTo

func (m *HelpResponse) MarshalTo(dAtA []byte) (int, error)

func (*HelpResponse) MarshalToSizedBuffer

func (m *HelpResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*HelpResponse) ProtoMessage

func (*HelpResponse) ProtoMessage()

func (*HelpResponse) Reset

func (m *HelpResponse) Reset()

func (*HelpResponse) Size

func (m *HelpResponse) Size() (n int)

func (*HelpResponse) String

func (m *HelpResponse) String() string

func (*HelpResponse) Unmarshal

func (m *HelpResponse) Unmarshal(dAtA []byte) error

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

type UnimplementedCommandServer

type UnimplementedCommandServer struct {
}

UnimplementedCommandServer can be embedded to have forward compatible implementations.

func (*UnimplementedCommandServer) Exec

func (*UnimplementedCommandServer) Help

Jump to

Keyboard shortcuts

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