azure

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Namespace = "azure"
)

Variables

This section is empty.

Functions

func GetToken

func GetToken(ctx context.Context, opts TokenOptions, cacher cache.Cache) (*token.Token, error)

GetToken retrieves a token from cache or remote.

func Serve

func Serve(ctx context.Context, mux *http.ServeMux, opts server.ServeOptions) error

Types

type Client

type Client struct {
	Socket       string
	ClientID     string
	ClientSecret string
	Tenant       string
	Resource     string
}

func (*Client) AddFlags

func (cli *Client) AddFlags(flags *pflag.FlagSet)

func (*Client) GetToken

func (cli *Client) GetToken(ctx context.Context) (*token.Token, error)

func (*Client) GetTokenByHTTP

func (cli *Client) GetTokenByHTTP(ctx context.Context, httpc *http.Client) (*token.Token, error)

type TokenOptions

type TokenOptions struct {
	ClientID     string
	ClientSecret string
	Tenant       string
	Resource     string
}

func (*TokenOptions) Key

func (o *TokenOptions) Key() string

func (*TokenOptions) Validate

func (o *TokenOptions) Validate() error

Jump to

Keyboard shortcuts

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