usercenter

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2024 License: MIT Imports: 16 Imported by: 0

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.SecretReply

type Impl

type Impl = impl

type Interface

type Interface interface {
	Auth(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