aap

package
v0.1.20 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2022 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrParam = errors.New("没有传递必要的参数")
)

Functions

func DestroyAAPClient

func DestroyAAPClient() error

func InitAAPClient

func InitAAPClient(conf *Config) error

Types

type Client

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

func GetInstance added in v0.1.1

func GetInstance() *Client

func (*Client) CreateOrganization

func (c *Client) CreateOrganization(orgName string) (*dto.CreateOrganizationResponse, error)

func (*Client) CreatePermission

func (c *Client) CreatePermission(orgID string, name string, resource string, action string) (*dto.CreatePermissionResponse, error)

func (*Client) CreateRole

func (c *Client) CreateRole(orgID string, roleName string) (*dto.CreateRoleResponse, error)

func (*Client) CreateUser

func (c *Client) CreateUser(orgID string, username string, password string, expireTime string) (*dto.UserInfo, error)

func (*Client) CreateUserConvenient added in v0.1.18

func (c *Client) CreateUserConvenient(request *dto.CreateUserConvenientRequest) (*dto.CreateUserConvenientResponse, error)

func (*Client) DeleteOrganization

func (c *Client) DeleteOrganization(orgID string) error

func (*Client) DeletePermission

func (c *Client) DeletePermission(orgID string, permissionID string) error

func (*Client) DeleteRole

func (c *Client) DeleteRole(orgID, roleID string) error

func (*Client) DeleteUser

func (c *Client) DeleteUser(orgID string, userID string) error

func (*Client) GetOrganizations

func (c *Client) GetOrganizations(orgID string, name string, pageNo int, pageSize int) (*dto.GetOrganizationsResponse, error)

func (*Client) GetPermissions

func (c *Client) GetPermissions(orgID string, permissionID string, name string, resource string, action string,
	pageNo int, pageSize int) (*dto.GetPermissionsResponse, error)

func (*Client) GetPermissionsInRole added in v0.1.15

func (c *Client) GetPermissionsInRole(orgID string, roleID string) (*dto.GetPermissionsInRoleResponse, error)

func (*Client) GetRoles

func (c *Client) GetRoles(orgID string, roleID string, roleName string, pageNo int, pageSize int) (*dto.GetRolesResponse, error)

func (*Client) GetRolesOfUser

func (c *Client) GetRolesOfUser(orgID string, userID string) (*dto.GetRolesOfUserResponse, error)

func (*Client) GetUserAccessToken

func (c *Client) GetUserAccessToken(orgID string, userName string, password string, expSec int64) (*dto.GetUserAccessTokenResponse, error)

func (*Client) GetUsers

func (c *Client) GetUsers(orgID string, userID string, username string, pageNo int, pageSize int) (*dto.GetUsersResponse, error)

func (*Client) RegisterServiceAuthority

func (c *Client) RegisterServiceAuthority(authorityID string) error

func (*Client) UnregisterServiceAuthority

func (c *Client) UnregisterServiceAuthority(authorityID string) error

func (*Client) UpdateOrganization

func (c *Client) UpdateOrganization(orgID string, name string) error

func (*Client) UpdatePermission

func (c *Client) UpdatePermission(orgID, permissionID, name, resource, action string) error

func (*Client) UpdatePermissionsInRole

func (c *Client) UpdatePermissionsInRole(orgID string, roleID string, permissionIDs []string) error

func (*Client) UpdateRole

func (c *Client) UpdateRole(orgID, roleID, name string) error

func (*Client) UpdateRolesOfUser

func (c *Client) UpdateRolesOfUser(orgID string, userID string, roleIDs []string) error

func (*Client) UpdateUser

func (c *Client) UpdateUser(orgID string, userID string, username string, password string) error

func (*Client) UserAuthentication

func (c *Client) UserAuthentication(accessToken string, resource string, action string) (*dto.UserAuthenticationResponse, error)

type Config

type Config struct {
	Address    string
	UserName   string
	Password   string
	TimeoutSec int
}

Jump to

Keyboard shortcuts

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