dbtoken

package
v0.0.0-...-823d357 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2021 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigurePermissions

func ConfigurePermissions(ctx context.Context, dbid string, userc cosmosdb.UserClient) error

func Log

func Log(log *logrus.Entry) func(http.Handler) http.Handler

Types

type Client

type Client interface {
	Token(context.Context, string) (string, error)
}

func NewClient

func NewClient(env env.Core, authorizer autorest.Authorizer, insecureSkipVerify bool) (Client, error)

type Refresher

type Refresher interface {
	Run(context.Context) error
	Ready() bool
}

func NewRefresher

func NewRefresher(log *logrus.Entry, env env.Core, authorizer autorest.Authorizer, insecureSkipVerify bool, dbc cosmosdb.DatabaseClient, permission string) (Refresher, error)

type Server

type Server interface {
	Run(context.Context) error
}

func NewServer

func NewServer(
	ctx context.Context,
	env env.Core,
	log *logrus.Entry,
	accessLog *logrus.Entry,
	l net.Listener,
	servingKey *rsa.PrivateKey,
	servingCerts []*x509.Certificate,
	verifier oidc.Verifier,
	userc cosmosdb.UserClient,
) (Server, error)

Jump to

Keyboard shortcuts

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