client

package
v1.32.0 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2023 License: Unlicense Imports: 10 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// GenerateAccessToken for client.
	GenerateAccessToken int32

	// GenerateServiceToken for client.
	GenerateServiceToken string

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

	// 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) GenerateAccessToken

func (c *Client) GenerateAccessToken(ctx context.Context, length uint32) (string, error)

GenerateAccessToken for client.

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" json:"v1" toml:"v1"`
}

Config for client.

type RunCommandParams added in v1.27.0

type RunCommandParams struct {
	fx.In

	Lifecycle fx.Lifecycle
	Logger    *zap.Logger
	Client    *Client
}

RunCommandParams for client.

Directories

Path Synopsis
v1

Jump to

Keyboard shortcuts

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