Documentation ¶
Index ¶
- Constants
- Variables
- func GenerateETCDAccountKey(name string) string
- func GenerateETCDDomainKey(domain string) string
- func GenerateETCDProjectKey(domain, project string) string
- func GetDomainRootKey() string
- func GetProjectRootKey(domain string) string
- func GetRootKey() string
- type DataSource
- func (ds *DataSource) AccountExist(ctx context.Context, key string) (bool, error)
- func (ds *DataSource) AddDomain(ctx context.Context, domain string) (bool, error)
- func (ds *DataSource) AddProject(ctx context.Context, domain, project string) (bool, error)
- func (ds *DataSource) DeleteAccount(ctx context.Context, key string) (bool, error)
- func (ds *DataSource) DomainExist(ctx context.Context, domain string) (bool, error)
- func (ds *DataSource) GenerateAccountKey(name string) string
- func (ds *DataSource) GetAccount(ctx context.Context, key string) (*rbacframe.Account, error)
- func (ds *DataSource) ListAccount(ctx context.Context, key string) ([]*rbacframe.Account, int64, error)
- func (ds *DataSource) ProjectExist(ctx context.Context, domain, project string) (bool, error)
- func (ds *DataSource) UpdateAccount(ctx context.Context, key string, account *rbacframe.Account) error
Constants ¶
View Source
const ( RegistryRootKey = "cse-sr" RegistryProjectKey = "projects" SPLIT = "/" RegistryDomainKey = "domains" )
Variables ¶
View Source
var ErrNotUnique = errors.New("kv result is not unique")
Functions ¶
func GenerateETCDAccountKey ¶
func GenerateETCDDomainKey ¶
func GenerateETCDProjectKey ¶
func GetDomainRootKey ¶
func GetDomainRootKey() string
func GetProjectRootKey ¶
func GetRootKey ¶
func GetRootKey() string
Types ¶
type DataSource ¶
type DataSource struct{}
func NewDataSource ¶
func NewDataSource() *DataSource
func (*DataSource) AccountExist ¶
func (*DataSource) AddProject ¶
func (*DataSource) DeleteAccount ¶
func (*DataSource) DomainExist ¶
func (*DataSource) GenerateAccountKey ¶
func (ds *DataSource) GenerateAccountKey(name string) string
func (*DataSource) GetAccount ¶
func (*DataSource) ListAccount ¶
func (*DataSource) ProjectExist ¶
func (*DataSource) UpdateAccount ¶
Click to show internal directories.
Click to hide internal directories.