Help us shape the future of Go! Take the 2026 Go Developer Survey

client

package
v0.96.0 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2026 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(args []string) error

Types

type Client

type Client struct {
	Endpoint      string
	SessionID     string
	TokenProvider TokenProvider
	HTTP          *http.Client
	Output        io.Writer
	ProfileName   string
	Profiles      *ProfileStore
	ProfilePath   string
	Color         bool
}

type Profile

type Profile struct {
	Endpoint      string `json:"endpoint"`
	SessionID     string `json:"sessionId,omitempty"`
	JWTPrivateKey string `json:"jwtPrivateKey,omitempty"`
	JWTIssuer     string `json:"jwtIssuer,omitempty"`
	JWTAudience   string `json:"jwtAudience,omitempty"`
	JWTScope      string `json:"jwtScope,omitempty"`
	JWTSubject    string `json:"jwtSubject,omitempty"`
}

type ProfileStore

type ProfileStore struct {
	Profiles map[string]*Profile `json:"profiles"`
}

type TokenProvider

type TokenProvider func(context.Context) (string, error)

func NewJWTTokenProvider

func NewJWTTokenProvider(ctx context.Context, privateKeyResource, issuer, audience, scope, subject string, ttl time.Duration) (TokenProvider, error)

func NewJWTTokenProviderWithResource

func NewJWTTokenProviderWithResource(ctx context.Context, resource *scy.Resource, issuer, audience, scope, subject string, ttl time.Duration) (TokenProvider, error)

Jump to

Keyboard shortcuts

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