configset_proto

package
v0.11.2 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2022 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLength        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflow          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroup = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	// ErrControllerConfigIdEmpty is returned if the controller config id was empty.
	ErrControllerConfigIdEmpty = errors.New("controller config id empty")
)
View Source
var File_github_com_aperturerobotics_controllerbus_controller_configset_proto_configset_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type ConfigSet

type ConfigSet struct {

	// Configurations contains the controller configurations.
	Configurations map[string]*ControllerConfig `` /* 169-byte string literal not displayed */
	// contains filtered or unexported fields
}

ConfigSet contains a configuration set.

func NewConfigSet

func NewConfigSet(c configset.ConfigSet) (*ConfigSet, error)

NewConfigSet constructs a configset from a configset.ConfigSet.

func (*ConfigSet) Descriptor deprecated

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

Deprecated: Use ConfigSet.ProtoReflect.Descriptor instead.

func (*ConfigSet) EqualVT added in v0.10.0

func (this *ConfigSet) EqualVT(that *ConfigSet) bool

func (*ConfigSet) GetConfigurations

func (x *ConfigSet) GetConfigurations() map[string]*ControllerConfig

func (*ConfigSet) MarshalToSizedBufferVT added in v0.10.0

func (m *ConfigSet) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*ConfigSet) MarshalToVT added in v0.10.0

func (m *ConfigSet) MarshalToVT(dAtA []byte) (int, error)

func (*ConfigSet) MarshalVT added in v0.10.0

func (m *ConfigSet) MarshalVT() (dAtA []byte, err error)

func (*ConfigSet) ProtoMessage

func (*ConfigSet) ProtoMessage()

func (*ConfigSet) ProtoReflect added in v0.10.1

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

func (*ConfigSet) Reset

func (x *ConfigSet) Reset()

func (*ConfigSet) Resolve

func (c *ConfigSet) Resolve(ctx context.Context, b bus.Bus) (configset.ConfigSet, error)

Resolve resolves the configset into a configset.ConfigSet

func (*ConfigSet) SizeVT added in v0.10.0

func (m *ConfigSet) SizeVT() (n int)

func (*ConfigSet) String

func (x *ConfigSet) String() string

func (*ConfigSet) UnmarshalVT added in v0.10.0

func (m *ConfigSet) UnmarshalVT(dAtA []byte) error

type ConfigSetMap

type ConfigSetMap map[string]*ControllerConfig

ConfigSetMap implements the controllerbus.ConfigSet as protobuf. Cast the proto type to this type.

func NewConfigSetMap

func NewConfigSetMap(c configset.ConfigSet) (ConfigSetMap, error)

NewConfigSetMap packs a configset to a proto object.

func (ConfigSetMap) Resolve

func (c ConfigSetMap) Resolve(ctx context.Context, b bus.Bus) (configset.ConfigSet, error)

Resolve resolves the configset into a configset.ConfigSet

type ControllerConfig

type ControllerConfig struct {

	// Id is the config ID.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// Revision is the revision number of the configuration.
	Revision uint64 `protobuf:"varint,2,opt,name=revision,proto3" json:"revision,omitempty"`
	// Config is the configuration object in protobuf form.
	Config []byte `protobuf:"bytes,3,opt,name=config,proto3" json:"config,omitempty"`
	// contains filtered or unexported fields
}

ControllerConfig contains a controller configuration.

func NewControllerConfig

func NewControllerConfig(c configset.ControllerConfig) (*ControllerConfig, error)

NewControllerConfig constructs a new controller config.

func (*ControllerConfig) Descriptor deprecated

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

Deprecated: Use ControllerConfig.ProtoReflect.Descriptor instead.

func (*ControllerConfig) EqualVT added in v0.10.0

func (this *ControllerConfig) EqualVT(that *ControllerConfig) bool

func (*ControllerConfig) GetConfig

func (x *ControllerConfig) GetConfig() []byte

func (*ControllerConfig) GetId

func (x *ControllerConfig) GetId() string

func (*ControllerConfig) GetRevision

func (x *ControllerConfig) GetRevision() uint64

func (*ControllerConfig) MarshalToSizedBufferVT added in v0.10.0

func (m *ControllerConfig) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*ControllerConfig) MarshalToVT added in v0.10.0

func (m *ControllerConfig) MarshalToVT(dAtA []byte) (int, error)

func (*ControllerConfig) MarshalVT added in v0.10.0

func (m *ControllerConfig) MarshalVT() (dAtA []byte, err error)

func (*ControllerConfig) ProtoMessage

func (*ControllerConfig) ProtoMessage()

func (*ControllerConfig) ProtoReflect added in v0.10.1

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

func (*ControllerConfig) Reset

func (x *ControllerConfig) Reset()

func (*ControllerConfig) Resolve

Resolve resolves the config into a configset.ControllerConfig

func (*ControllerConfig) SizeVT added in v0.10.0

func (m *ControllerConfig) SizeVT() (n int)

func (*ControllerConfig) String

func (x *ControllerConfig) String() string

func (*ControllerConfig) UnmarshalVT added in v0.10.0

func (m *ControllerConfig) UnmarshalVT(dAtA []byte) error

func (*ControllerConfig) Validate

func (c *ControllerConfig) Validate() error

Validate performs cursory validation of the controller config.

Jump to

Keyboard shortcuts

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