rpc

package
v0.0.0-...-8d2fcc7 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package rpc ...

Package rpc ...

Index

Constants

This section is empty.

Variables

View Source
var (
	// JSONMarshalFunc function pointer for the json.Marshal
	JSONMarshalFunc = json.Marshal
)

Functions

This section is empty.

Types

type ChassisRPC

type ChassisRPC struct {
	IsAuthorizedRPC      func(sessionToken string, privileges, oemPrivileges []string) (response.RPC, error)
	GetCollectionHandler *chassis.GetCollection
	GetHandler           *chassis.Get
	DeleteHandler        *chassis.Delete
	UpdateHandler        *chassis.Update
	CreateHandler        *chassis.Create
}

ChassisRPC struct helps to register service

func NewChassisRPC

func NewChassisRPC(
	authWrapper func(sessionToken string, privileges, oemPrivileges []string) (response.RPC, error),
	createHandler *chassis.Create,
	getCollectionHandler *chassis.GetCollection,
	deleteHandler *chassis.Delete,
	getHandler *chassis.Get,
	updateHandler *chassis.Update) *ChassisRPC

NewChassisRPC returns an instance of ChassisRPC

func (*ChassisRPC) CreateChassis

CreateChassis defines the operations which handles the RPC request response for creating the system resource of systems micro service. The functionality retrives the request and return backs the response to RPC according to the protoc file defined in the util-lib package. The function uses IsAuthorized of util-lib to validate the session which is present in the request.

func (*ChassisRPC) DeleteChassis

DeleteChassis defines the operations which handles the RPC request response for deleting the system resource of systems micro service. The functionality retrives the request and return backs the response to RPC according to the protoc file defined in the util-lib package. The function uses IsAuthorized of util-lib to validate the session which is present in the request.

func (*ChassisRPC) GetChassisCollection

GetChassisCollection defines the operation which handles the RPC request response for getting all the server chassis added. Retrieves all the keys with table name ChassisCollection and create the response to send back to requested user.

func (*ChassisRPC) GetChassisInfo

GetChassisInfo defines the operations which handles the RPC request response for the getting the system resource of systems micro service. The functionality retrives the request and return backs the response to RPC according to the protoc file defined in the util-lib package. The function uses IsAuthorized of util-lib to validate the session which is present in the request.

func (*ChassisRPC) GetChassisResource

GetChassisResource defines the operations which handles the RPC request response for the getting the system resource of systems micro service. The functionality retrieves the request and return backs the response to RPC according to the protoc file defined in the util-lib package. The function uses IsAuthorized of util-lib to validate the session which is present in the request.

func (*ChassisRPC) UpdateChassis

UpdateChassis defines the operations which handles the RPC request response for updating the system resource of systems micro service. The functionality retrives the request and return backs the response to RPC according to the protoc file defined in the util-lib package. The function uses IsAuthorized of util-lib to validate the session which is present in the request.

type Systems

type Systems struct {
	IsAuthorizedRPC    func(sessionToken string, privileges, oemPrivileges []string) (response.RPC, error)
	GetSessionUserName func(string) (string, error)
	CreateTask         func(ctx context.Context, sessionUserName string) (string, error)
	UpdateTask         func(ctx context.Context, task common.TaskData) error
	EI                 *systems.ExternalInterface
}

Systems struct helps to register service

func (*Systems) ChangeBiosSettings

ChangeBiosSettings defines the operations which handles the RPC request response for the ChangeBiosSettings service of systems micro service. The functionality retrives the request and return backs the response to RPC according to the protoc file defined in the lib-utilities package. The function also checks for the session time out of the token which is present in the request.

func (*Systems) ChangeBootOrderSettings

ChangeBootOrderSettings defines the operations which handles the RPC request response for the ChangeBootOrderSettings service of systems micro service. The functionality retrives the request and return backs the response to RPC according to the protoc file defined in the lib-utilities package. The function also checks for the session time out of the token which is present in the request.

func (*Systems) ComputerSystemReset

ComputerSystemReset defines the operations which handles the RPC request response for the ComputerSystemReset service of systems micro service. The functionality retrives the request and return backs the response to RPC according to the protoc file defined in the lib-utilities package. The function also checks for the session time out of the token which is present in the request.

func (*Systems) CreateVolume

CreateVolume defines the operations which handles the RPC request response for the CreateVolume service of systems micro service. The functionality retrives the request and return backs the response to RPC according to the protoc file defined in the lib-utilities package. The function also checks for the session time out of the token which is present in the request.

func (*Systems) DeleteVolume

DeleteVolume defines the operations which handles the RPC request response for the DeleteVolume service of systems micro service. The functionality retrives the request and return backs the response to RPC according to the protoc file defined in the lib-utilities package. The function also checks for the session time out of the token which is present in the request.

func (*Systems) GetSystemResource

GetSystemResource defines the operations which handles the RPC request response for the getting the system resource of systems micro service. The functionality retrives the request and return backs the response to RPC according to the protoc file defined in the util-lib package. The function uses IsAuthorized of util-lib to validate the session which is present in the request.

func (*Systems) GetSystems

GetSystems defines the operations which handles the RPC request response for the getting the system resource of systems micro service. The functionality retrives the request and return backs the response to RPC according to the protoc file defined in the util-lib package. The function uses IsAuthorized of util-lib to validate the session which is present in the request.

func (*Systems) GetSystemsCollection

func (s *Systems) GetSystemsCollection(ctx context.Context, req *systemsproto.GetSystemsRequest) (*systemsproto.SystemsResponse, error)

GetSystemsCollection defines the operation which has the RPC request for getting the systems data from odimra. Retrieves all the keys with table name systems collection and create the response to send back to requested user.

func (*Systems) SetDefaultBootOrder

SetDefaultBootOrder defines the operations which handles the RPC request response for the SetDefaultBootOrder service of systems micro service. The functionality retrieves the request and return backs the response to RPC according to the protoc file defined in the lib-utilities package. The function also checks for the session time out of the token which is present in the request.

Jump to

Keyboard shortcuts

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