v1

package
v0.0.0-...-e544f65 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const OperationHardwareGetHardware = "/hardware.v1.Hardware/GetHardware"
View Source
const OperationHardwareSend = "/hardware.v1.Hardware/Send"

Variables

View Source
var (
	ErrorReason_name = map[int32]string{
		0: "USER_NOT_FOUND",
		1: "CONTENT_MISSING",
	}
	ErrorReason_value = map[string]int32{
		"USER_NOT_FOUND":  0,
		"CONTENT_MISSING": 1,
	}
)

Enum value maps for ErrorReason.

View Source
var File_hardware_v1_error_reason_proto protoreflect.FileDescriptor
View Source
var File_hardware_v1_hardware_proto protoreflect.FileDescriptor
View Source
var Hardware_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "hardware.v1.Hardware",
	HandlerType: (*HardwareServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Send",
			Handler:    _Hardware_Send_Handler,
		},
		{
			MethodName: "GetHardware",
			Handler:    _Hardware_GetHardware_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "hardware/v1/hardware.proto",
}

Hardware_ServiceDesc is the grpc.ServiceDesc for Hardware service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterHardwareHTTPServer

func RegisterHardwareHTTPServer(s *http.Server, srv HardwareHTTPServer)

func RegisterHardwareServer

func RegisterHardwareServer(s grpc.ServiceRegistrar, srv HardwareServer)

Types

type Cpu

type Cpu struct {
	CPU       int32  `protobuf:"varint,1,opt,name=CPU,proto3" json:"CPU,omitempty"`
	VendorID  string `protobuf:"bytes,2,opt,name=VendorID,proto3" json:"VendorID,omitempty"`
	Family    string `protobuf:"bytes,3,opt,name=Family,proto3" json:"Family,omitempty"`
	Model     string `protobuf:"bytes,4,opt,name=Model,proto3" json:"Model,omitempty"`
	ModelName string `protobuf:"bytes,5,opt,name=ModelName,proto3" json:"ModelName,omitempty"`
	// contains filtered or unexported fields
}

func (*Cpu) Descriptor deprecated

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

Deprecated: Use Cpu.ProtoReflect.Descriptor instead.

func (*Cpu) GetCPU

func (x *Cpu) GetCPU() int32

func (*Cpu) GetFamily

func (x *Cpu) GetFamily() string

func (*Cpu) GetModel

func (x *Cpu) GetModel() string

func (*Cpu) GetModelName

func (x *Cpu) GetModelName() string

func (*Cpu) GetVendorID

func (x *Cpu) GetVendorID() string

func (*Cpu) ProtoMessage

func (*Cpu) ProtoMessage()

func (*Cpu) ProtoReflect

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

func (*Cpu) Reset

func (x *Cpu) Reset()

func (*Cpu) String

func (x *Cpu) String() string

type DiskPartition

type DiskPartition struct {
	Device     string   `protobuf:"bytes,1,opt,name=Device,proto3" json:"Device,omitempty"`
	Mountpoint string   `protobuf:"bytes,2,opt,name=Mountpoint,proto3" json:"Mountpoint,omitempty"`
	Fstype     string   `protobuf:"bytes,3,opt,name=Fstype,proto3" json:"Fstype,omitempty"`
	Opts       []string `protobuf:"bytes,4,rep,name=Opts,proto3" json:"Opts,omitempty"`
	// contains filtered or unexported fields
}

func (*DiskPartition) Descriptor deprecated

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

Deprecated: Use DiskPartition.ProtoReflect.Descriptor instead.

func (*DiskPartition) GetDevice

func (x *DiskPartition) GetDevice() string

func (*DiskPartition) GetFstype

func (x *DiskPartition) GetFstype() string

func (*DiskPartition) GetMountpoint

func (x *DiskPartition) GetMountpoint() string

func (*DiskPartition) GetOpts

func (x *DiskPartition) GetOpts() []string

func (*DiskPartition) ProtoMessage

func (*DiskPartition) ProtoMessage()

func (*DiskPartition) ProtoReflect

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

func (*DiskPartition) Reset

func (x *DiskPartition) Reset()

func (*DiskPartition) String

func (x *DiskPartition) String() string

type ErrorReason

type ErrorReason int32
const (
	ErrorReason_USER_NOT_FOUND  ErrorReason = 0
	ErrorReason_CONTENT_MISSING ErrorReason = 1
)

func (ErrorReason) Descriptor

func (ErrorReason) Enum

func (x ErrorReason) Enum() *ErrorReason

func (ErrorReason) EnumDescriptor deprecated

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

Deprecated: Use ErrorReason.Descriptor instead.

func (ErrorReason) Number

func (x ErrorReason) Number() protoreflect.EnumNumber

func (ErrorReason) String

func (x ErrorReason) String() string

func (ErrorReason) Type

type GetHardwareReply

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

func (*GetHardwareReply) Descriptor deprecated

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

Deprecated: Use GetHardwareReply.ProtoReflect.Descriptor instead.

func (*GetHardwareReply) GetInfo

func (x *GetHardwareReply) GetInfo() *HardwareInfo

func (*GetHardwareReply) ProtoMessage

func (*GetHardwareReply) ProtoMessage()

func (*GetHardwareReply) ProtoReflect

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

func (*GetHardwareReply) Reset

func (x *GetHardwareReply) Reset()

func (*GetHardwareReply) String

func (x *GetHardwareReply) String() string

type GetHardwareRequest

type GetHardwareRequest struct {

	// Different ways to get hardware info
	//
	// Types that are assignable to Filter:
	//	*GetHardwareRequest_Id
	//	*GetHardwareRequest_Host
	Filter isGetHardwareRequest_Filter `protobuf_oneof:"filter"`
	// contains filtered or unexported fields
}

Request.

func (*GetHardwareRequest) Descriptor deprecated

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

Deprecated: Use GetHardwareRequest.ProtoReflect.Descriptor instead.

func (*GetHardwareRequest) GetFilter

func (m *GetHardwareRequest) GetFilter() isGetHardwareRequest_Filter

func (*GetHardwareRequest) GetHost

func (*GetHardwareRequest) GetId

func (*GetHardwareRequest) ProtoMessage

func (*GetHardwareRequest) ProtoMessage()

func (*GetHardwareRequest) ProtoReflect

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

func (*GetHardwareRequest) Reset

func (x *GetHardwareRequest) Reset()

func (*GetHardwareRequest) String

func (x *GetHardwareRequest) String() string

type GetHardwareRequest_ByHostname

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

func (*GetHardwareRequest_ByHostname) Descriptor deprecated

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

Deprecated: Use GetHardwareRequest_ByHostname.ProtoReflect.Descriptor instead.

func (*GetHardwareRequest_ByHostname) GetHost

func (*GetHardwareRequest_ByHostname) ProtoMessage

func (*GetHardwareRequest_ByHostname) ProtoMessage()

func (*GetHardwareRequest_ByHostname) ProtoReflect

func (*GetHardwareRequest_ByHostname) Reset

func (x *GetHardwareRequest_ByHostname) Reset()

func (*GetHardwareRequest_ByHostname) String

type GetHardwareRequest_ByID

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

func (*GetHardwareRequest_ByID) Descriptor deprecated

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

Deprecated: Use GetHardwareRequest_ByID.ProtoReflect.Descriptor instead.

func (*GetHardwareRequest_ByID) GetId

func (x *GetHardwareRequest_ByID) GetId() string

func (*GetHardwareRequest_ByID) ProtoMessage

func (*GetHardwareRequest_ByID) ProtoMessage()

func (*GetHardwareRequest_ByID) ProtoReflect

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

func (*GetHardwareRequest_ByID) Reset

func (x *GetHardwareRequest_ByID) Reset()

func (*GetHardwareRequest_ByID) String

func (x *GetHardwareRequest_ByID) String() string

type GetHardwareRequest_Host

type GetHardwareRequest_Host struct {
	Host *GetHardwareRequest_ByHostname `protobuf:"bytes,2,opt,name=Host,proto3,oneof"`
}

type GetHardwareRequest_Id

type GetHardwareRequest_Id struct {
	Id *GetHardwareRequest_ByID `protobuf:"bytes,1,opt,name=Id,proto3,oneof"`
}

type HardwareClient

type HardwareClient interface {
	// Sends a greeting
	Send(ctx context.Context, in *SendRequest, opts ...grpc.CallOption) (*SendReply, error)
	GetHardware(ctx context.Context, in *GetHardwareRequest, opts ...grpc.CallOption) (*GetHardwareReply, error)
}

HardwareClient is the client API for Hardware service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewHardwareClient

func NewHardwareClient(cc grpc.ClientConnInterface) HardwareClient

type HardwareHTTPClient

type HardwareHTTPClient interface {
	GetHardware(ctx context.Context, req *GetHardwareRequest, opts ...http.CallOption) (rsp *GetHardwareReply, err error)
	Send(ctx context.Context, req *SendRequest, opts ...http.CallOption) (rsp *SendReply, err error)
}

func NewHardwareHTTPClient

func NewHardwareHTTPClient(client *http.Client) HardwareHTTPClient

type HardwareHTTPClientImpl

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

func (*HardwareHTTPClientImpl) GetHardware

func (*HardwareHTTPClientImpl) Send

type HardwareHTTPServer

type HardwareHTTPServer interface {
	GetHardware(context.Context, *GetHardwareRequest) (*GetHardwareReply, error)
	Send(context.Context, *SendRequest) (*SendReply, error)
}

type HardwareInfo

type HardwareInfo struct {
	Host              *Host                `protobuf:"bytes,1,opt,name=Host,proto3" json:"Host,omitempty"`
	Memory            *Memory              `protobuf:"bytes,2,opt,name=Memory,proto3" json:"Memory,omitempty"`
	NetworkInterfaces []*NetworkInterfaces `protobuf:"bytes,3,rep,name=NetworkInterfaces,proto3" json:"NetworkInterfaces,omitempty"`
	DiskPartition     []*DiskPartition     `protobuf:"bytes,4,rep,name=DiskPartition,proto3" json:"DiskPartition,omitempty"`
	Netstat           []*Netstat           `protobuf:"bytes,5,rep,name=Netstat,proto3" json:"Netstat,omitempty"`
	Cpu               []*Cpu               `protobuf:"bytes,6,rep,name=Cpu,proto3" json:"Cpu,omitempty"`
	// contains filtered or unexported fields
}

func (*HardwareInfo) Descriptor deprecated

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

Deprecated: Use HardwareInfo.ProtoReflect.Descriptor instead.

func (*HardwareInfo) GetCpu

func (x *HardwareInfo) GetCpu() []*Cpu

func (*HardwareInfo) GetDiskPartition

func (x *HardwareInfo) GetDiskPartition() []*DiskPartition

func (*HardwareInfo) GetHost

func (x *HardwareInfo) GetHost() *Host

func (*HardwareInfo) GetMemory

func (x *HardwareInfo) GetMemory() *Memory

func (*HardwareInfo) GetNetstat

func (x *HardwareInfo) GetNetstat() []*Netstat

func (*HardwareInfo) GetNetworkInterfaces

func (x *HardwareInfo) GetNetworkInterfaces() []*NetworkInterfaces

func (*HardwareInfo) ProtoMessage

func (*HardwareInfo) ProtoMessage()

func (*HardwareInfo) ProtoReflect

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

func (*HardwareInfo) Reset

func (x *HardwareInfo) Reset()

func (*HardwareInfo) String

func (x *HardwareInfo) String() string

type HardwareServer

type HardwareServer interface {
	// Sends a greeting
	Send(context.Context, *SendRequest) (*SendReply, error)
	GetHardware(context.Context, *GetHardwareRequest) (*GetHardwareReply, error)
	// contains filtered or unexported methods
}

HardwareServer is the server API for Hardware service. All implementations must embed UnimplementedHardwareServer for forward compatibility

type Host

type Host struct {
	Hostname             string `protobuf:"bytes,1,opt,name=Hostname,proto3" json:"Hostname,omitempty"`
	OS                   string `protobuf:"bytes,2,opt,name=OS,proto3" json:"OS,omitempty"`
	Platform             string `protobuf:"bytes,3,opt,name=Platform,proto3" json:"Platform,omitempty"`
	PlatformFamily       string `protobuf:"bytes,4,opt,name=PlatformFamily,proto3" json:"PlatformFamily,omitempty"`
	PlatformVersion      string `protobuf:"bytes,5,opt,name=PlatformVersion,proto3" json:"PlatformVersion,omitempty"`
	KernelVersion        string `protobuf:"bytes,6,opt,name=KernelVersion,proto3" json:"KernelVersion,omitempty"`
	KernelArch           string `protobuf:"bytes,7,opt,name=KernelArch,proto3" json:"KernelArch,omitempty"`
	VirtualizationSystem string `protobuf:"bytes,8,opt,name=VirtualizationSystem,proto3" json:"VirtualizationSystem,omitempty"`
	VirtualizationRole   string `protobuf:"bytes,9,opt,name=VirtualizationRole,proto3" json:"VirtualizationRole,omitempty"`
	HostID               string `protobuf:"bytes,10,opt,name=HostID,proto3" json:"HostID,omitempty"`
	// contains filtered or unexported fields
}

func (*Host) Descriptor deprecated

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

Deprecated: Use Host.ProtoReflect.Descriptor instead.

func (*Host) GetHostID

func (x *Host) GetHostID() string

func (*Host) GetHostname

func (x *Host) GetHostname() string

func (*Host) GetKernelArch

func (x *Host) GetKernelArch() string

func (*Host) GetKernelVersion

func (x *Host) GetKernelVersion() string

func (*Host) GetOS

func (x *Host) GetOS() string

func (*Host) GetPlatform

func (x *Host) GetPlatform() string

func (*Host) GetPlatformFamily

func (x *Host) GetPlatformFamily() string

func (*Host) GetPlatformVersion

func (x *Host) GetPlatformVersion() string

func (*Host) GetVirtualizationRole

func (x *Host) GetVirtualizationRole() string

func (*Host) GetVirtualizationSystem

func (x *Host) GetVirtualizationSystem() string

func (*Host) ProtoMessage

func (*Host) ProtoMessage()

func (*Host) ProtoReflect

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

func (*Host) Reset

func (x *Host) Reset()

func (*Host) String

func (x *Host) String() string

type Memory

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

func (*Memory) Descriptor deprecated

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

Deprecated: Use Memory.ProtoReflect.Descriptor instead.

func (*Memory) GetTotal

func (x *Memory) GetTotal() uint64

func (*Memory) ProtoMessage

func (*Memory) ProtoMessage()

func (*Memory) ProtoReflect

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

func (*Memory) Reset

func (x *Memory) Reset()

func (*Memory) String

func (x *Memory) String() string

type Netstat

type Netstat struct {
	Addr    string `protobuf:"bytes,1,opt,name=Addr,proto3" json:"Addr,omitempty"`
	Port    uint64 `protobuf:"varint,2,opt,name=Port,proto3" json:"Port,omitempty"`
	Proto   string `protobuf:"bytes,3,opt,name=Proto,proto3" json:"Proto,omitempty"`
	Process string `protobuf:"bytes,4,opt,name=Process,proto3" json:"Process,omitempty"`
	// contains filtered or unexported fields
}

func (*Netstat) Descriptor deprecated

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

Deprecated: Use Netstat.ProtoReflect.Descriptor instead.

func (*Netstat) GetAddr

func (x *Netstat) GetAddr() string

func (*Netstat) GetPort

func (x *Netstat) GetPort() uint64

func (*Netstat) GetProcess

func (x *Netstat) GetProcess() string

func (*Netstat) GetProto

func (x *Netstat) GetProto() string

func (*Netstat) ProtoMessage

func (*Netstat) ProtoMessage()

func (*Netstat) ProtoReflect

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

func (*Netstat) Reset

func (x *Netstat) Reset()

func (*Netstat) String

func (x *Netstat) String() string

type NetworkInterfaces

type NetworkInterfaces struct {
	Index        int64    `protobuf:"varint,1,opt,name=Index,proto3" json:"Index,omitempty"`
	MTU          int64    `protobuf:"varint,2,opt,name=MTU,proto3" json:"MTU,omitempty"`
	Name         string   `protobuf:"bytes,3,opt,name=Name,proto3" json:"Name,omitempty"`
	HardwareAddr string   `protobuf:"bytes,4,opt,name=HardwareAddr,proto3" json:"HardwareAddr,omitempty"`
	Flags        []string `protobuf:"bytes,5,rep,name=Flags,proto3" json:"Flags,omitempty"`
	Addrs        []string `protobuf:"bytes,6,rep,name=Addrs,proto3" json:"Addrs,omitempty"`
	// contains filtered or unexported fields
}

func (*NetworkInterfaces) Descriptor deprecated

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

Deprecated: Use NetworkInterfaces.ProtoReflect.Descriptor instead.

func (*NetworkInterfaces) GetAddrs

func (x *NetworkInterfaces) GetAddrs() []string

func (*NetworkInterfaces) GetFlags

func (x *NetworkInterfaces) GetFlags() []string

func (*NetworkInterfaces) GetHardwareAddr

func (x *NetworkInterfaces) GetHardwareAddr() string

func (*NetworkInterfaces) GetIndex

func (x *NetworkInterfaces) GetIndex() int64

func (*NetworkInterfaces) GetMTU

func (x *NetworkInterfaces) GetMTU() int64

func (*NetworkInterfaces) GetName

func (x *NetworkInterfaces) GetName() string

func (*NetworkInterfaces) ProtoMessage

func (*NetworkInterfaces) ProtoMessage()

func (*NetworkInterfaces) ProtoReflect

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

func (*NetworkInterfaces) Reset

func (x *NetworkInterfaces) Reset()

func (*NetworkInterfaces) String

func (x *NetworkInterfaces) String() string

type SendReply

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

The response message containing the greetings

func (*SendReply) Descriptor deprecated

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

Deprecated: Use SendReply.ProtoReflect.Descriptor instead.

func (*SendReply) ProtoMessage

func (*SendReply) ProtoMessage()

func (*SendReply) ProtoReflect

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

func (*SendReply) Reset

func (x *SendReply) Reset()

func (*SendReply) String

func (x *SendReply) String() string

type SendRequest

type SendRequest struct {
	Info *HardwareInfo `protobuf:"bytes,1,opt,name=info,proto3" json:"info,omitempty"`
	// contains filtered or unexported fields
}

The request message containing the user's name.

func (*SendRequest) Descriptor deprecated

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

Deprecated: Use SendRequest.ProtoReflect.Descriptor instead.

func (*SendRequest) GetInfo

func (x *SendRequest) GetInfo() *HardwareInfo

func (*SendRequest) ProtoMessage

func (*SendRequest) ProtoMessage()

func (*SendRequest) ProtoReflect

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

func (*SendRequest) Reset

func (x *SendRequest) Reset()

func (*SendRequest) String

func (x *SendRequest) String() string

type UnimplementedHardwareServer

type UnimplementedHardwareServer struct {
}

UnimplementedHardwareServer must be embedded to have forward compatible implementations.

func (UnimplementedHardwareServer) GetHardware

func (UnimplementedHardwareServer) Send

type UnsafeHardwareServer

type UnsafeHardwareServer interface {
	// contains filtered or unexported methods
}

UnsafeHardwareServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to HardwareServer will result in compilation errors.

Jump to

Keyboard shortcuts

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