dpuser

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DagPoolUser

type DagPoolUser struct {
	Username string
	Password string
	Policy   upolicy.DagPoolPolicy
	Capacity uint64
}

DagPoolUser DagPool User

type IdentityUserSys

type IdentityUserSys struct {
	DB objmetadb.ObjStoreMetaDBAPI
	// contains filtered or unexported fields
}

IdentityUserSys identity user sys

func NewIdentityUserSys

func NewIdentityUserSys(db objmetadb.ObjStoreMetaDBAPI, rootUser, rootPassword string) (*IdentityUserSys, error)

NewIdentityUserSys new identity user sys

func (*IdentityUserSys) AddUser

func (i *IdentityUserSys) AddUser(user DagPoolUser) error

AddUser add user

func (*IdentityUserSys) CheckAdmin

func (i *IdentityUserSys) CheckAdmin(user, pass string) bool

CheckAdmin check user admin policy

func (*IdentityUserSys) CheckUser

func (i *IdentityUserSys) CheckUser(user, pass string) bool

CheckUser check user if correct

func (*IdentityUserSys) CheckUserPolicy

func (i *IdentityUserSys) CheckUserPolicy(username, pass string, policy upolicy.DagPoolPolicy) bool

CheckUserPolicy check user policy

func (*IdentityUserSys) IsAdmin

func (i *IdentityUserSys) IsAdmin(user string) bool

IsAdmin check user if admin user

func (*IdentityUserSys) QueryUser

func (i *IdentityUserSys) QueryUser(username string) (*DagPoolUser, error)

QueryUser query user

func (*IdentityUserSys) RemoveUser

func (i *IdentityUserSys) RemoveUser(username string) error

RemoveUser remove user

func (*IdentityUserSys) UpdateUser

func (i *IdentityUserSys) UpdateUser(u DagPoolUser) error

UpdateUser Update user

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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