auth

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: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(opts Options) error

construct storage plugin instance invoked by sc main process

func Install

func Install(pluginImplName string, engineFunc dataSourceEngine)

load plugins configuration into plugins

Types

type DataSource

type DataSource interface {
	AccountExist(ctx context.Context, key string) (bool, error)
	GetAccount(ctx context.Context, key string) (*rbacframe.Account, error)
	ListAccount(ctx context.Context, key string) ([]*rbacframe.Account, int64, error)
	DeleteAccount(ctx context.Context, key string) (bool, error)
	UpdateAccount(ctx context.Context, key string, account *rbacframe.Account) error

	AddDomain(ctx context.Context, domain string) (bool, error)
	DomainExist(ctx context.Context, domain string) (bool, error)

	AddProject(ctx context.Context, domain, project string) (bool, error)
	ProjectExist(ctx context.Context, domain, project string) (bool, error)
}

func Auth

func Auth() DataSource

usage: auth.Auth().CreateAccount()

type ImplName

type ImplName string

type Options

type Options struct {
	Endpoint       string
	PluginImplName ImplName
}

Options contains configuration for plugins

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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