account

package
v0.0.0-...-695150b Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2020 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package account ...

Package account ...

Package account ...

Package account ...

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

Create defines creation of a new account. The function is supposed to be used as part of RPC.

For creating an account, two parameters need to be passed CreateAccountRequest and Session. New account UserName, Password and RoleId will be part of CreateAccountRequest, and Session parameter will have all session related data, espically the privileges. For creating new account the ConfigureUsers privilege is mandatory.

There will be two return values for the fuction. One is the RPC response, which contains the status code, status message, headers and body and the second value is error.

func Delete

func Delete(session *asmodel.Session, accountID string) response.RPC

Delete defines deletion of an existing account.

Two parameters need to be passed to the function which are the Session, which contains all the session related data, espically the ConfigureUsers privilege and the accountID which is used for identifing the account to be deleted.

As return parameters RPC response, which contains status code, message, headers and data, error will be passed back.

func GetAccount

func GetAccount(session *asmodel.Session, accountID string) response.RPC

GetAccount defines the viewing of a particular account which is identified by the account id.

As input parameters we need to pass Session, which contains all session data especially configureUsers privilege and the accountID which is used to identify the account which is supposed to be viewed.

As return parameters RPC response, which contains status code, message, headers and data, error will be passed back.

func GetAccountService

func GetAccountService() response.RPC

GetAccountService defines the functionality for knowing whether the account service is enabled or not

As return parameters RPC response, which contains status code, message, headers and data, error will be passed back.

func GetAllAccounts

func GetAllAccounts(session *asmodel.Session) response.RPC

GetAllAccounts defines the admin functionality of listing of all accounts.

As input parameters we need to pass Session, which contains all session data especially configureUsers privilege.

As return parameters RPC response, which contains status code, message, headers and data, error will be passed back.

func Update

Update defines the updation of the account details. Every account details can be updated other than the UserName if the session parameter have sufficient privileges.

For updating an account, two parameters need to be passed UpdateAccountRequest and Session. New Password and RoleId will be part of UpdateAccountRequest, and Session parameter will have all session related data, espically the privileges.

Output is the RPC response, which contains the status code, status message, headers and body.

Types

This section is empty.

Jump to

Keyboard shortcuts

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