sb_switch

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2025 License: MIT Imports: 11 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_switch_proto protoreflect.FileDescriptor

Functions

func NewSbSwitchEndpoints added in v0.2.0

func NewSbSwitchEndpoints() []*api.Endpoint

func RegisterSbSwitchHandler

func RegisterSbSwitchHandler(s server.Server, hdlr SbSwitchHandler, opts ...server.HandlerOption) error

Types

type Device

type Device struct {
	Name      string  `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Index     int32   `protobuf:"varint,2,opt,name=index,proto3" json:"index,omitempty"`
	Ports     []*Port `protobuf:"bytes,3,rep,name=ports,proto3" json:"ports,omitempty"`
	Exclusive bool    `protobuf:"varint,4,opt,name=exclusive,proto3" json:"exclusive,omitempty"`
	// contains filtered or unexported fields
}

func (*Device) Descriptor deprecated

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

Deprecated: Use Device.ProtoReflect.Descriptor instead.

func (*Device) GetExclusive

func (x *Device) GetExclusive() bool

func (*Device) GetIndex

func (x *Device) GetIndex() int32

func (*Device) GetName

func (x *Device) GetName() string

func (*Device) GetPorts

func (x *Device) GetPorts() []*Port

func (*Device) ProtoMessage

func (*Device) ProtoMessage()

func (*Device) ProtoReflect added in v0.2.0

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

func (*Device) Reset

func (x *Device) Reset()

func (*Device) String

func (x *Device) String() string

type None

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

func (*None) Descriptor deprecated

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

Deprecated: Use None.ProtoReflect.Descriptor instead.

func (*None) GetTest added in v0.2.0

func (x *None) GetTest() string

func (*None) ProtoMessage

func (*None) ProtoMessage()

func (*None) ProtoReflect added in v0.2.0

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

func (*None) Reset

func (x *None) Reset()

func (*None) String

func (x *None) String() string

type Port

type Port struct {
	Name      string      `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Index     int32       `protobuf:"varint,2,opt,name=index,proto3" json:"index,omitempty"`
	Terminals []*Terminal `protobuf:"bytes,3,rep,name=terminals,proto3" json:"terminals,omitempty"`
	Exclusive bool        `protobuf:"varint,4,opt,name=exclusive,proto3" json:"exclusive,omitempty"`
	// contains filtered or unexported fields
}

func (*Port) Descriptor deprecated

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

Deprecated: Use Port.ProtoReflect.Descriptor instead.

func (*Port) GetExclusive

func (x *Port) GetExclusive() bool

func (*Port) GetIndex

func (x *Port) GetIndex() int32

func (*Port) GetName

func (x *Port) GetName() string

func (*Port) GetTerminals

func (x *Port) GetTerminals() []*Terminal

func (*Port) ProtoMessage

func (*Port) ProtoMessage()

func (*Port) ProtoReflect added in v0.2.0

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

func (*Port) Reset

func (x *Port) Reset()

func (*Port) String

func (x *Port) String() string

type PortName

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

func (*PortName) Descriptor deprecated

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

Deprecated: Use PortName.ProtoReflect.Descriptor instead.

func (*PortName) GetName

func (x *PortName) GetName() string

func (*PortName) ProtoMessage

func (*PortName) ProtoMessage()

func (*PortName) ProtoReflect added in v0.2.0

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

func (*PortName) Reset

func (x *PortName) Reset()

func (*PortName) String

func (x *PortName) String() string

type PortRequest

type PortRequest struct {
	Name      string      `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Terminals []*Terminal `protobuf:"bytes,2,rep,name=terminals,proto3" json:"terminals,omitempty"`
	// contains filtered or unexported fields
}

func (*PortRequest) Descriptor deprecated

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

Deprecated: Use PortRequest.ProtoReflect.Descriptor instead.

func (*PortRequest) GetName

func (x *PortRequest) GetName() string

func (*PortRequest) GetTerminals

func (x *PortRequest) GetTerminals() []*Terminal

func (*PortRequest) ProtoMessage

func (*PortRequest) ProtoMessage()

func (*PortRequest) ProtoReflect added in v0.2.0

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

func (*PortRequest) Reset

func (x *PortRequest) Reset()

func (*PortRequest) String

func (x *PortRequest) String() string

type SbSwitchHandler

type SbSwitchHandler interface {
	GetPort(context.Context, *PortName, *Port) error
	SetPort(context.Context, *PortRequest, *None) error
	GetDevice(context.Context, *None, *Device) error
}

type SbSwitchService

type SbSwitchService interface {
	GetPort(ctx context.Context, in *PortName, opts ...client.CallOption) (*Port, error)
	SetPort(ctx context.Context, in *PortRequest, opts ...client.CallOption) (*None, error)
	GetDevice(ctx context.Context, in *None, opts ...client.CallOption) (*Device, error)
}

func NewSbSwitchService

func NewSbSwitchService(name string, c client.Client) SbSwitchService

type Terminal

type Terminal struct {
	Name  string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Index int32  `protobuf:"varint,2,opt,name=index,proto3" json:"index,omitempty"`
	State bool   `protobuf:"varint,3,opt,name=state,proto3" json:"state,omitempty"`
	// contains filtered or unexported fields
}

func (*Terminal) Descriptor deprecated

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

Deprecated: Use Terminal.ProtoReflect.Descriptor instead.

func (*Terminal) GetIndex

func (x *Terminal) GetIndex() int32

func (*Terminal) GetName

func (x *Terminal) GetName() string

func (*Terminal) GetState

func (x *Terminal) GetState() bool

func (*Terminal) ProtoMessage

func (*Terminal) ProtoMessage()

func (*Terminal) ProtoReflect added in v0.2.0

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

func (*Terminal) Reset

func (x *Terminal) Reset()

func (*Terminal) String

func (x *Terminal) String() string

Jump to

Keyboard shortcuts

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