user

package
v2.4.0+incompatible Latest Latest
Warning

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

Go to latest
Published: May 14, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthorizedVols

type AuthorizedVols struct {
	Authorized []string
	Vol        string
}

struct begin .....

type GeneralResp

type GeneralResp struct {
	Code    int32
	Message string
}

type UserClient

type UserClient struct {
	*client.MasterGClient
}

func NewUserClient

func NewUserClient(c *client.MasterGClient) *UserClient

func (*UserClient) CreateUser

func (c *UserClient) CreateUser(ctx context.Context, accessKey string, description string, iD string, password string, secretKey string, Type uint8) (*UserInfo, error)

func (*UserClient) DeleteUser

func (c *UserClient) DeleteUser(ctx context.Context, userID string) (*GeneralResp, error)

function begin .....

func (*UserClient) GetUserAKInfo

func (c *UserClient) GetUserAKInfo(ctx context.Context, accessKey string) (*UserInfo, error)

func (*UserClient) GetUserInfo

func (c *UserClient) GetUserInfo(ctx context.Context, userID string) (*UserInfo, error)

func (*UserClient) GetUserInfoForLogin

func (c *UserClient) GetUserInfoForLogin(ctx context.Context, userID string) (*UserInfo, error)

func (*UserClient) ListUserInfo

func (c *UserClient) ListUserInfo(ctx context.Context) ([]UserInfo, error)

func (*UserClient) RemoveUserPolicy

func (c *UserClient) RemoveUserPolicy(ctx context.Context, userID string, volume string) (*UserInfo, error)

func (*UserClient) TopNUser

func (c *UserClient) TopNUser(ctx context.Context, n int32) ([]UserUseSpace, error)

func (*UserClient) TransferUserVol

func (c *UserClient) TransferUserVol(ctx context.Context, force bool, userDst string, userSrc string, volume string) (*UserInfo, error)

func (*UserClient) UpdateUser

func (c *UserClient) UpdateUser(ctx context.Context, accessKey string, description string, secretKey string, Type uint8, userID string) (*UserInfo, error)

func (*UserClient) UpdateUserPolicy

func (c *UserClient) UpdateUserPolicy(ctx context.Context, policy []string, userID string, volume string) (*UserInfo, error)

func (*UserClient) ValidatePassword

func (c *UserClient) ValidatePassword(ctx context.Context, password string, userID string) (*UserInfo, error)

type UserInfo

type UserInfo struct {
	Access_key      string
	Create_time     string
	Description     string
	EMPTY           bool
	Policy          *UserPolicy
	Secret_key      string
	UserStatistical *UserStatistical
	User_id         string
	User_type       uint8
}

type UserPolicy

type UserPolicy struct {
	AuthorizedVols []AuthorizedVols
	Own_vols       []string
}

type UserStatistical

type UserStatistical struct {
	Data               uint64
	DataPartitionCount int32
	MetaPartitionCount int32
	VolumeCount        int32
}

type UserUseSpace

type UserUseSpace struct {
	Name  string
	Ratio float32
	Size  uint64
}

Jump to

Keyboard shortcuts

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