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) Get ¶
func (e *Endpoint) Get(ctx context.Context, req *pb.GetUserInfoRequest) (response *pb.GetUserInfoResponse, err error)
Get returns relevant info about the current user.
Click to show internal directories.
Click to hide internal directories.