usercenter

package
v0.2.0-alpha.14 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2025 License: MIT Imports: 16 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package usercenter provide methods used to access usercenter service.

Index

Constants

This section is empty.

Variables

ProviderSet is the usercenter providers.

Functions

func GetClient

func GetClient() *impl

GetClient returns the globally initialized client.

func NewUserCenter

func NewUserCenter(opts *UserCenterOptions, etcdOpts *genericoptions.EtcdOptions) *impl

NewUserCenter creates a new client to work with usercenter services.

Types

type GetSecretRequest

type GetSecretRequest struct {
	UserID string
	Name   string
}

type GetSecretResponse

type GetSecretResponse = v1.Secret

type Impl

type Impl = impl

type Interface

type Interface interface {
	Authorize(ctx context.Context, token string, obj, act string) (string, bool, error)
}

Interface is an interface that presents a subset of the usercenter API.

type UserCenterOptions

type UserCenterOptions struct {
	Server string `json:"server" mapstructure:"server"`

	// Timeout with server timeout.
	Timeout time.Duration `json:"timeout" mapstructure:"timeout"`
}

UserCenterOptions is a list of options for the specific client.

func NewUserCenterOptions

func NewUserCenterOptions() *UserCenterOptions

NewUserCenterOptions returns initialized UserCenterOptions.

func (*UserCenterOptions) AddFlags

func (o *UserCenterOptions) AddFlags(fs *pflag.FlagSet, prefixes ...string)

AddFlags adds flags for a specific APIServer to the specified FlagSet.

func (*UserCenterOptions) Validate

func (o *UserCenterOptions) Validate() []error

Validate validates all the required options.

Jump to

Keyboard shortcuts

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