client

package
v1.85.6 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: MIT Imports: 10 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// GenerateServiceToken for client.
	GenerateServiceToken string

	// VerifyServiceToken for client.
	VerifyServiceToken string
)
View Source
var (
	// Module for fx.
	Module = fx.Options(
		v1.Module,
		fx.Provide(NewClient),
		fx.Provide(NewToken),
	)

	// CommandModule for fx.
	CommandModule = fx.Options(
		Module,
		fx.Invoke(RunCommand),
	)
)

Functions

func RunCommand added in v1.27.0

func RunCommand(params RunCommandParams)

RunCommand for client.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client for auth.

func NewClient

func NewClient(client v1.ServiceClient, config *v1c.Config) *Client

NewClient for auth.

func (*Client) GenerateServiceToken

func (c *Client) GenerateServiceToken(ctx context.Context, kind, audience string) (string, error)

GenerateServiceToken for client.

func (*Client) VerifyServiceToken

func (c *Client) VerifyServiceToken(ctx context.Context, token, kind, audience, action string) error

VerifyServiceToken for client.

type Config

type Config struct {
	V1 *v1.Config `yaml:"v1,omitempty" json:"v1,omitempty" toml:"v1,omitempty"`
}

Config for client.

type RunCommandParams added in v1.27.0

type RunCommandParams struct {
	fx.In

	Lifecycle fx.Lifecycle
	Logger    *zap.Logger
	Token     *Token
}

RunCommandParams for client.

type Token added in v1.44.0

type Token struct {
	// contains filtered or unexported fields
}

Token for client.

func NewToken added in v1.44.0

func NewToken(client *Client) *Token

NewToken for client.

func (*Token) Generator added in v1.44.0

func (t *Token) Generator(kind, audience string) token.Generator

Generator for token.

func (*Token) Verifier added in v1.44.0

func (t *Token) Verifier(kind, audience, action string) token.Verifier

Verifier for token.

Directories

Path Synopsis
v1

Jump to

Keyboard shortcuts

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