bmc

package
v0.0.0-...-f967be0 Latest Latest
Warning

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

Go to latest
Published: May 16, 2023 License: BSD-3-Clause Imports: 5 Imported by: 0

README

gRPC definitions for u-bmc

When updating the .proto file, make sure to update and commit the updated Go implementation. The reason for this is to make it trivial to include the protocol definitions without having to do a pre-build step in Go.

  1. Make sure you have protoc installed. On Debian this can be installed via apt-get install protobuf-compiler.

  2. Install protoc-gen-go by running go get -u github.com/golang/protobuf/protoc-gen-go.

  3. Run task proto:protogen to update the .pb.go file(s).

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Button_name = map[int32]string{
	0: "BUTTON_UNSPEC",
	1: "BUTTON_POWER",
	2: "BUTTON_RESET",
}
View Source
var Button_value = map[string]int32{
	"BUTTON_UNSPEC": 0,
	"BUTTON_POWER":  1,
	"BUTTON_RESET":  2,
}

Functions

func RegisterManagementServiceServer

func RegisterManagementServiceServer(s *grpc.Server, srv ManagementServiceServer)

Types

type Button

type Button int32
const (
	Button_BUTTON_UNSPEC Button = 0
	Button_BUTTON_POWER  Button = 1
	Button_BUTTON_RESET  Button = 2
)

func (Button) EnumDescriptor

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

func (Button) String

func (x Button) String() string

type ButtonPressRequest

type ButtonPressRequest struct {
	// Required: which button to press
	Button Button `protobuf:"varint,1,opt,name=button,proto3,enum=bmc.Button" json:"button,omitempty"`
	// Required: duration in milliseconds for how long to press the button
	DurationMs           uint32   `protobuf:"varint,2,opt,name=duration_ms,json=durationMs,proto3" json:"duration_ms,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ButtonPressRequest) Descriptor

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

func (*ButtonPressRequest) GetButton

func (m *ButtonPressRequest) GetButton() Button

func (*ButtonPressRequest) GetDurationMs

func (m *ButtonPressRequest) GetDurationMs() uint32

func (*ButtonPressRequest) ProtoMessage

func (*ButtonPressRequest) ProtoMessage()

func (*ButtonPressRequest) Reset

func (m *ButtonPressRequest) Reset()

func (*ButtonPressRequest) String

func (m *ButtonPressRequest) String() string

func (*ButtonPressRequest) XXX_DiscardUnknown

func (m *ButtonPressRequest) XXX_DiscardUnknown()

func (*ButtonPressRequest) XXX_Marshal

func (m *ButtonPressRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ButtonPressRequest) XXX_Merge

func (m *ButtonPressRequest) XXX_Merge(src proto.Message)

func (*ButtonPressRequest) XXX_Size

func (m *ButtonPressRequest) XXX_Size() int

func (*ButtonPressRequest) XXX_Unmarshal

func (m *ButtonPressRequest) XXX_Unmarshal(b []byte) error

type ButtonPressResponse

type ButtonPressResponse struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ButtonPressResponse) Descriptor

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

func (*ButtonPressResponse) ProtoMessage

func (*ButtonPressResponse) ProtoMessage()

func (*ButtonPressResponse) Reset

func (m *ButtonPressResponse) Reset()

func (*ButtonPressResponse) String

func (m *ButtonPressResponse) String() string

func (*ButtonPressResponse) XXX_DiscardUnknown

func (m *ButtonPressResponse) XXX_DiscardUnknown()

func (*ButtonPressResponse) XXX_Marshal

func (m *ButtonPressResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ButtonPressResponse) XXX_Merge

func (m *ButtonPressResponse) XXX_Merge(src proto.Message)

func (*ButtonPressResponse) XXX_Size

func (m *ButtonPressResponse) XXX_Size() int

func (*ButtonPressResponse) XXX_Unmarshal

func (m *ButtonPressResponse) XXX_Unmarshal(b []byte) error

type ConsoleData

type ConsoleData struct {
	Data                 []byte   `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ConsoleData) Descriptor

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

func (*ConsoleData) GetData

func (m *ConsoleData) GetData() []byte

func (*ConsoleData) ProtoMessage

func (*ConsoleData) ProtoMessage()

func (*ConsoleData) Reset

func (m *ConsoleData) Reset()

func (*ConsoleData) String

func (m *ConsoleData) String() string

func (*ConsoleData) XXX_DiscardUnknown

func (m *ConsoleData) XXX_DiscardUnknown()

func (*ConsoleData) XXX_Marshal

func (m *ConsoleData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ConsoleData) XXX_Merge

func (m *ConsoleData) XXX_Merge(src proto.Message)

func (*ConsoleData) XXX_Size

func (m *ConsoleData) XXX_Size() int

func (*ConsoleData) XXX_Unmarshal

func (m *ConsoleData) XXX_Unmarshal(b []byte) error

type Fan

type Fan struct {
	Fan                  uint32   `protobuf:"varint,1,opt,name=fan,proto3" json:"fan,omitempty"`
	Percentage           uint32   `protobuf:"varint,2,opt,name=percentage,proto3" json:"percentage,omitempty"`
	Rpm                  uint32   `protobuf:"varint,3,opt,name=rpm,proto3" json:"rpm,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Fan) Descriptor

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

func (*Fan) GetFan

func (m *Fan) GetFan() uint32

func (*Fan) GetPercentage

func (m *Fan) GetPercentage() uint32

func (*Fan) GetRpm

func (m *Fan) GetRpm() uint32

func (*Fan) ProtoMessage

func (*Fan) ProtoMessage()

func (*Fan) Reset

func (m *Fan) Reset()

func (*Fan) String

func (m *Fan) String() string

func (*Fan) XXX_DiscardUnknown

func (m *Fan) XXX_DiscardUnknown()

func (*Fan) XXX_Marshal

func (m *Fan) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Fan) XXX_Merge

func (m *Fan) XXX_Merge(src proto.Message)

func (*Fan) XXX_Size

func (m *Fan) XXX_Size() int

func (*Fan) XXX_Unmarshal

func (m *Fan) XXX_Unmarshal(b []byte) error

type GetFansRequest

type GetFansRequest struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*GetFansRequest) Descriptor

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

func (*GetFansRequest) ProtoMessage

func (*GetFansRequest) ProtoMessage()

func (*GetFansRequest) Reset

func (m *GetFansRequest) Reset()

func (*GetFansRequest) String

func (m *GetFansRequest) String() string

func (*GetFansRequest) XXX_DiscardUnknown

func (m *GetFansRequest) XXX_DiscardUnknown()

func (*GetFansRequest) XXX_Marshal

func (m *GetFansRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GetFansRequest) XXX_Merge

func (m *GetFansRequest) XXX_Merge(src proto.Message)

func (*GetFansRequest) XXX_Size

func (m *GetFansRequest) XXX_Size() int

func (*GetFansRequest) XXX_Unmarshal

func (m *GetFansRequest) XXX_Unmarshal(b []byte) error

type GetFansResponse

type GetFansResponse struct {
	Fan                  []*Fan   `protobuf:"bytes,1,rep,name=fan,proto3" json:"fan,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*GetFansResponse) Descriptor

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

func (*GetFansResponse) GetFan

func (m *GetFansResponse) GetFan() []*Fan

func (*GetFansResponse) ProtoMessage

func (*GetFansResponse) ProtoMessage()

func (*GetFansResponse) Reset

func (m *GetFansResponse) Reset()

func (*GetFansResponse) String

func (m *GetFansResponse) String() string

func (*GetFansResponse) XXX_DiscardUnknown

func (m *GetFansResponse) XXX_DiscardUnknown()

func (*GetFansResponse) XXX_Marshal

func (m *GetFansResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GetFansResponse) XXX_Merge

func (m *GetFansResponse) XXX_Merge(src proto.Message)

func (*GetFansResponse) XXX_Size

func (m *GetFansResponse) XXX_Size() int

func (*GetFansResponse) XXX_Unmarshal

func (m *GetFansResponse) XXX_Unmarshal(b []byte) error

type GetVersionRequest

type GetVersionRequest struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*GetVersionRequest) Descriptor

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

func (*GetVersionRequest) ProtoMessage

func (*GetVersionRequest) ProtoMessage()

func (*GetVersionRequest) Reset

func (m *GetVersionRequest) Reset()

func (*GetVersionRequest) String

func (m *GetVersionRequest) String() string

func (*GetVersionRequest) XXX_DiscardUnknown

func (m *GetVersionRequest) XXX_DiscardUnknown()

func (*GetVersionRequest) XXX_Marshal

func (m *GetVersionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GetVersionRequest) XXX_Merge

func (m *GetVersionRequest) XXX_Merge(src proto.Message)

func (*GetVersionRequest) XXX_Size

func (m *GetVersionRequest) XXX_Size() int

func (*GetVersionRequest) XXX_Unmarshal

func (m *GetVersionRequest) XXX_Unmarshal(b []byte) error

type GetVersionResponse

type GetVersionResponse struct {
	Version              string   `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"`
	GitHash              string   `protobuf:"bytes,2,opt,name=git_hash,json=gitHash,proto3" json:"git_hash,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*GetVersionResponse) Descriptor

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

func (*GetVersionResponse) GetGitHash

func (m *GetVersionResponse) GetGitHash() string

func (*GetVersionResponse) GetVersion

func (m *GetVersionResponse) GetVersion() string

func (*GetVersionResponse) ProtoMessage

func (*GetVersionResponse) ProtoMessage()

func (*GetVersionResponse) Reset

func (m *GetVersionResponse) Reset()

func (*GetVersionResponse) String

func (m *GetVersionResponse) String() string

func (*GetVersionResponse) XXX_DiscardUnknown

func (m *GetVersionResponse) XXX_DiscardUnknown()

func (*GetVersionResponse) XXX_Marshal

func (m *GetVersionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GetVersionResponse) XXX_Merge

func (m *GetVersionResponse) XXX_Merge(src proto.Message)

func (*GetVersionResponse) XXX_Size

func (m *GetVersionResponse) XXX_Size() int

func (*GetVersionResponse) XXX_Unmarshal

func (m *GetVersionResponse) XXX_Unmarshal(b []byte) error

type ManagementServiceClient

type ManagementServiceClient interface {
	PressButton(ctx context.Context, in *ButtonPressRequest, opts ...grpc.CallOption) (*ButtonPressResponse, error)
	GetFans(ctx context.Context, in *GetFansRequest, opts ...grpc.CallOption) (*GetFansResponse, error)
	StreamConsole(ctx context.Context, opts ...grpc.CallOption) (ManagementService_StreamConsoleClient, error)
	GetVersion(ctx context.Context, in *GetVersionRequest, opts ...grpc.CallOption) (*GetVersionResponse, error)
}

ManagementServiceClient is the client API for ManagementService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewManagementServiceClient

func NewManagementServiceClient(cc *grpc.ClientConn) ManagementServiceClient

type ManagementServiceServer

ManagementServiceServer is the server API for ManagementService service.

type ManagementService_StreamConsoleClient

type ManagementService_StreamConsoleClient interface {
	Send(*ConsoleData) error
	Recv() (*ConsoleData, error)
	grpc.ClientStream
}

type ManagementService_StreamConsoleServer

type ManagementService_StreamConsoleServer interface {
	Send(*ConsoleData) error
	Recv() (*ConsoleData, error)
	grpc.ServerStream
}

type Network

type Network struct {
	// System's fully qualified hostname
	// Example: rack01server02.mycompany.org
	// Default: Get hostname from DHCPv4 or reverse DNS lookup
	Hostname string `protobuf:"bytes,1,opt,name=hostname,proto3" json:"hostname,omitempty"`
	// VLAN ID to tag traffic with
	// Default: all traffic is untagged
	Vlan uint32 `protobuf:"varint,2,opt,name=vlan,proto3" json:"vlan,omitempty"`
	// Static IPv4 address to set
	// Example: 192.168.0.100/24
	// Default: Use DHCPv4 addresses
	Ipv4Address string `protobuf:"bytes,3,opt,name=ipv4_address,json=ipv4Address,proto3" json:"ipv4_address,omitempty"`
	// Static IPv6 address to set
	// Example: fec0::100/64
	// Default: Use DHCPv6 address
	Ipv6Address string `protobuf:"bytes,4,opt,name=ipv6_address,json=ipv6Address,proto3" json:"ipv6_address,omitempty"`
	// Static IPv4 routes
	// Default: No static IPv4 routes
	Ipv4Route []*Route `protobuf:"bytes,5,rep,name=ipv4_route,json=ipv4Route,proto3" json:"ipv4_route,omitempty"`
	// Static IPv6 routes
	// Default: No static IPv6 routes
	Ipv6Route            []*Route `protobuf:"bytes,6,rep,name=ipv6_route,json=ipv6Route,proto3" json:"ipv6_route,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Network) Descriptor

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

func (*Network) GetHostname

func (m *Network) GetHostname() string

func (*Network) GetIpv4Address

func (m *Network) GetIpv4Address() string

func (*Network) GetIpv4Route

func (m *Network) GetIpv4Route() []*Route

func (*Network) GetIpv6Address

func (m *Network) GetIpv6Address() string

func (*Network) GetIpv6Route

func (m *Network) GetIpv6Route() []*Route

func (*Network) GetVlan

func (m *Network) GetVlan() uint32

func (*Network) ProtoMessage

func (*Network) ProtoMessage()

func (*Network) Reset

func (m *Network) Reset()

func (*Network) String

func (m *Network) String() string

func (*Network) XXX_DiscardUnknown

func (m *Network) XXX_DiscardUnknown()

func (*Network) XXX_Marshal

func (m *Network) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Network) XXX_Merge

func (m *Network) XXX_Merge(src proto.Message)

func (*Network) XXX_Size

func (m *Network) XXX_Size() int

func (*Network) XXX_Unmarshal

func (m *Network) XXX_Unmarshal(b []byte) error

type Route

type Route struct {
	// Destination network
	// Example: 192.168.0.100/24
	Destination          string   `protobuf:"bytes,1,opt,name=destination,proto3" json:"destination,omitempty"`
	Via                  string   `protobuf:"bytes,2,opt,name=via,proto3" json:"via,omitempty"`
	Interface            string   `protobuf:"bytes,3,opt,name=interface,proto3" json:"interface,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Route) Descriptor

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

func (*Route) GetDestination

func (m *Route) GetDestination() string

func (*Route) GetInterface

func (m *Route) GetInterface() string

func (*Route) GetVia

func (m *Route) GetVia() string

func (*Route) ProtoMessage

func (*Route) ProtoMessage()

func (*Route) Reset

func (m *Route) Reset()

func (*Route) String

func (m *Route) String() string

func (*Route) XXX_DiscardUnknown

func (m *Route) XXX_DiscardUnknown()

func (*Route) XXX_Marshal

func (m *Route) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Route) XXX_Merge

func (m *Route) XXX_Merge(src proto.Message)

func (*Route) XXX_Size

func (m *Route) XXX_Size() int

func (*Route) XXX_Unmarshal

func (m *Route) XXX_Unmarshal(b []byte) error

type SystemConfig

type SystemConfig struct {
	Network              *Network `protobuf:"bytes,1,opt,name=network,proto3" json:"network,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*SystemConfig) Descriptor

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

func (*SystemConfig) GetNetwork

func (m *SystemConfig) GetNetwork() *Network

func (*SystemConfig) ProtoMessage

func (*SystemConfig) ProtoMessage()

func (*SystemConfig) Reset

func (m *SystemConfig) Reset()

func (*SystemConfig) String

func (m *SystemConfig) String() string

func (*SystemConfig) XXX_DiscardUnknown

func (m *SystemConfig) XXX_DiscardUnknown()

func (*SystemConfig) XXX_Marshal

func (m *SystemConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SystemConfig) XXX_Merge

func (m *SystemConfig) XXX_Merge(src proto.Message)

func (*SystemConfig) XXX_Size

func (m *SystemConfig) XXX_Size() int

func (*SystemConfig) XXX_Unmarshal

func (m *SystemConfig) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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