resolver

package
v0.0.0-...-6fa03d5 Latest Latest
Warning

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

Go to latest
Published: May 4, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package resolver contains a dictionary of credentials resolvers. It exports functions to get or set resolvers. Resolvers can register themselves in func init() of their package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Set

func Set(k string, c Resolver) error

Set registers given credentials resolver with the given key. If the given key exists in the lookup table, function Set returns an error.

Types

type Credentials

type Credentials struct {
	Username string
	Password string
}

Credentials to use while connecting to target.

type Resolver

type Resolver interface {
	Credentials(ctx context.Context, creds *tpb.Credentials) (*Credentials, error)
}

Resolver needs to be implemented when a custom credentials resolver is needed.

func Get

func Get(k string) (Resolver, error)

Get retrieves registered resolver for a given key. Resolver is returned if key exists. Otherwise, an error is returned.

Jump to

Keyboard shortcuts

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