rpc

package
v0.0.0-...-81c02da Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateTaskAndResponse

func CreateTaskAndResponse(ctx context.Context, m *Managers, sessionToken string, resp *managersproto.ManagerResponse) (string, error)

CreateTaskAndResponse will create the task for corresponding request using the RPC call to task service and it will prepare custom task response to the user The function returns the ID of created task back.

Types

type Managers

type Managers struct {
	GetSessionUserName func(context.Context, string) (string, error)
	CreateTask         func(ctx context.Context, sessionUserName string) (string, error)
	SavePluginTaskInfo func(ctx context.Context, pluginIP, pluginServerName, odimTaskID, pluginTaskMonURL string) error
	IsAuthorizedRPC    func(ctx context.Context, sessionToken string, privileges, oemPrivileges []string) (response.RPC, error)
	EI                 *managers.ExternalInterface
}

Managers struct helps to register service

func (*Managers) CreateRemoteAccountService

func (m *Managers) CreateRemoteAccountService(ctx context.Context, req *managersproto.ManagerRequest) (*managersproto.ManagerResponse, error)

CreateRemoteAccountService defines the operations which handles the RPC request response The functionality retrieves the request and return backs the response to RPC according to the protoc file defined in the lib-util package. The function uses IsAuthorized of lib-util to validate the session token which is present in the request.

func (*Managers) DeleteRemoteAccountService

func (m *Managers) DeleteRemoteAccountService(ctx context.Context, req *managersproto.ManagerRequest) (*managersproto.ManagerResponse, error)

DeleteRemoteAccountService defines the operations which handles the RPC request response The functionality retrieves the request and return backs the response to RPC according to the protoc file defined in the lib-util package. The function uses IsAuthorized of lib-util to validate the session token which is present in the request.

func (*Managers) GetManager

GetManager 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 (*Managers) GetManagersCollection

func (m *Managers) GetManagersCollection(ctx context.Context, req *managersproto.ManagerRequest) (*managersproto.ManagerResponse, error)

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

func (*Managers) GetManagersResource

GetManagersResource 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 (*Managers) GetRemoteAccountService

func (m *Managers) GetRemoteAccountService(ctx context.Context, req *managersproto.ManagerRequest) (*managersproto.ManagerResponse, error)

GetRemoteAccountService defines the operations which handles the RPC request response The functionality retrieves the request and return backs the response to RPC according to the protoc file defined in the lib-util package. The function uses IsAuthorized of lib-util to validate the session token which is present in the request.

func (*Managers) UpdateRemoteAccountPassword

func (m *Managers) UpdateRemoteAccountPassword(ctx context.Context, req *managersproto.ManagerRequest) (*managersproto.ManagerResponse, error)

UpdateRemoteAccountPassword defines the operations which handles the RPC request response The functionality retrieves the request and return backs the response to RPC according to the protoc file defined in the lib-util package. The function uses IsAuthorized of lib-util to validate the session token which is present in the request.

func (*Managers) UpdateRemoteAccountService

func (m *Managers) UpdateRemoteAccountService(ctx context.Context, req *managersproto.ManagerRequest) (*managersproto.ManagerResponse, error)

UpdateRemoteAccountService defines the operations which handles the RPC request response The functionality retrieves the request and return backs the response to RPC according to the protoc file defined in the lib-util package. The function uses IsAuthorized of lib-util to validate the session token which is present in the request.

func (*Managers) VirtualMediaEject

VirtualMediaEject defines the operations which handles the RPC request response The function uses IsAuthorized of util-lib to validate the session which is present in the request.

func (*Managers) VirtualMediaInsert

VirtualMediaInsert defines the operations which handles the RPC request response The function uses IsAuthorized of util-lib to validate the session which is present in the request.

Jump to

Keyboard shortcuts

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