Documentation ¶
Overview ¶
Package usercenter provide methods used to access usercenter service.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ProviderSet = wire.NewSet(NewUserCenter, wire.Bind(new(Interface), new(*impl)), wire.Bind(new(auth.AuthProvider), new(*impl)))
ProviderSet is the usercenter providers.
Functions ¶
func NewUserCenter ¶
func NewUserCenter(opts *UserCenterOptions, etcdOpts *genericoptions.EtcdOptions) *impl
NewUserCenter creates a new client to work with usercenter services.
Types ¶
type GetSecretRequest ¶
type GetSecretResponse ¶
type GetSecretResponse = v1.SecretReply
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.
Click to show internal directories.
Click to hide internal directories.