idlookup

package
v0.0.0-...-e2e6f4c Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2022 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUserNotFound = errors.New("User not found")
	ErrInvalidLogin = errors.New("Invalid login name")
)

Functions

func IDToLogin

func IDToLogin(ctx context.Context, id string) (string, error)

func InputToID

func InputToID(ctx context.Context, login string) (string, error)

func LoginToID

func LoginToID(ctx context.Context, login string) (string, error)

func ValidLogin

func ValidLogin(login string) bool

Types

type GQL

type GQL struct {
	Client *gql.Client
}

func (GQL) IDToLogin

func (g GQL) IDToLogin(ctx context.Context, id string) (string, error)

func (GQL) LoginToID

func (g GQL) LoginToID(ctx context.Context, login string) (string, error)

type Leppu

type Leppu struct{}

func (Leppu) IDToLogin

func (Leppu) IDToLogin(ctx context.Context, id string) (string, error)

func (Leppu) LoginToID

func (Leppu) LoginToID(ctx context.Context, login string) (string, error)

type Lookup

type Lookup interface {
	LoginToID(ctx context.Context, login string) (string, error)
	IDToLogin(ctx context.Context, id string) (string, error)
}
var Global Lookup = Leppu{}

Lookup is global instance

func FromConf

func FromConf(conf string) Lookup

Jump to

Keyboard shortcuts

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