proto

package
v0.0.0-...-23bf2d9 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_agent_proto_bot_proto protoreflect.FileDescriptor

Functions

func NewCommandEndpoints

func NewCommandEndpoints() []*api.Endpoint

NewCommandEndpoints API Endpoints for Command service

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
}

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

CommandService is the 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"`
	// contains filtered or unexported fields
}

func (*ExecRequest) Descriptor deprecated

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

Deprecated: Use ExecRequest.ProtoReflect.Descriptor instead.

func (*ExecRequest) GetArgs

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

func (*ExecRequest) ProtoMessage

func (*ExecRequest) ProtoMessage()

func (*ExecRequest) ProtoReflect

func (x *ExecRequest) ProtoReflect() protoreflect.Message

func (*ExecRequest) Reset

func (x *ExecRequest) Reset()

func (*ExecRequest) String

func (x *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,proto3" json:"error,omitempty"`
	// contains filtered or unexported fields
}

func (*ExecResponse) Descriptor deprecated

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

Deprecated: Use ExecResponse.ProtoReflect.Descriptor instead.

func (*ExecResponse) GetError

func (x *ExecResponse) GetError() string

func (*ExecResponse) GetResult

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

func (*ExecResponse) ProtoMessage

func (*ExecResponse) ProtoMessage()

func (*ExecResponse) ProtoReflect

func (x *ExecResponse) ProtoReflect() protoreflect.Message

func (*ExecResponse) Reset

func (x *ExecResponse) Reset()

func (*ExecResponse) String

func (x *ExecResponse) String() string

type HelpRequest

type HelpRequest struct {
	// contains filtered or unexported fields
}

func (*HelpRequest) Descriptor deprecated

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

Deprecated: Use HelpRequest.ProtoReflect.Descriptor instead.

func (*HelpRequest) ProtoMessage

func (*HelpRequest) ProtoMessage()

func (*HelpRequest) ProtoReflect

func (x *HelpRequest) ProtoReflect() protoreflect.Message

func (*HelpRequest) Reset

func (x *HelpRequest) Reset()

func (*HelpRequest) String

func (x *HelpRequest) String() string

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"`
	// contains filtered or unexported fields
}

func (*HelpResponse) Descriptor deprecated

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

Deprecated: Use HelpResponse.ProtoReflect.Descriptor instead.

func (*HelpResponse) GetDescription

func (x *HelpResponse) GetDescription() string

func (*HelpResponse) GetUsage

func (x *HelpResponse) GetUsage() string

func (*HelpResponse) ProtoMessage

func (*HelpResponse) ProtoMessage()

func (*HelpResponse) ProtoReflect

func (x *HelpResponse) ProtoReflect() protoreflect.Message

func (*HelpResponse) Reset

func (x *HelpResponse) Reset()

func (*HelpResponse) String

func (x *HelpResponse) String() string

Jump to

Keyboard shortcuts

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