api

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: May 24, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Code generated by nRPC protoc plugin. DO NOT EDIT.

Index

Constants

This section is empty.

Variables

View Source
var File_api_api_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Client

type Client struct {
	Command  *CommandClient
	Rcon     *RconClient
	SoftMod  *SoftModClient
	Settings *SettingsClient
	// contains filtered or unexported fields
}

func NewClient

func NewClient(nc nrpc.NatsConn) *Client

func (*Client) SetEncoding

func (c *Client) SetEncoding(encoding string)

func (*Client) SetTimeout

func (c *Client) SetTimeout(t time.Duration)

type CommandClient

type CommandClient struct {
	Subject  string
	Encoding string
	Timeout  time.Duration
	// contains filtered or unexported fields
}

func NewCommandClient

func NewCommandClient(nc nrpc.NatsConn) *CommandClient

func (*CommandClient) Execute

func (c *CommandClient) Execute(req *CommandPayload) (*CommandResult, error)

type CommandHandler

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

CommandHandler provides a NATS subscription handler that can serve a subscription using a given CommandServer implementation.

func NewCommandConcurrentHandler

func NewCommandConcurrentHandler(workers *nrpc.WorkerPool, nc nrpc.NatsConn, s CommandServer) *CommandHandler

func NewCommandHandler

func NewCommandHandler(ctx context.Context, nc nrpc.NatsConn, s CommandServer) *CommandHandler

func (*CommandHandler) Handler

func (h *CommandHandler) Handler(msg *nats.Msg)

func (*CommandHandler) SetEncodings

func (h *CommandHandler) SetEncodings(encodings []string)

SetEncodings sets the output encodings when using a '*Publish' function

func (*CommandHandler) Subject

func (h *CommandHandler) Subject() string

type CommandPayload

type CommandPayload struct {
	Command string `protobuf:"bytes,1,opt,name=command,proto3" json:"command,omitempty"`
	// contains filtered or unexported fields
}

func (*CommandPayload) Descriptor deprecated

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

Deprecated: Use CommandPayload.ProtoReflect.Descriptor instead.

func (*CommandPayload) GetCommand

func (x *CommandPayload) GetCommand() string

func (*CommandPayload) ProtoMessage

func (*CommandPayload) ProtoMessage()

func (*CommandPayload) ProtoReflect

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

func (*CommandPayload) Reset

func (x *CommandPayload) Reset()

func (*CommandPayload) String

func (x *CommandPayload) String() string

type CommandResult

type CommandResult struct {
	Payload string `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"`
	// contains filtered or unexported fields
}

func (*CommandResult) Descriptor deprecated

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

Deprecated: Use CommandResult.ProtoReflect.Descriptor instead.

func (*CommandResult) GetPayload

func (x *CommandResult) GetPayload() string

func (*CommandResult) ProtoMessage

func (*CommandResult) ProtoMessage()

func (*CommandResult) ProtoReflect

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

func (*CommandResult) Reset

func (x *CommandResult) Reset()

func (*CommandResult) String

func (x *CommandResult) String() string

type CommandServer

type CommandServer interface {
	Execute(ctx context.Context, req *CommandPayload) (*CommandResult, error)
}

CommandServer is the interface that providers of the service Command should implement.

type Empty

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

func (*Empty) Descriptor deprecated

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

Deprecated: Use Empty.ProtoReflect.Descriptor instead.

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) ProtoReflect

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

func (*Empty) Reset

func (x *Empty) Reset()

func (*Empty) String

func (x *Empty) String() string

type RconClient

type RconClient struct {
	Subject  string
	Encoding string
	Timeout  time.Duration
	// contains filtered or unexported fields
}

func NewRconClient

func NewRconClient(nc nrpc.NatsConn) *RconClient

func (*RconClient) Execute

func (c *RconClient) Execute(req *RconCommand) (*RconResult, error)

type RconCommand

type RconCommand struct {
	Payload string `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"`
	// contains filtered or unexported fields
}

func (*RconCommand) Descriptor deprecated

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

Deprecated: Use RconCommand.ProtoReflect.Descriptor instead.

func (*RconCommand) GetPayload

func (x *RconCommand) GetPayload() string

func (*RconCommand) ProtoMessage

func (*RconCommand) ProtoMessage()

func (*RconCommand) ProtoReflect

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

func (*RconCommand) Reset

func (x *RconCommand) Reset()

func (*RconCommand) String

func (x *RconCommand) String() string

type RconHandler

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

RconHandler provides a NATS subscription handler that can serve a subscription using a given RconServer implementation.

func NewRconConcurrentHandler

func NewRconConcurrentHandler(workers *nrpc.WorkerPool, nc nrpc.NatsConn, s RconServer) *RconHandler

func NewRconHandler

func NewRconHandler(ctx context.Context, nc nrpc.NatsConn, s RconServer) *RconHandler

func (*RconHandler) Handler

func (h *RconHandler) Handler(msg *nats.Msg)

func (*RconHandler) SetEncodings

func (h *RconHandler) SetEncodings(encodings []string)

SetEncodings sets the output encodings when using a '*Publish' function

func (*RconHandler) Subject

func (h *RconHandler) Subject() string

type RconResult

type RconResult struct {
	Payload string `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"`
	// contains filtered or unexported fields
}

func (*RconResult) Descriptor deprecated

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

Deprecated: Use RconResult.ProtoReflect.Descriptor instead.

func (*RconResult) GetPayload

func (x *RconResult) GetPayload() string

func (*RconResult) ProtoMessage

func (*RconResult) ProtoMessage()

func (*RconResult) ProtoReflect

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

func (*RconResult) Reset

func (x *RconResult) Reset()

func (*RconResult) String

func (x *RconResult) String() string

type RconServer

type RconServer interface {
	Execute(ctx context.Context, req *RconCommand) (*RconResult, error)
}

RconServer is the interface that providers of the service Rcon should implement.

type ServerAdminsType

type ServerAdminsType struct {
	Write bool     `protobuf:"varint,1,opt,name=write,proto3" json:"write,omitempty"`
	Admin []string `protobuf:"bytes,2,rep,name=admin,proto3" json:"admin,omitempty"`
	// contains filtered or unexported fields
}

func (*ServerAdminsType) Descriptor deprecated

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

Deprecated: Use ServerAdminsType.ProtoReflect.Descriptor instead.

func (*ServerAdminsType) GetAdmin

func (x *ServerAdminsType) GetAdmin() []string

func (*ServerAdminsType) GetWrite

func (x *ServerAdminsType) GetWrite() bool

func (*ServerAdminsType) ProtoMessage

func (*ServerAdminsType) ProtoMessage()

func (*ServerAdminsType) ProtoReflect

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

func (*ServerAdminsType) Reset

func (x *ServerAdminsType) Reset()

func (*ServerAdminsType) String

func (x *ServerAdminsType) String() string

type SettingsClient

type SettingsClient struct {
	Subject  string
	Encoding string
	Timeout  time.Duration
	// contains filtered or unexported fields
}

func NewSettingsClient

func NewSettingsClient(nc nrpc.NatsConn) *SettingsClient

func (*SettingsClient) ServerAdmins

func (c *SettingsClient) ServerAdmins(req *ServerAdminsType) (*ServerAdminsType, error)

type SettingsHandler

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

SettingsHandler provides a NATS subscription handler that can serve a subscription using a given SettingsServer implementation.

func NewSettingsConcurrentHandler

func NewSettingsConcurrentHandler(workers *nrpc.WorkerPool, nc nrpc.NatsConn, s SettingsServer) *SettingsHandler

func NewSettingsHandler

func NewSettingsHandler(ctx context.Context, nc nrpc.NatsConn, s SettingsServer) *SettingsHandler

func (*SettingsHandler) Handler

func (h *SettingsHandler) Handler(msg *nats.Msg)

func (*SettingsHandler) SetEncodings

func (h *SettingsHandler) SetEncodings(encodings []string)

SetEncodings sets the output encodings when using a '*Publish' function

func (*SettingsHandler) Subject

func (h *SettingsHandler) Subject() string

type SettingsServer

type SettingsServer interface {
	ServerAdmins(ctx context.Context, req *ServerAdminsType) (*ServerAdminsType, error)
}

SettingsServer is the interface that providers of the service Settings should implement.

type SoftModClient

type SoftModClient struct {
	Subject  string
	Encoding string
	Timeout  time.Duration
	// contains filtered or unexported fields
}

func NewSoftModClient

func NewSoftModClient(nc nrpc.NatsConn) *SoftModClient

func (*SoftModClient) ApplySoftMod

func (c *SoftModClient) ApplySoftMod(req *SoftModRequest) (*Empty, error)

type SoftModHandler

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

SoftModHandler provides a NATS subscription handler that can serve a subscription using a given SoftModServer implementation.

func NewSoftModConcurrentHandler

func NewSoftModConcurrentHandler(workers *nrpc.WorkerPool, nc nrpc.NatsConn, s SoftModServer) *SoftModHandler

func NewSoftModHandler

func NewSoftModHandler(ctx context.Context, nc nrpc.NatsConn, s SoftModServer) *SoftModHandler

func (*SoftModHandler) Handler

func (h *SoftModHandler) Handler(msg *nats.Msg)

func (*SoftModHandler) SetEncodings

func (h *SoftModHandler) SetEncodings(encodings []string)

SetEncodings sets the output encodings when using a '*Publish' function

func (*SoftModHandler) Subject

func (h *SoftModHandler) Subject() string

type SoftModRequest

type SoftModRequest struct {
	Payload     []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"`
	SkipRestart bool   `protobuf:"varint,2,opt,name=skipRestart,proto3" json:"skipRestart,omitempty"`
	// contains filtered or unexported fields
}

func (*SoftModRequest) Descriptor deprecated

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

Deprecated: Use SoftModRequest.ProtoReflect.Descriptor instead.

func (*SoftModRequest) GetPayload

func (x *SoftModRequest) GetPayload() []byte

func (*SoftModRequest) GetSkipRestart

func (x *SoftModRequest) GetSkipRestart() bool

func (*SoftModRequest) ProtoMessage

func (*SoftModRequest) ProtoMessage()

func (*SoftModRequest) ProtoReflect

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

func (*SoftModRequest) Reset

func (x *SoftModRequest) Reset()

func (*SoftModRequest) String

func (x *SoftModRequest) String() string

type SoftModServer

type SoftModServer interface {
	ApplySoftMod(ctx context.Context, req *SoftModRequest) (*Empty, error)
}

SoftModServer is the interface that providers of the service SoftMod should implement.

Jump to

Keyboard shortcuts

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