Documentation ¶
Overview ¶
Package rpc ...
Package rpc ...
Index ¶
- Variables
- type ChassisRPC
- func (cha *ChassisRPC) CreateChassis(ctx context.Context, req *chassisproto.CreateChassisRequest) (*chassisproto.GetChassisResponse, error)
- func (cha *ChassisRPC) DeleteChassis(ctx context.Context, req *chassisproto.DeleteChassisRequest) (*chassisproto.GetChassisResponse, error)
- func (cha *ChassisRPC) GetChassisCollection(ctx context.Context, req *chassisproto.GetChassisRequest) (*chassisproto.GetChassisResponse, error)
- func (cha *ChassisRPC) GetChassisInfo(ctx context.Context, req *chassisproto.GetChassisRequest) (*chassisproto.GetChassisResponse, error)
- func (cha *ChassisRPC) GetChassisResource(ctx context.Context, req *chassisproto.GetChassisRequest) (*chassisproto.GetChassisResponse, error)
- func (cha *ChassisRPC) UpdateChassis(ctx context.Context, req *chassisproto.UpdateChassisRequest) (*chassisproto.GetChassisResponse, error)
- type Systems
- func (s *Systems) ChangeBiosSettings(ctx context.Context, req *systemsproto.BiosSettingsRequest) (*systemsproto.SystemsResponse, error)
- func (s *Systems) ChangeBootOrderSettings(ctx context.Context, req *systemsproto.BootOrderSettingsRequest) (*systemsproto.SystemsResponse, error)
- func (s *Systems) ComputerSystemReset(ctx context.Context, req *systemsproto.ComputerSystemResetRequest) (*systemsproto.SystemsResponse, error)
- func (s *Systems) CreateVolume(ctx context.Context, req *systemsproto.VolumeRequest) (*systemsproto.SystemsResponse, error)
- func (s *Systems) DeleteVolume(ctx context.Context, req *systemsproto.VolumeRequest) (*systemsproto.SystemsResponse, error)
- func (s *Systems) GetSystemResource(ctx context.Context, req *systemsproto.GetSystemsRequest) (*systemsproto.SystemsResponse, error)
- func (s *Systems) GetSystems(ctx context.Context, req *systemsproto.GetSystemsRequest) (*systemsproto.SystemsResponse, error)
- func (s *Systems) GetSystemsCollection(ctx context.Context, req *systemsproto.GetSystemsRequest) (*systemsproto.SystemsResponse, error)
- func (s *Systems) SetDefaultBootOrder(ctx context.Context, req *systemsproto.DefaultBootOrderRequest) (*systemsproto.SystemsResponse, error)
Constants ¶
This section is empty.
Variables ¶
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 ¶
func (cha *ChassisRPC) CreateChassis(ctx context.Context, req *chassisproto.CreateChassisRequest) (*chassisproto.GetChassisResponse, error)
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 ¶
func (cha *ChassisRPC) DeleteChassis(ctx context.Context, req *chassisproto.DeleteChassisRequest) (*chassisproto.GetChassisResponse, error)
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 ¶
func (cha *ChassisRPC) GetChassisCollection(ctx context.Context, req *chassisproto.GetChassisRequest) (*chassisproto.GetChassisResponse, error)
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 ¶
func (cha *ChassisRPC) GetChassisInfo(ctx context.Context, req *chassisproto.GetChassisRequest) (*chassisproto.GetChassisResponse, error)
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 ¶
func (cha *ChassisRPC) GetChassisResource(ctx context.Context, req *chassisproto.GetChassisRequest) (*chassisproto.GetChassisResponse, error)
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 ¶
func (cha *ChassisRPC) UpdateChassis(ctx context.Context, req *chassisproto.UpdateChassisRequest) (*chassisproto.GetChassisResponse, error)
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 ¶
func (s *Systems) ChangeBiosSettings(ctx context.Context, req *systemsproto.BiosSettingsRequest) (*systemsproto.SystemsResponse, error)
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 ¶
func (s *Systems) ChangeBootOrderSettings(ctx context.Context, req *systemsproto.BootOrderSettingsRequest) (*systemsproto.SystemsResponse, error)
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 ¶
func (s *Systems) ComputerSystemReset(ctx context.Context, req *systemsproto.ComputerSystemResetRequest) (*systemsproto.SystemsResponse, error)
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 ¶
func (s *Systems) CreateVolume(ctx context.Context, req *systemsproto.VolumeRequest) (*systemsproto.SystemsResponse, error)
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 ¶
func (s *Systems) DeleteVolume(ctx context.Context, req *systemsproto.VolumeRequest) (*systemsproto.SystemsResponse, error)
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 ¶
func (s *Systems) GetSystemResource(ctx context.Context, req *systemsproto.GetSystemsRequest) (*systemsproto.SystemsResponse, error)
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 ¶
func (s *Systems) GetSystems(ctx context.Context, req *systemsproto.GetSystemsRequest) (*systemsproto.SystemsResponse, error)
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 ¶
func (s *Systems) SetDefaultBootOrder(ctx context.Context, req *systemsproto.DefaultBootOrderRequest) (*systemsproto.SystemsResponse, error)
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.