types

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2022 License: MIT Imports: 6 Imported by: 13

Documentation

Overview

Package types provides various types for krpc-go.

Index

Constants

This section is empty.

Variables

View Source
var (
	ConnectionRequest_Type_name = map[int32]string{
		0: "RPC",
		1: "STREAM",
	}
	ConnectionRequest_Type_value = map[string]int32{
		"RPC":    0,
		"STREAM": 1,
	}
)

Enum value maps for ConnectionRequest_Type.

View Source
var (
	ConnectionResponse_Status_name = map[int32]string{
		0: "OK",
		1: "MALFORMED_MESSAGE",
		2: "TIMEOUT",
		3: "WRONG_TYPE",
	}
	ConnectionResponse_Status_value = map[string]int32{
		"OK":                0,
		"MALFORMED_MESSAGE": 1,
		"TIMEOUT":           2,
		"WRONG_TYPE":        3,
	}
)

Enum value maps for ConnectionResponse_Status.

View Source
var (
	Procedure_GameScene_name = map[int32]string{
		0: "SPACE_CENTER",
		1: "FLIGHT",
		2: "TRACKING_STATION",
		3: "EDITOR_VAB",
		4: "EDITOR_SPH",
		5: "MISSION_BUILDER",
	}
	Procedure_GameScene_value = map[string]int32{
		"SPACE_CENTER":     0,
		"FLIGHT":           1,
		"TRACKING_STATION": 2,
		"EDITOR_VAB":       3,
		"EDITOR_SPH":       4,
		"MISSION_BUILDER":  5,
	}
)

Enum value maps for Procedure_GameScene.

View Source
var (
	Type_TypeCode_name = map[int32]string{
		0:   "NONE",
		1:   "DOUBLE",
		2:   "FLOAT",
		3:   "SINT32",
		4:   "SINT64",
		5:   "UINT32",
		6:   "UINT64",
		7:   "BOOL",
		8:   "STRING",
		9:   "BYTES",
		100: "CLASS",
		101: "ENUMERATION",
		200: "EVENT",
		201: "PROCEDURE_CALL",
		202: "STREAM",
		203: "STATUS",
		204: "SERVICES",
		300: "TUPLE",
		301: "LIST",
		302: "SET",
		303: "DICTIONARY",
	}
	Type_TypeCode_value = map[string]int32{
		"NONE":           0,
		"DOUBLE":         1,
		"FLOAT":          2,
		"SINT32":         3,
		"SINT64":         4,
		"UINT32":         5,
		"UINT64":         6,
		"BOOL":           7,
		"STRING":         8,
		"BYTES":          9,
		"CLASS":          100,
		"ENUMERATION":    101,
		"EVENT":          200,
		"PROCEDURE_CALL": 201,
		"STREAM":         202,
		"STATUS":         203,
		"SERVICES":       204,
		"TUPLE":          300,
		"LIST":           301,
		"SET":            302,
		"DICTIONARY":     303,
	}
)

Enum value maps for Type_TypeCode.

Functions

This section is empty.

Types

type Argument

type Argument struct {
	Position uint32 `protobuf:"varint,1,opt,name=position,proto3" json:"position,omitempty"`
	Value    []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*Argument) Descriptor deprecated

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

Deprecated: Use Argument.ProtoReflect.Descriptor instead.

func (*Argument) GetPosition

func (x *Argument) GetPosition() uint32

func (*Argument) GetValue

func (x *Argument) GetValue() []byte

func (*Argument) ProtoMessage

func (*Argument) ProtoMessage()

func (*Argument) ProtoReflect

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

func (*Argument) Reset

func (x *Argument) Reset()

func (*Argument) String

func (x *Argument) String() string

type Class

type Class struct {
	Name          string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Documentation string `protobuf:"bytes,2,opt,name=documentation,proto3" json:"documentation,omitempty"`
	// contains filtered or unexported fields
}

func (*Class) Descriptor deprecated

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

Deprecated: Use Class.ProtoReflect.Descriptor instead.

func (*Class) GetDocumentation

func (x *Class) GetDocumentation() string

func (*Class) GetName

func (x *Class) GetName() string

func (*Class) ProtoMessage

func (*Class) ProtoMessage()

func (*Class) ProtoReflect

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

func (*Class) Reset

func (x *Class) Reset()

func (*Class) String

func (x *Class) String() string

type Color

type Color[T Real] struct {
	R, G, B T
}

Color is an RGB color.

func ColorFromTuple

func ColorFromTuple[T Real](t Tuple3[T, T, T]) Color[T]

ColorFromTuple creates a color from a tuple.

func (Color[T]) ToFloat32

func (c Color[T]) ToFloat32() Color[float32]

ToFloat32 converts the color to a float32 color.

func (Color[T]) ToFloat64

func (c Color[T]) ToFloat64() Color[float64]

ToFloat64 converts the color to a float64 color.

func (Color[T]) Tuple

func (c Color[T]) Tuple() Tuple3[T, T, T]

Tuple converts the vector into a tuple.

type ConnectedClient

type ConnectedClient struct {
	ID      [16]byte
	Name    string
	Address string
}

ConnectionClient holds the info for clients connected to a kRPC server.

func ConnectedClientFromTuple

func ConnectedClientFromTuple(t Tuple3[[]byte, string, string]) ConnectedClient

ConnectedClientFromTuple creates a connected client from a tuple.

type ConnectionRequest

type ConnectionRequest struct {
	Type             ConnectionRequest_Type `protobuf:"varint,1,opt,name=type,proto3,enum=krpc.schema.ConnectionRequest_Type" json:"type,omitempty"`
	ClientName       string                 `protobuf:"bytes,2,opt,name=client_name,json=clientName,proto3" json:"client_name,omitempty"`
	ClientIdentifier []byte                 `protobuf:"bytes,3,opt,name=client_identifier,json=clientIdentifier,proto3" json:"client_identifier,omitempty"`
	// contains filtered or unexported fields
}

func (*ConnectionRequest) Descriptor deprecated

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

Deprecated: Use ConnectionRequest.ProtoReflect.Descriptor instead.

func (*ConnectionRequest) GetClientIdentifier

func (x *ConnectionRequest) GetClientIdentifier() []byte

func (*ConnectionRequest) GetClientName

func (x *ConnectionRequest) GetClientName() string

func (*ConnectionRequest) GetType

func (*ConnectionRequest) ProtoMessage

func (*ConnectionRequest) ProtoMessage()

func (*ConnectionRequest) ProtoReflect

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

func (*ConnectionRequest) Reset

func (x *ConnectionRequest) Reset()

func (*ConnectionRequest) String

func (x *ConnectionRequest) String() string

type ConnectionRequest_Type

type ConnectionRequest_Type int32
const (
	ConnectionRequest_RPC    ConnectionRequest_Type = 0
	ConnectionRequest_STREAM ConnectionRequest_Type = 1
)

func (ConnectionRequest_Type) Descriptor

func (ConnectionRequest_Type) Enum

func (ConnectionRequest_Type) EnumDescriptor deprecated

func (ConnectionRequest_Type) EnumDescriptor() ([]byte, []int)

Deprecated: Use ConnectionRequest_Type.Descriptor instead.

func (ConnectionRequest_Type) Number

func (ConnectionRequest_Type) String

func (x ConnectionRequest_Type) String() string

func (ConnectionRequest_Type) Type

type ConnectionResponse

type ConnectionResponse struct {
	Status           ConnectionResponse_Status `protobuf:"varint,1,opt,name=status,proto3,enum=krpc.schema.ConnectionResponse_Status" json:"status,omitempty"`
	Message          string                    `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	ClientIdentifier []byte                    `protobuf:"bytes,3,opt,name=client_identifier,json=clientIdentifier,proto3" json:"client_identifier,omitempty"`
	// contains filtered or unexported fields
}

func (*ConnectionResponse) Descriptor deprecated

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

Deprecated: Use ConnectionResponse.ProtoReflect.Descriptor instead.

func (*ConnectionResponse) GetClientIdentifier

func (x *ConnectionResponse) GetClientIdentifier() []byte

func (*ConnectionResponse) GetMessage

func (x *ConnectionResponse) GetMessage() string

func (*ConnectionResponse) GetStatus

func (*ConnectionResponse) ProtoMessage

func (*ConnectionResponse) ProtoMessage()

func (*ConnectionResponse) ProtoReflect

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

func (*ConnectionResponse) Reset

func (x *ConnectionResponse) Reset()

func (*ConnectionResponse) String

func (x *ConnectionResponse) String() string

type ConnectionResponse_Status

type ConnectionResponse_Status int32
const (
	ConnectionResponse_OK                ConnectionResponse_Status = 0
	ConnectionResponse_MALFORMED_MESSAGE ConnectionResponse_Status = 1
	ConnectionResponse_TIMEOUT           ConnectionResponse_Status = 2
	ConnectionResponse_WRONG_TYPE        ConnectionResponse_Status = 3
)

func (ConnectionResponse_Status) Descriptor

func (ConnectionResponse_Status) Enum

func (ConnectionResponse_Status) EnumDescriptor deprecated

func (ConnectionResponse_Status) EnumDescriptor() ([]byte, []int)

Deprecated: Use ConnectionResponse_Status.Descriptor instead.

func (ConnectionResponse_Status) Number

func (ConnectionResponse_Status) String

func (x ConnectionResponse_Status) String() string

func (ConnectionResponse_Status) Type

type Dictionary

type Dictionary struct {
	Entries []*DictionaryEntry `protobuf:"bytes,1,rep,name=entries,proto3" json:"entries,omitempty"`
	// contains filtered or unexported fields
}

func (*Dictionary) Descriptor deprecated

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

Deprecated: Use Dictionary.ProtoReflect.Descriptor instead.

func (*Dictionary) GetEntries

func (x *Dictionary) GetEntries() []*DictionaryEntry

func (*Dictionary) ProtoMessage

func (*Dictionary) ProtoMessage()

func (*Dictionary) ProtoReflect

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

func (*Dictionary) Reset

func (x *Dictionary) Reset()

func (*Dictionary) String

func (x *Dictionary) String() string

type DictionaryEntry

type DictionaryEntry struct {
	Key   []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*DictionaryEntry) Descriptor deprecated

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

Deprecated: Use DictionaryEntry.ProtoReflect.Descriptor instead.

func (*DictionaryEntry) GetKey

func (x *DictionaryEntry) GetKey() []byte

func (*DictionaryEntry) GetValue

func (x *DictionaryEntry) GetValue() []byte

func (*DictionaryEntry) ProtoMessage

func (*DictionaryEntry) ProtoMessage()

func (*DictionaryEntry) ProtoReflect

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

func (*DictionaryEntry) Reset

func (x *DictionaryEntry) Reset()

func (*DictionaryEntry) String

func (x *DictionaryEntry) String() string

type Enumeration

type Enumeration struct {
	Name          string              `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Values        []*EnumerationValue `protobuf:"bytes,2,rep,name=values,proto3" json:"values,omitempty"`
	Documentation string              `protobuf:"bytes,3,opt,name=documentation,proto3" json:"documentation,omitempty"`
	// contains filtered or unexported fields
}

func (*Enumeration) Descriptor deprecated

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

Deprecated: Use Enumeration.ProtoReflect.Descriptor instead.

func (*Enumeration) GetDocumentation

func (x *Enumeration) GetDocumentation() string

func (*Enumeration) GetName

func (x *Enumeration) GetName() string

func (*Enumeration) GetValues

func (x *Enumeration) GetValues() []*EnumerationValue

func (*Enumeration) ProtoMessage

func (*Enumeration) ProtoMessage()

func (*Enumeration) ProtoReflect

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

func (*Enumeration) Reset

func (x *Enumeration) Reset()

func (*Enumeration) String

func (x *Enumeration) String() string

type EnumerationValue

type EnumerationValue struct {
	Name          string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Value         int32  `protobuf:"varint,2,opt,name=value,proto3" json:"value,omitempty"`
	Documentation string `protobuf:"bytes,3,opt,name=documentation,proto3" json:"documentation,omitempty"`
	// contains filtered or unexported fields
}

func (*EnumerationValue) Descriptor deprecated

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

Deprecated: Use EnumerationValue.ProtoReflect.Descriptor instead.

func (*EnumerationValue) GetDocumentation

func (x *EnumerationValue) GetDocumentation() string

func (*EnumerationValue) GetName

func (x *EnumerationValue) GetName() string

func (*EnumerationValue) GetValue

func (x *EnumerationValue) GetValue() int32

func (*EnumerationValue) ProtoMessage

func (*EnumerationValue) ProtoMessage()

func (*EnumerationValue) ProtoReflect

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

func (*EnumerationValue) Reset

func (x *EnumerationValue) Reset()

func (*EnumerationValue) String

func (x *EnumerationValue) String() string

type Error

type Error struct {
	Service     string `protobuf:"bytes,1,opt,name=service,proto3" json:"service,omitempty"`
	Name        string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
	StackTrace  string `protobuf:"bytes,4,opt,name=stack_trace,json=stackTrace,proto3" json:"stack_trace,omitempty"`
	// contains filtered or unexported fields
}

func (*Error) Descriptor deprecated

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

Deprecated: Use Error.ProtoReflect.Descriptor instead.

func (*Error) Error

func (e *Error) Error() string

Error returns a human-readable error message.

func (*Error) GetDescription

func (x *Error) GetDescription() string

func (*Error) GetName

func (x *Error) GetName() string

func (*Error) GetService

func (x *Error) GetService() string

func (*Error) GetStackTrace

func (x *Error) GetStackTrace() string

func (*Error) ProtoMessage

func (*Error) ProtoMessage()

func (*Error) ProtoReflect

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

func (*Error) Reset

func (x *Error) Reset()

func (*Error) String

func (x *Error) String() string

type Event

type Event struct {
	Stream *Stream `protobuf:"bytes,1,opt,name=stream,proto3" json:"stream,omitempty"`
	// contains filtered or unexported fields
}

func (*Event) Descriptor deprecated

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

Deprecated: Use Event.ProtoReflect.Descriptor instead.

func (*Event) GetStream

func (x *Event) GetStream() *Stream

func (*Event) ProtoMessage

func (*Event) ProtoMessage()

func (*Event) ProtoReflect

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

func (*Event) Reset

func (x *Event) Reset()

func (*Event) String

func (x *Event) String() string

type Exception

type Exception struct {
	Name          string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Documentation string `protobuf:"bytes,2,opt,name=documentation,proto3" json:"documentation,omitempty"`
	// contains filtered or unexported fields
}

func (*Exception) Descriptor deprecated

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

Deprecated: Use Exception.ProtoReflect.Descriptor instead.

func (*Exception) GetDocumentation

func (x *Exception) GetDocumentation() string

func (*Exception) GetName

func (x *Exception) GetName() string

func (*Exception) ProtoMessage

func (*Exception) ProtoMessage()

func (*Exception) ProtoReflect

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

func (*Exception) Reset

func (x *Exception) Reset()

func (*Exception) String

func (x *Exception) String() string

type List

type List struct {
	Items [][]byte `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"`
	// contains filtered or unexported fields
}

func (*List) Descriptor deprecated

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

Deprecated: Use List.ProtoReflect.Descriptor instead.

func (*List) GetItems

func (x *List) GetItems() [][]byte

func (*List) ProtoMessage

func (*List) ProtoMessage()

func (*List) ProtoReflect

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

func (*List) Reset

func (x *List) Reset()

func (*List) String

func (x *List) String() string

type MultiplexedRequest

type MultiplexedRequest struct {
	ConnectionRequest *ConnectionRequest `protobuf:"bytes,1,opt,name=connection_request,json=connectionRequest,proto3" json:"connection_request,omitempty"`
	Request           *Request           `protobuf:"bytes,2,opt,name=request,proto3" json:"request,omitempty"`
	// contains filtered or unexported fields
}

func (*MultiplexedRequest) Descriptor deprecated

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

Deprecated: Use MultiplexedRequest.ProtoReflect.Descriptor instead.

func (*MultiplexedRequest) GetConnectionRequest

func (x *MultiplexedRequest) GetConnectionRequest() *ConnectionRequest

func (*MultiplexedRequest) GetRequest

func (x *MultiplexedRequest) GetRequest() *Request

func (*MultiplexedRequest) ProtoMessage

func (*MultiplexedRequest) ProtoMessage()

func (*MultiplexedRequest) ProtoReflect

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

func (*MultiplexedRequest) Reset

func (x *MultiplexedRequest) Reset()

func (*MultiplexedRequest) String

func (x *MultiplexedRequest) String() string

type MultiplexedResponse

type MultiplexedResponse struct {
	Response     *Response     `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"`
	StreamUpdate *StreamUpdate `protobuf:"bytes,2,opt,name=stream_update,json=streamUpdate,proto3" json:"stream_update,omitempty"`
	// contains filtered or unexported fields
}

func (*MultiplexedResponse) Descriptor deprecated

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

Deprecated: Use MultiplexedResponse.ProtoReflect.Descriptor instead.

func (*MultiplexedResponse) GetResponse

func (x *MultiplexedResponse) GetResponse() *Response

func (*MultiplexedResponse) GetStreamUpdate

func (x *MultiplexedResponse) GetStreamUpdate() *StreamUpdate

func (*MultiplexedResponse) ProtoMessage

func (*MultiplexedResponse) ProtoMessage()

func (*MultiplexedResponse) ProtoReflect

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

func (*MultiplexedResponse) Reset

func (x *MultiplexedResponse) Reset()

func (*MultiplexedResponse) String

func (x *MultiplexedResponse) String() string

type Parameter

type Parameter struct {
	Name         string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Type         *Type  `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
	DefaultValue []byte `protobuf:"bytes,3,opt,name=default_value,json=defaultValue,proto3" json:"default_value,omitempty"`
	// contains filtered or unexported fields
}

func (*Parameter) Descriptor deprecated

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

Deprecated: Use Parameter.ProtoReflect.Descriptor instead.

func (*Parameter) GetDefaultValue

func (x *Parameter) GetDefaultValue() []byte

func (*Parameter) GetName

func (x *Parameter) GetName() string

func (*Parameter) GetType

func (x *Parameter) GetType() *Type

func (*Parameter) ProtoMessage

func (*Parameter) ProtoMessage()

func (*Parameter) ProtoReflect

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

func (*Parameter) Reset

func (x *Parameter) Reset()

func (*Parameter) String

func (x *Parameter) String() string

type Procedure

type Procedure struct {
	Name             string                `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Parameters       []*Parameter          `protobuf:"bytes,2,rep,name=parameters,proto3" json:"parameters,omitempty"`
	ReturnType       *Type                 `protobuf:"bytes,3,opt,name=return_type,json=returnType,proto3" json:"return_type,omitempty"`
	ReturnIsNullable bool                  `protobuf:"varint,4,opt,name=return_is_nullable,json=returnIsNullable,proto3" json:"return_is_nullable,omitempty"`
	GameScenes       []Procedure_GameScene `` /* 136-byte string literal not displayed */
	Documentation    string                `protobuf:"bytes,5,opt,name=documentation,proto3" json:"documentation,omitempty"`
	// contains filtered or unexported fields
}

func (*Procedure) Descriptor deprecated

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

Deprecated: Use Procedure.ProtoReflect.Descriptor instead.

func (*Procedure) GetDocumentation

func (x *Procedure) GetDocumentation() string

func (*Procedure) GetGameScenes

func (x *Procedure) GetGameScenes() []Procedure_GameScene

func (*Procedure) GetName

func (x *Procedure) GetName() string

func (*Procedure) GetParameters

func (x *Procedure) GetParameters() []*Parameter

func (*Procedure) GetReturnIsNullable

func (x *Procedure) GetReturnIsNullable() bool

func (*Procedure) GetReturnType

func (x *Procedure) GetReturnType() *Type

func (*Procedure) ProtoMessage

func (*Procedure) ProtoMessage()

func (*Procedure) ProtoReflect

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

func (*Procedure) Reset

func (x *Procedure) Reset()

func (*Procedure) String

func (x *Procedure) String() string

type ProcedureCall

type ProcedureCall struct {
	Service     string      `protobuf:"bytes,1,opt,name=service,proto3" json:"service,omitempty"`
	Procedure   string      `protobuf:"bytes,2,opt,name=procedure,proto3" json:"procedure,omitempty"`
	ServiceId   uint32      `protobuf:"varint,4,opt,name=service_id,json=serviceId,proto3" json:"service_id,omitempty"`
	ProcedureId uint32      `protobuf:"varint,5,opt,name=procedure_id,json=procedureId,proto3" json:"procedure_id,omitempty"`
	Arguments   []*Argument `protobuf:"bytes,3,rep,name=arguments,proto3" json:"arguments,omitempty"`
	// contains filtered or unexported fields
}

func (*ProcedureCall) Descriptor deprecated

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

Deprecated: Use ProcedureCall.ProtoReflect.Descriptor instead.

func (*ProcedureCall) GetArguments

func (x *ProcedureCall) GetArguments() []*Argument

func (*ProcedureCall) GetProcedure

func (x *ProcedureCall) GetProcedure() string

func (*ProcedureCall) GetProcedureId

func (x *ProcedureCall) GetProcedureId() uint32

func (*ProcedureCall) GetService

func (x *ProcedureCall) GetService() string

func (*ProcedureCall) GetServiceId

func (x *ProcedureCall) GetServiceId() uint32

func (*ProcedureCall) ProtoMessage

func (*ProcedureCall) ProtoMessage()

func (*ProcedureCall) ProtoReflect

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

func (*ProcedureCall) Reset

func (x *ProcedureCall) Reset()

func (*ProcedureCall) String

func (x *ProcedureCall) String() string

type ProcedureResult

type ProcedureResult struct {
	Error *Error `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"`
	Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*ProcedureResult) Descriptor deprecated

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

Deprecated: Use ProcedureResult.ProtoReflect.Descriptor instead.

func (*ProcedureResult) GetError

func (x *ProcedureResult) GetError() *Error

func (*ProcedureResult) GetValue

func (x *ProcedureResult) GetValue() []byte

func (*ProcedureResult) ProtoMessage

func (*ProcedureResult) ProtoMessage()

func (*ProcedureResult) ProtoReflect

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

func (*ProcedureResult) Reset

func (x *ProcedureResult) Reset()

func (*ProcedureResult) String

func (x *ProcedureResult) String() string

type Procedure_GameScene

type Procedure_GameScene int32
const (
	Procedure_SPACE_CENTER     Procedure_GameScene = 0
	Procedure_FLIGHT           Procedure_GameScene = 1
	Procedure_TRACKING_STATION Procedure_GameScene = 2
	Procedure_EDITOR_VAB       Procedure_GameScene = 3
	Procedure_EDITOR_SPH       Procedure_GameScene = 4
	Procedure_MISSION_BUILDER  Procedure_GameScene = 5
)

func (Procedure_GameScene) Descriptor

func (Procedure_GameScene) Enum

func (Procedure_GameScene) EnumDescriptor deprecated

func (Procedure_GameScene) EnumDescriptor() ([]byte, []int)

Deprecated: Use Procedure_GameScene.Descriptor instead.

func (Procedure_GameScene) Number

func (Procedure_GameScene) String

func (x Procedure_GameScene) String() string

func (Procedure_GameScene) Type

type Quaternion

type Quaternion struct {
	X, Y, Z, W float64
}

Quaternion is a quaternion.

func IdentityQuaternion

func IdentityQuaternion() Quaternion

IdentityQuaternion returns the identity quaternion (0i+0j+0k+1).

func QuaternionFromTuple

func QuaternionFromTuple(t Tuple4[float64, float64, float64, float64]) Quaternion

QuaternionFromTuple creates a quaternion from a tuple.

func (Quaternion) Tuple

Tuple converts the quaternion into a tuple.

type Real

type Real interface {
	float32 | float64
}

Real represents a real number.

type Request

type Request struct {
	Calls []*ProcedureCall `protobuf:"bytes,1,rep,name=calls,proto3" json:"calls,omitempty"`
	// contains filtered or unexported fields
}

func (*Request) Descriptor deprecated

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

Deprecated: Use Request.ProtoReflect.Descriptor instead.

func (*Request) GetCalls

func (x *Request) GetCalls() []*ProcedureCall

func (*Request) ProtoMessage

func (*Request) ProtoMessage()

func (*Request) ProtoReflect

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

func (*Request) Reset

func (x *Request) Reset()

func (*Request) String

func (x *Request) String() string

type Response

type Response struct {
	Error   *Error             `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"`
	Results []*ProcedureResult `protobuf:"bytes,2,rep,name=results,proto3" json:"results,omitempty"`
	// contains filtered or unexported fields
}

func (*Response) Descriptor deprecated

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

Deprecated: Use Response.ProtoReflect.Descriptor instead.

func (*Response) GetError

func (x *Response) GetError() *Error

func (*Response) GetResults

func (x *Response) GetResults() []*ProcedureResult

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) ProtoReflect

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

func (*Response) Reset

func (x *Response) Reset()

func (*Response) String

func (x *Response) String() string

type Service

type Service struct {
	Name          string         `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Procedures    []*Procedure   `protobuf:"bytes,2,rep,name=procedures,proto3" json:"procedures,omitempty"`
	Classes       []*Class       `protobuf:"bytes,3,rep,name=classes,proto3" json:"classes,omitempty"`
	Enumerations  []*Enumeration `protobuf:"bytes,4,rep,name=enumerations,proto3" json:"enumerations,omitempty"`
	Exceptions    []*Exception   `protobuf:"bytes,5,rep,name=exceptions,proto3" json:"exceptions,omitempty"`
	Documentation string         `protobuf:"bytes,6,opt,name=documentation,proto3" json:"documentation,omitempty"`
	// contains filtered or unexported fields
}

func (*Service) Descriptor deprecated

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

Deprecated: Use Service.ProtoReflect.Descriptor instead.

func (*Service) GetClasses

func (x *Service) GetClasses() []*Class

func (*Service) GetDocumentation

func (x *Service) GetDocumentation() string

func (*Service) GetEnumerations

func (x *Service) GetEnumerations() []*Enumeration

func (*Service) GetExceptions

func (x *Service) GetExceptions() []*Exception

func (*Service) GetName

func (x *Service) GetName() string

func (*Service) GetProcedures

func (x *Service) GetProcedures() []*Procedure

func (*Service) ProtoMessage

func (*Service) ProtoMessage()

func (*Service) ProtoReflect

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

func (*Service) Reset

func (x *Service) Reset()

func (*Service) String

func (x *Service) String() string

type Services

type Services struct {
	Services []*Service `protobuf:"bytes,1,rep,name=services,proto3" json:"services,omitempty"`
	// contains filtered or unexported fields
}

func (*Services) Descriptor deprecated

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

Deprecated: Use Services.ProtoReflect.Descriptor instead.

func (*Services) GetServices

func (x *Services) GetServices() []*Service

func (*Services) ProtoMessage

func (*Services) ProtoMessage()

func (*Services) ProtoReflect

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

func (*Services) Reset

func (x *Services) Reset()

func (*Services) String

func (x *Services) String() string

type Set

type Set struct {
	Items [][]byte `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"`
	// contains filtered or unexported fields
}

func (*Set) Descriptor deprecated

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

Deprecated: Use Set.ProtoReflect.Descriptor instead.

func (*Set) GetItems

func (x *Set) GetItems() [][]byte

func (*Set) ProtoMessage

func (*Set) ProtoMessage()

func (*Set) ProtoReflect

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

func (*Set) Reset

func (x *Set) Reset()

func (*Set) String

func (x *Set) String() string

type Status

type Status struct {
	Version              string  `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"`
	BytesRead            uint64  `protobuf:"varint,2,opt,name=bytes_read,json=bytesRead,proto3" json:"bytes_read,omitempty"`
	BytesWritten         uint64  `protobuf:"varint,3,opt,name=bytes_written,json=bytesWritten,proto3" json:"bytes_written,omitempty"`
	BytesReadRate        float32 `protobuf:"fixed32,4,opt,name=bytes_read_rate,json=bytesReadRate,proto3" json:"bytes_read_rate,omitempty"`
	BytesWrittenRate     float32 `protobuf:"fixed32,5,opt,name=bytes_written_rate,json=bytesWrittenRate,proto3" json:"bytes_written_rate,omitempty"`
	RpcsExecuted         uint64  `protobuf:"varint,6,opt,name=rpcs_executed,json=rpcsExecuted,proto3" json:"rpcs_executed,omitempty"`
	RpcRate              float32 `protobuf:"fixed32,7,opt,name=rpc_rate,json=rpcRate,proto3" json:"rpc_rate,omitempty"`
	OneRpcPerUpdate      bool    `protobuf:"varint,8,opt,name=one_rpc_per_update,json=oneRpcPerUpdate,proto3" json:"one_rpc_per_update,omitempty"`
	MaxTimePerUpdate     uint32  `protobuf:"varint,9,opt,name=max_time_per_update,json=maxTimePerUpdate,proto3" json:"max_time_per_update,omitempty"`
	AdaptiveRateControl  bool    `protobuf:"varint,10,opt,name=adaptive_rate_control,json=adaptiveRateControl,proto3" json:"adaptive_rate_control,omitempty"`
	BlockingRecv         bool    `protobuf:"varint,11,opt,name=blocking_recv,json=blockingRecv,proto3" json:"blocking_recv,omitempty"`
	RecvTimeout          uint32  `protobuf:"varint,12,opt,name=recv_timeout,json=recvTimeout,proto3" json:"recv_timeout,omitempty"`
	TimePerRpcUpdate     float32 `protobuf:"fixed32,13,opt,name=time_per_rpc_update,json=timePerRpcUpdate,proto3" json:"time_per_rpc_update,omitempty"`
	PollTimePerRpcUpdate float32 `` /* 130-byte string literal not displayed */
	ExecTimePerRpcUpdate float32 `` /* 130-byte string literal not displayed */
	StreamRpcs           uint32  `protobuf:"varint,16,opt,name=stream_rpcs,json=streamRpcs,proto3" json:"stream_rpcs,omitempty"`
	StreamRpcsExecuted   uint64  `protobuf:"varint,17,opt,name=stream_rpcs_executed,json=streamRpcsExecuted,proto3" json:"stream_rpcs_executed,omitempty"`
	StreamRpcRate        float32 `protobuf:"fixed32,18,opt,name=stream_rpc_rate,json=streamRpcRate,proto3" json:"stream_rpc_rate,omitempty"`
	TimePerStreamUpdate  float32 `protobuf:"fixed32,19,opt,name=time_per_stream_update,json=timePerStreamUpdate,proto3" json:"time_per_stream_update,omitempty"`
	// contains filtered or unexported fields
}

func (*Status) Descriptor deprecated

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

Deprecated: Use Status.ProtoReflect.Descriptor instead.

func (*Status) GetAdaptiveRateControl

func (x *Status) GetAdaptiveRateControl() bool

func (*Status) GetBlockingRecv

func (x *Status) GetBlockingRecv() bool

func (*Status) GetBytesRead

func (x *Status) GetBytesRead() uint64

func (*Status) GetBytesReadRate

func (x *Status) GetBytesReadRate() float32

func (*Status) GetBytesWritten

func (x *Status) GetBytesWritten() uint64

func (*Status) GetBytesWrittenRate

func (x *Status) GetBytesWrittenRate() float32

func (*Status) GetExecTimePerRpcUpdate

func (x *Status) GetExecTimePerRpcUpdate() float32

func (*Status) GetMaxTimePerUpdate

func (x *Status) GetMaxTimePerUpdate() uint32

func (*Status) GetOneRpcPerUpdate

func (x *Status) GetOneRpcPerUpdate() bool

func (*Status) GetPollTimePerRpcUpdate

func (x *Status) GetPollTimePerRpcUpdate() float32

func (*Status) GetRecvTimeout

func (x *Status) GetRecvTimeout() uint32

func (*Status) GetRpcRate

func (x *Status) GetRpcRate() float32

func (*Status) GetRpcsExecuted

func (x *Status) GetRpcsExecuted() uint64

func (*Status) GetStreamRpcRate

func (x *Status) GetStreamRpcRate() float32

func (*Status) GetStreamRpcs

func (x *Status) GetStreamRpcs() uint32

func (*Status) GetStreamRpcsExecuted

func (x *Status) GetStreamRpcsExecuted() uint64

func (*Status) GetTimePerRpcUpdate

func (x *Status) GetTimePerRpcUpdate() float32

func (*Status) GetTimePerStreamUpdate

func (x *Status) GetTimePerStreamUpdate() float32

func (*Status) GetVersion

func (x *Status) GetVersion() string

func (*Status) ProtoMessage

func (*Status) ProtoMessage()

func (*Status) ProtoReflect

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

func (*Status) Reset

func (x *Status) Reset()

func (*Status) String

func (x *Status) String() string

type Stream

type Stream struct {
	Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*Stream) Descriptor deprecated

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

Deprecated: Use Stream.ProtoReflect.Descriptor instead.

func (*Stream) GetId

func (x *Stream) GetId() uint64

func (*Stream) ProtoMessage

func (*Stream) ProtoMessage()

func (*Stream) ProtoReflect

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

func (*Stream) Reset

func (x *Stream) Reset()

func (*Stream) String

func (x *Stream) String() string

type StreamResult

type StreamResult struct {
	Id     uint64           `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Result *ProcedureResult `protobuf:"bytes,2,opt,name=result,proto3" json:"result,omitempty"`
	// contains filtered or unexported fields
}

func (*StreamResult) Descriptor deprecated

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

Deprecated: Use StreamResult.ProtoReflect.Descriptor instead.

func (*StreamResult) GetId

func (x *StreamResult) GetId() uint64

func (*StreamResult) GetResult

func (x *StreamResult) GetResult() *ProcedureResult

func (*StreamResult) ProtoMessage

func (*StreamResult) ProtoMessage()

func (*StreamResult) ProtoReflect

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

func (*StreamResult) Reset

func (x *StreamResult) Reset()

func (*StreamResult) String

func (x *StreamResult) String() string

type StreamUpdate

type StreamUpdate struct {
	Results []*StreamResult `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"`
	// contains filtered or unexported fields
}

func (*StreamUpdate) Descriptor deprecated

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

Deprecated: Use StreamUpdate.ProtoReflect.Descriptor instead.

func (*StreamUpdate) GetResults

func (x *StreamUpdate) GetResults() []*StreamResult

func (*StreamUpdate) ProtoMessage

func (*StreamUpdate) ProtoMessage()

func (*StreamUpdate) ProtoReflect

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

func (*StreamUpdate) Reset

func (x *StreamUpdate) Reset()

func (*StreamUpdate) String

func (x *StreamUpdate) String() string

type Tuple

type Tuple struct {
	Items [][]byte `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"`
	// contains filtered or unexported fields
}

func (*Tuple) Descriptor deprecated

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

Deprecated: Use Tuple.ProtoReflect.Descriptor instead.

func (*Tuple) GetItems

func (x *Tuple) GetItems() [][]byte

func (*Tuple) ProtoMessage

func (*Tuple) ProtoMessage()

func (*Tuple) ProtoReflect

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

func (*Tuple) Reset

func (x *Tuple) Reset()

func (*Tuple) String

func (x *Tuple) String() string

type Tuple2

type Tuple2[T, U any] struct {
	A T
	B U
}

Tuple2 is a generic tuple with 2 elements.

func NewTuple2

func NewTuple2[T, U any](a T, b U) Tuple2[T, U]

NewTuple2 creates a new Tuple2.

type Tuple3

type Tuple3[T, U, V any] struct {
	A T
	B U
	C V
}

Tuple3 is a generic tuple with 3 elements.

func NewTuple3

func NewTuple3[T, U, V any](a T, b U, c V) Tuple3[T, U, V]

NewTuple3 creates a new Tuple3.

type Tuple4

type Tuple4[T, U, V, W any] struct {
	A T
	B U
	C V
	D W
}

Tuple4 is a generic tuple with 4 elements.

func NewTuple4

func NewTuple4[T, U, V, W any](a T, b U, c V, d W) Tuple4[T, U, V, W]

NewTuple4 creates a new Tuple4.

type Type

type Type struct {
	Code    Type_TypeCode `protobuf:"varint,1,opt,name=code,proto3,enum=krpc.schema.Type_TypeCode" json:"code,omitempty"`
	Service string        `protobuf:"bytes,2,opt,name=service,proto3" json:"service,omitempty"`
	Name    string        `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
	Types   []*Type       `protobuf:"bytes,4,rep,name=types,proto3" json:"types,omitempty"`
	// contains filtered or unexported fields
}

func (*Type) Descriptor deprecated

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

Deprecated: Use Type.ProtoReflect.Descriptor instead.

func (*Type) GetCode

func (x *Type) GetCode() Type_TypeCode

func (*Type) GetName

func (x *Type) GetName() string

func (*Type) GetService

func (x *Type) GetService() string

func (*Type) GetTypes

func (x *Type) GetTypes() []*Type

func (*Type) ProtoMessage

func (*Type) ProtoMessage()

func (*Type) ProtoReflect

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

func (*Type) Reset

func (x *Type) Reset()

func (*Type) String

func (x *Type) String() string

type Type_TypeCode

type Type_TypeCode int32
const (
	Type_NONE Type_TypeCode = 0
	// Values
	Type_DOUBLE Type_TypeCode = 1
	Type_FLOAT  Type_TypeCode = 2
	Type_SINT32 Type_TypeCode = 3
	Type_SINT64 Type_TypeCode = 4
	Type_UINT32 Type_TypeCode = 5
	Type_UINT64 Type_TypeCode = 6
	Type_BOOL   Type_TypeCode = 7
	Type_STRING Type_TypeCode = 8
	Type_BYTES  Type_TypeCode = 9
	// Objects
	Type_CLASS       Type_TypeCode = 100
	Type_ENUMERATION Type_TypeCode = 101
	// Messages
	Type_EVENT          Type_TypeCode = 200
	Type_PROCEDURE_CALL Type_TypeCode = 201
	Type_STREAM         Type_TypeCode = 202
	Type_STATUS         Type_TypeCode = 203
	Type_SERVICES       Type_TypeCode = 204
	// Collections
	Type_TUPLE      Type_TypeCode = 300
	Type_LIST       Type_TypeCode = 301
	Type_SET        Type_TypeCode = 302
	Type_DICTIONARY Type_TypeCode = 303
)

func (Type_TypeCode) Descriptor

func (Type_TypeCode) Enum

func (x Type_TypeCode) Enum() *Type_TypeCode

func (Type_TypeCode) EnumDescriptor deprecated

func (Type_TypeCode) EnumDescriptor() ([]byte, []int)

Deprecated: Use Type_TypeCode.Descriptor instead.

func (Type_TypeCode) Number

func (Type_TypeCode) String

func (x Type_TypeCode) String() string

func (Type_TypeCode) Type

type Vector2D

type Vector2D struct {
	X, Y float64
}

Vector2D is a 2D vector.

func NewVector2D

func NewVector2D(x, y float64) Vector2D

NewVector2D creates a 2D vector from components.

func Vector2DFromTuple

func Vector2DFromTuple(t Tuple2[float64, float64]) Vector2D

Vector2DFromTuple creates a vector from a tuple.

func (Vector2D) Add

func (v Vector2D) Add(v2 Vector2D) Vector2D

Add adds two vectors.

func (Vector2D) AngleBetween

func (v Vector2D) AngleBetween(v2 Vector2D) float64

AngleBetween is the angle between two vectors, in radians.

func (Vector2D) Dot

func (v Vector2D) Dot(v2 Vector2D) float64

Dot computes the dot product between 2 vectors.

func (Vector2D) Length

func (v Vector2D) Length() float64

Length is the length (L2 norm) of the vector.

func (Vector2D) Scale

func (v Vector2D) Scale(k float64) Vector2D

Scale scales the vector by a constant value.

func (Vector2D) Tuple

func (v Vector2D) Tuple() Tuple2[float64, float64]

Tuple converts the vector into a tuple.

type Vector3D

type Vector3D struct {
	X, Y, Z float64
}

Vector3D is a 3D vector.

func NewVector3D

func NewVector3D(x, y, z float64) Vector3D

NewVector3D creates a vector from components.

func Vector3DFromTuple

func Vector3DFromTuple(t Tuple3[float64, float64, float64]) Vector3D

Vector3DFromTuple creates a vector from a tuple.

func (Vector3D) Add

func (v Vector3D) Add(v2 Vector3D) Vector3D

Add adds two vectors.

func (Vector3D) AngleBetween

func (v Vector3D) AngleBetween(v2 Vector3D) float64

AngleBetween is the angle between two vectors, in radians.

func (Vector3D) Cross

func (v Vector3D) Cross(v2 Vector3D) Vector3D

Cross is the cross product between two vectors.

func (Vector3D) Dot

func (v Vector3D) Dot(v2 Vector3D) float64

Dot computes the dot product between 2 vectors.

func (Vector3D) Length

func (v Vector3D) Length() float64

Length is the length (L2 norm) of the vector.

func (Vector3D) Scale

func (v Vector3D) Scale(k float64) Vector3D

Scale scales the vector by a constant value.

func (Vector3D) Tuple

func (v Vector3D) Tuple() Tuple3[float64, float64, float64]

Tuple converts the vector into a tuple.

Jump to

Keyboard shortcuts

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