dao

package
v1.4.8 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package rbac is dao layer API to help service center manage account, policy and role info

Index

Constants

This section is empty.

Variables

View Source
var ErrCanNotEdit = errors.New("account can not be edited")
View Source
var ErrDuplicated = errors.New("account is duplicated")

Functions

func AccountExist

func AccountExist(ctx context.Context, name string) (bool, error)

func CreateAccount

func CreateAccount(ctx context.Context, a *rbacframe.Account) error

CreateAccount save 2 kv 1. account info

func DeleteAccount

func DeleteAccount(ctx context.Context, name string) (bool, error)

func EditAccount

func EditAccount(ctx context.Context, a *rbacframe.Account) error

CreateAccount save 2 kv 1. account info

func GetAccount

func GetAccount(ctx context.Context, name string) (*rbacframe.Account, error)

func GetRole

func GetRole(ctx context.Context, role string) *rbacframe.Role

func ListAccount

func ListAccount(ctx context.Context) ([]*rbacframe.Account, int64, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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