client

package
v0.89.0 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 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