userinfo

package
v1.73.0-rc Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2023 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// Error is an error class for userinfo endpoint errors.
	Error = errs.Class("userinfo_endpoint")
)

Functions

This section is empty.

Types

type Config

type Config struct {
	Enabled      bool           `help:"Whether the private Userinfo rpc endpoint is enabled" default:"false"`
	AllowedPeers storj.NodeURLs `help:"A comma delimited list of peers (IDs/addresses) allowed to use this endpoint."`
}

Config holds Endpoint's configuration.

type Endpoint

type Endpoint struct {
	pb.DRPCUserInfoUnimplementedServer
	// contains filtered or unexported fields
}

Endpoint userinfo endpoint.

func NewEndpoint

func NewEndpoint(log *zap.Logger, users console.Users, apiKeys console.APIKeys, projects console.Projects, config Config) (*Endpoint, error)

NewEndpoint creates a new userinfo endpoint instance.

func (*Endpoint) Close

func (e *Endpoint) Close() error

Close closes resources.

func (*Endpoint) Get

func (e *Endpoint) Get(ctx context.Context, req *pb.GetUserInfoRequest) (response *pb.GetUserInfoResponse, err error)

Get returns relevant info about the current user.

Jump to

Keyboard shortcuts

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